Modern Apps git

← Modern-Apps.git

games-sudoku: fix all lint findings

Commit
f94defa2ba139f958a55b8f16c11ca0444a2decd
Author
Vayun Mathur <[email protected]>
When
2026-11-17 04:51 UTC (19 days ago)
Parents
1607b93
Manifest (NotificationPermission): add POST_NOTIFICATIONS,
required on Android 13+ because the app posts notifications via
library MaNotifications.

Resources (ExtraTranslation + UnusedResources): remove the
orphan Estonian new_puzzle string, which has no default-locale
entry, and remove the unused lives string from the default
locale (no locale provided a translation of it).

Before deleting, verified neither string is used dynamically:
searched module code, tests and XML for getIdentifier,
reflection, and R.string / stringResource references to lives
and new_puzzle; the only hits were the definitions themselves
(the lives counter is rendered by HeartsRow, not this string).

Verification: :games:sudoku:lintDev now reports 0 errors /
0 warnings in own games/sudoku/** files (remaining warnings
are all in library/**, ignored for this task); total report
0 errors, 68 warnings, 3 hints. :games:sudoku:testDevUnitTest
green with 166 tests, 0 failures on the final run. Note one
pre-existing flake: SudokuViewModelTest
.placingADigitRemovesItFromPeerNotesOnly depends on the
randomly dealt puzzle having peer/stranger blanks and failed
twice with NoSuchElementException before passing in the full
suite; it is untouched by this change and passes standalone.

Diff

games/sudoku/src/main/AndroidManifest.xml
diff --git a/games/sudoku/src/main/AndroidManifest.xml b/games/sudoku/src/main/AndroidManifest.xmlindex 3c0fad55f8..895a55ab35 100644--- a/games/sudoku/src/main/AndroidManifest.xml+++ b/games/sudoku/src/main/AndroidManifest.xml@@ -6,6 +6,8 @@     <!-- Sensors permission at install instead of auto-granting it. -->     <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> +    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />+     <uses-permission android:name="com.vayunmathur.games.hub.permission.READ_GAME_DATA" />     <uses-permission android:name="com.vayunmathur.games.hub.permission.WRITE_GAME_DATA" /> 
games/sudoku/src/main/res/values-et/strings.xml
diff --git a/games/sudoku/src/main/res/values-et/strings.xml b/games/sudoku/src/main/res/values-et/strings.xmlindex 2ed2c4fbbd..a8eec97992 100644--- a/games/sudoku/src/main/res/values-et/strings.xml+++ b/games/sudoku/src/main/res/values-et/strings.xml@@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">-    <string name="new_puzzle">Uus mäng</string>     <string name="board_size">Mängulaua suurus</string>     <string name="difficulty">Raskusaste</string>     <string name="difficulty_expert">Ekspert</string>
games/sudoku/src/main/res/values/strings.xml
diff --git a/games/sudoku/src/main/res/values/strings.xml b/games/sudoku/src/main/res/values/strings.xmlindex 5f1a4e978f..aacb803182 100644--- a/games/sudoku/src/main/res/values/strings.xml+++ b/games/sudoku/src/main/res/values/strings.xml@@ -23,8 +23,6 @@     <string name="highlight_mistakes">Highlight mistakes</string>     <!-- HomeScreen: Explanation of highlight mistakes under its title. Sentence -->     <string name="highlight_mistakes_description">Wrong digits show in red as you play. Turn off for a harder game.</string>-    <!-- GameBoardScreen: Lives counter next to the hearts row, e.g. Lives: 2. Noun plural -->-    <string name="lives">Lives</string>     <!-- GameOverOverlay: Title shown when answer mode runs out of lives. Declarative -->     <string name="out_of_lives">Out of lives</string>     <!-- GameOverOverlay: Explains the loss and offers another try. Sentence -->