diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java | 15 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java index 4226d804..849ac681 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java @@ -14,6 +14,7 @@ import androidx.activity.result.contract.ActivityResultContracts; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.databinding.FEmptyPermissionSetupBinding; public class EmptyPermissionSetupFragment extends BaseSetupFragment { @@ -31,9 +32,10 @@ public class EmptyPermissionSetupFragment extends BaseSetupFragment { setupActivityCallback.onConfigurationSuccess(); } } else { - Toast.makeText(getContext(), "Permission request failed :(", Toast.LENGTH_LONG).show(); - setupActivityCallback.setNavigationButtonHidden(false); - // TODO: implement sth. useful + Toast.makeText(getContext(), getText(R.string.permission_rejected), Toast.LENGTH_LONG).show(); + if (setupActivityCallback != null) { + setupActivityCallback.onConfigurationSuccess(); + } } }); @@ -46,9 +48,10 @@ public class EmptyPermissionSetupFragment extends BaseSetupFragment { setupActivityCallback.onConfigurationSuccess(); } } else { - Toast.makeText(getContext(), "Permission request failed :(", Toast.LENGTH_LONG).show(); - setupActivityCallback.setNavigationButtonHidden(false); - // TODO: implement sth. useful + Toast.makeText(getContext(), getText(R.string.permission_rejected), Toast.LENGTH_LONG).show(); + if (setupActivityCallback != null) { + setupActivityCallback.onConfigurationSuccess(); + } } } ); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index baefac16..56588bc1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -236,5 +236,5 @@ <string name="upcoming_notifications_request_description">In the next panel Android will ask if you want to allow notifications. This will ensure a stable background connection and enable you to see your data usage from within Android’s notification center.</string> <string name="title_setup_success">You\'re all set!</string> <string name="setup_success_description">Click the button below to connect</string> - + <string name="permission_rejected">Permission request rejected.</string> </resources> |