check connected OTG devices only after receiving the write_storage permission
This commit is contained in:
parent
77ff3010ba
commit
904e43e8f0
1 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue