mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-15 22:13:11 +00:00
Support stub APK upgrades
This commit is contained in:
@@ -8,9 +8,19 @@ public class DynAPK {
|
||||
|
||||
private static File dynDir;
|
||||
|
||||
public static File current(Context context) {
|
||||
if (dynDir == null)
|
||||
dynDir = new File(context.getFilesDir().getParent(), "dyn");
|
||||
return new File(dynDir, "current.apk");
|
||||
private static File getDynDir(Context c) {
|
||||
if (dynDir == null) {
|
||||
dynDir = new File(c.getFilesDir().getParent(), "dyn");
|
||||
dynDir.mkdir();
|
||||
}
|
||||
return dynDir;
|
||||
}
|
||||
|
||||
public static File current(Context c) {
|
||||
return new File(getDynDir(c), "current.apk");
|
||||
}
|
||||
|
||||
public static File update(Context c) {
|
||||
return new File(getDynDir(c), "update.apk");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user