mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
do not show the Media Management prompt with All files permission
This commit is contained in:
parent
faf88180af
commit
45a8ee0ec0
1 changed files with 1 additions and 4 deletions
|
@ -15,10 +15,8 @@ import android.os.Build
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.provider.MediaStore.Files
|
import android.provider.MediaStore.Files
|
||||||
import android.provider.MediaStore.Images
|
import android.provider.MediaStore.Images
|
||||||
import android.provider.Settings
|
|
||||||
import android.util.DisplayMetrics
|
import android.util.DisplayMetrics
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.exifinterface.media.ExifInterface
|
import androidx.exifinterface.media.ExifInterface
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
@ -128,9 +126,8 @@ fun SimpleActivity.launchAbout() {
|
||||||
startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true)
|
startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun BaseSimpleActivity.handleMediaManagementPrompt(callback: () -> Unit) {
|
fun BaseSimpleActivity.handleMediaManagementPrompt(callback: () -> Unit) {
|
||||||
if (isSPlus() && !MediaStore.canManageMedia(this)) {
|
if (isSPlus() && !MediaStore.canManageMedia(this) && !isExternalStorageManager()) {
|
||||||
ConfirmationDialog(this, "", R.string.media_management_prompt, R.string.ok, 0) {
|
ConfirmationDialog(this, "", R.string.media_management_prompt, R.string.ok, 0) {
|
||||||
launchMediaManagementIntent(callback)
|
launchMediaManagementIntent(callback)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue