Added .nomedia file
This commit is contained in:
parent
be02c85a01
commit
cf53b76d29
|
@ -70,15 +70,21 @@ public class BackgroundTask extends AsyncTask<Void, Integer, Boolean> {
|
||||||
extractor.extractAPK();
|
extractor.extractAPK();
|
||||||
publishProgress(9);
|
publishProgress(9);
|
||||||
|
|
||||||
|
//Creates a save folder if one doesn't exist already
|
||||||
File saveFolder = new File(STARDEW_VALLEY_DIR);
|
File saveFolder = new File(STARDEW_VALLEY_DIR);
|
||||||
if (!saveFolder.exists())
|
if (!saveFolder.exists())
|
||||||
saveFolder.mkdir();
|
saveFolder.mkdir();
|
||||||
|
|
||||||
|
//Creates the mod directory if one doesn't exist already
|
||||||
File modDir = new File(MOD_DIR);
|
File modDir = new File(MOD_DIR);
|
||||||
if (!modDir.exists())
|
if (!modDir.exists())
|
||||||
modDir.mkdir();
|
modDir.mkdir();
|
||||||
|
|
||||||
|
//Creates the .nomedia file if it doesn't exist already
|
||||||
|
File noMedia = new File(STARDEW_VALLEY_DIR + ".nomedia");
|
||||||
|
if (!noMedia.exists())
|
||||||
|
noMedia.createNewFile();
|
||||||
|
|
||||||
copy.copyAssets(ASSET_APK_FILES, DIR_APK_FILES);
|
copy.copyAssets(ASSET_APK_FILES, DIR_APK_FILES);
|
||||||
publishProgress(18);
|
publishProgress(18);
|
||||||
|
|
||||||
|
@ -194,14 +200,14 @@ public class BackgroundTask extends AsyncTask<Void, Integer, Boolean> {
|
||||||
};
|
};
|
||||||
publishProgress(54);
|
publishProgress(54);
|
||||||
|
|
||||||
writeApk.addFilesToApk(new File(Environment.getExternalStorageDirectory() + "/SMAPI Installer/base.apk"), moddingAPI, paths, compressed);
|
writeApk.addFilesToApk(new File(Environment.getExternalStorageDirectory() + "/SMAPI Installer/" + ApkExtractor.sourceApkFilename), moddingAPI, paths, compressed);
|
||||||
publishProgress(63);
|
publishProgress(63);
|
||||||
|
|
||||||
signApk.commitSignApk();
|
signApk.commitSignApk();
|
||||||
publishProgress(81);
|
publishProgress(81);
|
||||||
|
|
||||||
File filesToDelete = new File(Environment.getExternalStorageDirectory() + DIR_APK_FILES);
|
File filesToDelete = new File(Environment.getExternalStorageDirectory() + DIR_APK_FILES);
|
||||||
File deleteOldApk = new File(Environment.getExternalStorageDirectory() + "/SMAPI Installer/base.apk_patched.apk");
|
File deleteOldApk = new File(Environment.getExternalStorageDirectory() + "/SMAPI Installer/" + ApkExtractor.sourceApkFilename + "_patched.apk");
|
||||||
deleteOldApk.delete();
|
deleteOldApk.delete();
|
||||||
publishProgress(90);
|
publishProgress(90);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue