diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-01-13 12:05:59 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-01-13 12:05:59 +0100 |
commit | 571eb2f7f92bf4dfaa3611291ef7c96294dfa393 (patch) | |
tree | 11b718ef32586172ffcd12fbb02d8b6e8331bd61 /src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | |
parent | 5f63c397fa7e6790e4a94bd3ae193af23946c7c9 (diff) |
check for file storage permission before selecting avatar
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index ca76eb0c..8c60d5f6 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1,6 +1,5 @@ package eu.siacs.conversations.ui; -import android.Manifest; import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.AlertDialog; @@ -587,19 +586,6 @@ public class ConversationActivity extends XmppActivity } } - public boolean hasStoragePermission(int attachmentChoice) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { - requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, attachmentChoice); - return false; - } else { - return true; - } - } else { - return true; - } - } - @Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { if (grantResults.length > 0) @@ -1359,7 +1345,7 @@ public class ConversationActivity extends XmppActivity } private void openBatteryOptimizationDialogIfNeeded() { - if (showBatteryOptimizationWarning() && getPreferences().getBoolean("show_battery_optimization", true)) { + if (showBatteryOptimizationWarning() && getPreferences().getBoolean("show_battery_optimizationF", true)) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.battery_optimizations_enabled); builder.setMessage(R.string.battery_optimizations_enabled_dialog); |