Skip to content

Commit

Permalink
More tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
barbeau committed Dec 28, 2024
1 parent a4bc977 commit e2276fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion GPSTest/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
<activity
android:name=".ui.Preferences"
android:label="@string/pref_title"
android:exported="true">
android:exported="true"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ class Preferences : PreferenceActivity(), OnSharedPreferenceChangeListener {
changePreferenceSummary(getString(R.string.pref_key_preferred_distance_units_v2))
changePreferenceSummary(getString(R.string.pref_key_preferred_speed_units_v2))
changePreferenceSummary(getString(R.string.pref_key_language))
recreate()
}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
Expand Down Expand Up @@ -486,6 +485,7 @@ class Preferences : PreferenceActivity(), OnSharedPreferenceChangeListener {
@RequiresApi(VERSION_CODES.TIRAMISU)
private fun Context.revokeNotificationPermissionAndRestartApplication() {
revokeSelfPermissionOnKill(Manifest.permission.POST_NOTIFICATIONS)
PreferenceUtils.saveBoolean(getString(R.string.pref_key_show_notification), false, prefs)

Executors.newSingleThreadScheduledExecutor().schedule({
val intent = packageManager.getLaunchIntentForPackage(packageName)
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
</string>

<string name="need_to_restart_application_dialog_text" tools:ignore="MissingTranslation">
To disable notifications the application needs to be restarted. Tap \"Ok\" to restart.
To revoke notification permissions the application needs to be restarted. Tap \"Ok\" to restart.
</string>

<!-- Send feedback -->
Expand Down

0 comments on commit e2276fb

Please sign in to comment.