mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
check connected OTG devices only after receiving the write_storage permission
This commit is contained in:
@@ -126,10 +126,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||||||
NewAppDialog(this, NEW_APP_PACKAGE, "Simple Clock")
|
NewAppDialog(this, NEW_APP_PACKAGE, "Simple Clock")
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE)) {
|
|
||||||
checkOTGInclusion()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!config.wereFavoritesPinned) {
|
if (!config.wereFavoritesPinned) {
|
||||||
config.addPinnedFolders(hashSetOf(FAVORITES))
|
config.addPinnedFolders(hashSetOf(FAVORITES))
|
||||||
config.wereFavoritesPinned = true
|
config.wereFavoritesPinned = true
|
||||||
@@ -385,6 +381,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||||||
private fun tryLoadGallery() {
|
private fun tryLoadGallery() {
|
||||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||||
if (it) {
|
if (it) {
|
||||||
|
if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE)) {
|
||||||
|
checkOTGInclusion()
|
||||||
|
}
|
||||||
|
|
||||||
if (config.showAll) {
|
if (config.showAll) {
|
||||||
showAllMedia()
|
showAllMedia()
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user