Permission aware file browsing, Restore menu size
Since the BIOS cannot be stored on external storage, there is absolutely no reason to begin a search from that folder. It makes more sense to start from a user-defined folder than the default simply because an external card exists. A check has been added to see if the preference is a default.
This commit is contained in:
parent
70b93b4d86
commit
627d5eb301
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_icon"
|
android:id="@+id/item_icon"
|
||||||
android:layout_width="48dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="32dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:layout_marginLeft="6dp"
|
android:layout_marginLeft="6dp"
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_icon"
|
android:id="@+id/item_icon"
|
||||||
android:layout_width="48dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="32dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:layout_marginLeft="6dp"
|
android:layout_marginLeft="6dp"
|
||||||
|
|
|
@ -279,6 +279,10 @@ public class FileBrowser extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void browseStorage(boolean images) {
|
private void browseStorage(boolean images) {
|
||||||
|
if (images) {
|
||||||
|
navigate(new File(home_directory));
|
||||||
|
} else {
|
||||||
|
if (game_directory.equals(sdcard.getAbsolutePath().replace("emulated/0", "sdcard0"))) {
|
||||||
HashSet<String> extStorage = FileBrowser.getExternalMounts();
|
HashSet<String> extStorage = FileBrowser.getExternalMounts();
|
||||||
if (extStorage != null && !extStorage.isEmpty()) {
|
if (extStorage != null && !extStorage.isEmpty()) {
|
||||||
for (Iterator<String> sd = extStorage.iterator(); sd.hasNext();) {
|
for (Iterator<String> sd = extStorage.iterator(); sd.hasNext();) {
|
||||||
|
@ -291,9 +295,7 @@ public class FileBrowser extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (images) {
|
}
|
||||||
navigate(new File(home_directory));
|
|
||||||
} else {
|
|
||||||
navigate(new File(game_directory));
|
navigate(new File(game_directory));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue