mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Ensure .nomedia file created in Forge directory
This commit is contained in:
@@ -47,6 +47,13 @@ public class Main extends AndroidApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ensure .nomedia file exists in Forge directory so its images
|
||||||
|
//and other media files don't appear in Gallery or other apps
|
||||||
|
String noMediaFile = assetsDir + ".nomedia";
|
||||||
|
if (!FileUtil.doesFileExist(noMediaFile)) {
|
||||||
|
FileUtil.writeFile(noMediaFile, "");
|
||||||
|
}
|
||||||
|
|
||||||
//enforce orientation based on whether device is a tablet and user preference
|
//enforce orientation based on whether device is a tablet and user preference
|
||||||
adapter.switchOrientationFile = assetsDir + "switch_orientation.ini";
|
adapter.switchOrientationFile = assetsDir + "switch_orientation.ini";
|
||||||
boolean landscapeMode = adapter.isTablet == !FileUtil.doesFileExist(adapter.switchOrientationFile);
|
boolean landscapeMode = adapter.isTablet == !FileUtil.doesFileExist(adapter.switchOrientationFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user