diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-26 21:48:57 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-26 21:48:57 +0200 |
commit | f4ac1f68feac3e3b19ab5932ede9d79dd14bff27 (patch) | |
tree | f45948ade6055a72a919685a3c6430969f02b761 /src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java | |
parent | 8cb243536bb1fbe7743ebc428d79b6f99c844444 (diff) |
do not show media overview in contact/conference details when missing storage permission
Diffstat (limited to 'src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java b/src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java index 8fa50bb08..65711ef42 100644 --- a/src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java +++ b/src/main/java/de/pixart/messenger/services/AbstractConnectionManager.java @@ -1,9 +1,6 @@ package de.pixart.messenger.services; -import android.Manifest; import android.content.Context; -import android.content.pm.PackageManager; -import android.os.Build; import android.os.PowerManager; import android.os.SystemClock; import android.util.Pair; @@ -21,7 +18,6 @@ import javax.crypto.CipherOutputStream; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; -import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.entities.DownloadableFile; import de.pixart.messenger.utils.Compatibility; @@ -128,11 +124,7 @@ public class AbstractConnectionManager { } public boolean hasStoragePermission() { - if (!Config.ONLY_INTERNAL_STORAGE && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - return mXmppConnectionService.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; - } else { - return true; - } + return Compatibility.hasStoragePermission(mXmppConnectionService); } public void updateConversationUi(boolean force) { |