mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
show the Media Management prompt on Android 12+ from time to time
This commit is contained in:
parent
0483e30eda
commit
0679b22887
1 changed files with 5 additions and 0 deletions
|
@ -64,6 +64,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
private var mShouldStopFetching = false
|
private var mShouldStopFetching = false
|
||||||
private var mIsSearchOpen = false
|
private var mIsSearchOpen = false
|
||||||
private var mWasDefaultFolderChecked = false
|
private var mWasDefaultFolderChecked = false
|
||||||
|
private var mWasMediaManagementPromptShown = false
|
||||||
private var mLatestMediaId = 0L
|
private var mLatestMediaId = 0L
|
||||||
private var mLatestMediaDateId = 0L
|
private var mLatestMediaDateId = 0L
|
||||||
private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
|
private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
|
||||||
|
@ -158,6 +159,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
callback(granted)
|
callback(granted)
|
||||||
if (granted && isRPlus()) {
|
if (granted && isRPlus()) {
|
||||||
handlePermission(PERMISSION_MEDIA_LOCATION) {}
|
handlePermission(PERMISSION_MEDIA_LOCATION) {}
|
||||||
|
if (!mWasMediaManagementPromptShown && (config.appRunCount == 1 || config.appRunCount % 5 == 0)) {
|
||||||
|
mWasMediaManagementPromptShown = true
|
||||||
|
handleMediaManagementPrompt { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue