Modern Apps git

← Modern-Apps.git

nonogram: fix all lint findings

Commit
19025bddaaf24939bbff44c76d1a6a6365c3c249
Author
Vayun Mathur <[email protected]>
When
2026-11-17 04:47 UTC (19 days ago)
Parents
5592ce1
Fix every lint error and warning reported for the nonogram
module's own sources by :games:nonogram:lintDev, now 0 errors /
0 warnings for games/nonogram/** (remaining report entries are
transitive library findings owned by other clusters).

- InlinedApi: guard Manifest.permission.POST_NOTIFICATIONS behind
  SDK_INT >= TIRAMISU, mirroring flashcards/ui/SettingsPage.kt. The
  constant is a String inlined at compile time, so referencing it
  below API 33 is safe; it is only requested on API 33+ (empty string
  otherwise, which rememberPermissionRequest never asks for).
- ExtraTranslation: removed values-pl next_level and restart, which
  have no default-locale source string. Verified no default entry
  exists and own code uses UiR.string.next_level / UiR.string.restart
  from library/ui instead.
- Untranslatable: removed values-pl app_name, which duplicates the
  default app_name marked translatable=false ("Nonogram").

No @SuppressLint added; no lint config or baseline changed; no
rule-bug categories. No own Hint findings remained to fix.

Verified: /tmp/run-gradle-f-nonogram.sh :games:nonogram:lintDev
(0 own-module errors/warnings, 70 total report entries all in
library/**) and :games:nonogram:testDevUnitTest green
(111 tests, 0 failures/errors). Note: verification used --no-daemon
because the shared Gradle daemon was repeatedly stopped externally.

Diff

games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt
diff --git a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.ktindex a1a2dae209..c786250573 100644--- a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt+++ b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt@@ -21,7 +21,14 @@ import com.vayunmathur.library.ui.rememberPermissionRequest fun SettingsPage(viewModel: NonogramViewModel, onBack: () -> Unit) {     val reminderEnabled by viewModel.reminderEnabled.collectAsState()     val reminderMinutes by viewModel.reminderMinutesOfDay.collectAsState()-    val requestNotifications = rememberPermissionRequest(Manifest.permission.POST_NOTIFICATIONS)+    // POST_NOTIFICATIONS is a String constant inlined at compile time, so referencing+    // it below API 33 is safe; it is only requested on API 33+ (see setReminderEnabled).+    val notificationPermission = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {+        Manifest.permission.POST_NOTIFICATIONS+    } else {+        ""+    }+    val requestNotifications = rememberPermissionRequest(notificationPermission)      SettingsScreen(         state = SettingsUiState(
games/nonogram/src/main/res/values-pl/strings.xml
diff --git a/games/nonogram/src/main/res/values-pl/strings.xml b/games/nonogram/src/main/res/values-pl/strings.xmlindex 27998f145c..adf04a7848 100644--- a/games/nonogram/src/main/res/values-pl/strings.xml+++ b/games/nonogram/src/main/res/values-pl/strings.xml@@ -1,17 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">-    <!-- Manifest / TopAppBar: App name. Noun, proper -->-    <string name="app_name" translatable="false">Nonogram</string>     <!-- GameModeDropdown: Mode playing the numbered level progression. Adjective -->     <string name="mode_casual">Poziomy</string>     <!-- GameModeDropdown: Mode playing today's shared puzzle. Adjective -->     <string name="mode_daily">Wyzwanie dzienne</string>     <!-- NonogramGameScreen TopAppBar: Current level in the progression. %1$d = level number, e.g. 12 -->     <string name="level_title">Poziom <xliff:g id="level" example="12">%1$d</xliff:g></string>-    <!-- NonogramGameScreen: Button advancing to the next level after a win. Verb phrase -->-    <string name="next_level">Kolejny poziom</string>-    <!-- NonogramGameScreen: Clears every mark on the current puzzle. Verb -->-    <string name="restart">Zacznij od nowa</string>     <!-- NonogramGameScreen: Shown after finishing the daily, since there is only one per day. Sentence -->     <string name="daily_come_back_tomorrow">Rozwiązano! Wróć jutro po nową łamigłówkę.</string>     <!-- NonogramGameScreen: Celebratory line shown when a level is completed. Declarative -->