summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-10-25 16:34:54 +0200
committercyBerta <cyberta@riseup.net>2023-10-25 16:34:54 +0200
commit923c51413b577754320667ead42b6393472051b9 (patch)
treeafdb4afc49bcdfdcfa80195bf7738269a98da7a3 /app/src/main/java
parent3668796930633a4850aa9a5e0117c3c4d4d21af6 (diff)
automatically move to next provider setup fragment after permission dialog was either accepted or rejected
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/EmptyPermissionSetupFragment.java15
1 files changed, 9 insertions, 6 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();
+ }
}
}
);