summaryrefslogtreecommitdiff
path: root/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-06-28 00:49:42 +0200
committercyBerta <cyberta@riseup.net>2024-06-28 00:49:42 +0200
commit6dd683f83d261099a7a4eee5101ea1e53d7a06c2 (patch)
tree9d2cbad559d2295a5d301d7d1e266ea996d563ff /app/src/fatweb/java/se.leap.bitmaskclient/appUpdate
parent23dd92b2d76c0863d926040c3e4c9dc689d2991c (diff)
recheck canRequestPackageInstalls() after user was guided to the apps permission settings
Diffstat (limited to 'app/src/fatweb/java/se.leap.bitmaskclient/appUpdate')
-rw-r--r--app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/InstallActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/InstallActivity.java b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/InstallActivity.java
index 92291a43..b0e6b392 100644
--- a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/InstallActivity.java
+++ b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/InstallActivity.java
@@ -75,8 +75,16 @@ public class InstallActivity extends Activity {
if (resultCode == RESULT_OK) {
installUpdate();
} else {
- Toast.makeText(this, getString(R.string.version_update_error_permissions), Toast.LENGTH_LONG).show();
- finish();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ if (this.getPackageManager().canRequestPackageInstalls()) {
+ installUpdate();
+ } else {
+ Toast.makeText(this, getString(R.string.version_update_error_permissions), Toast.LENGTH_LONG).show();
+ finish();
+ }
+ } else {
+ finish();
+ }
}
}
}