From 57914db97f120f793e1eef974f9e7ec294aa6ee7 Mon Sep 17 00:00:00 2001 From: iKirby <6316115+iKirby@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:36:18 +0800 Subject: [PATCH] Add cancel button to permission dialogs --- app/src/main/java/io/nekohasekai/sfa/ui/MainActivity.kt | 2 ++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/src/main/java/io/nekohasekai/sfa/ui/MainActivity.kt b/app/src/main/java/io/nekohasekai/sfa/ui/MainActivity.kt index 9ea0680..0bfde06 100644 --- a/app/src/main/java/io/nekohasekai/sfa/ui/MainActivity.kt +++ b/app/src/main/java/io/nekohasekai/sfa/ui/MainActivity.kt @@ -350,6 +350,7 @@ class MainActivity : AbstractActivity(), ServiceConnection.Callback { .setPositiveButton(R.string.ok) { _, _ -> requestFineLocationPermission0() } + .setNegativeButton(R.string.cancel, null) .setCancelable(false) .show() } @@ -375,6 +376,7 @@ class MainActivity : AbstractActivity(), ServiceConnection.Callback { .setPositiveButton(R.string.ok) { _, _ -> backgroundLocationPermissionLauncher.launch(Manifest.permission.ACCESS_BACKGROUND_LOCATION) } + .setNegativeButton(R.string.cancel, null) .setCancelable(false) .show() } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 31ad9cd..80ff8e6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -3,6 +3,7 @@ Stop OK + Cancel No, thanks Dashboard