Loading app/src/main/java/org/lineageos/updater/UpdateImporter.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class UpdateImporter { private static final int REQUEST_PICK = 9061; private static final String TAG = "UpdateImporter"; private static final String MIME_ZIP = "application/zip"; private static final String FILE_NAME = "localUpdate.zip"; public static final String FILE_NAME = "localUpdate.zip"; private static final String METADATA_PATH = "META-INF/com/android/metadata"; private static final String METADATA_TIMESTAMP_KEY = "post-timestamp="; private static final String METADATA_ANDROID_SDK_KEY = "post-sdk-level="; Loading app/src/main/java/org/lineageos/updater/UpdatesCheckReceiver.java +1 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public class UpdatesCheckReceiver extends BroadcastReceiver { } Utils.cleanupDownloadsDir(context); Utils.removeLocalUpdate(context); // Reset resume or update check failed on reboot editor.putBoolean(Constants.AUTO_UPDATE_CHECK_FAILED, false).apply(); Loading app/src/main/java/org/lineageos/updater/misc/Utils.java +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.lineageos.updater.R; import org.lineageos.updater.UpdateImporter; import org.lineageos.updater.UpdatesDbHelper; import org.lineageos.updater.controller.UpdaterController; import org.lineageos.updater.controller.UpdaterService; Loading Loading @@ -426,6 +427,14 @@ public class Utils { } } public static void removeLocalUpdate(Context context) { File downloadPath = getDownloadPath(context); File localUpdate = new File(downloadPath, UpdateImporter.FILE_NAME); if (localUpdate.exists()) { Log.d(TAG, "Deleting local update: " + localUpdate.delete()); } } /** * Cleanup the download directory, which is assumed to be a privileged location * the user can't access and that might have stale files. This can happen if Loading Loading
app/src/main/java/org/lineageos/updater/UpdateImporter.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class UpdateImporter { private static final int REQUEST_PICK = 9061; private static final String TAG = "UpdateImporter"; private static final String MIME_ZIP = "application/zip"; private static final String FILE_NAME = "localUpdate.zip"; public static final String FILE_NAME = "localUpdate.zip"; private static final String METADATA_PATH = "META-INF/com/android/metadata"; private static final String METADATA_TIMESTAMP_KEY = "post-timestamp="; private static final String METADATA_ANDROID_SDK_KEY = "post-sdk-level="; Loading
app/src/main/java/org/lineageos/updater/UpdatesCheckReceiver.java +1 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public class UpdatesCheckReceiver extends BroadcastReceiver { } Utils.cleanupDownloadsDir(context); Utils.removeLocalUpdate(context); // Reset resume or update check failed on reboot editor.putBoolean(Constants.AUTO_UPDATE_CHECK_FAILED, false).apply(); Loading
app/src/main/java/org/lineageos/updater/misc/Utils.java +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.lineageos.updater.R; import org.lineageos.updater.UpdateImporter; import org.lineageos.updater.UpdatesDbHelper; import org.lineageos.updater.controller.UpdaterController; import org.lineageos.updater.controller.UpdaterService; Loading Loading @@ -426,6 +427,14 @@ public class Utils { } } public static void removeLocalUpdate(Context context) { File downloadPath = getDownloadPath(context); File localUpdate = new File(downloadPath, UpdateImporter.FILE_NAME); if (localUpdate.exists()) { Log.d(TAG, "Deleting local update: " + localUpdate.delete()); } } /** * Cleanup the download directory, which is assumed to be a privileged location * the user can't access and that might have stale files. This can happen if Loading