Skip to content

Commit dedcb3c

Browse files
authored
fix: Fix installation being cancelled at installation by not prematurely deleting patched APK (#2490)
1 parent 3074766 commit dedcb3c

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/services/manager_api.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ class ManagerAPI {
366366
PatchedApplication app,
367367
File outFile,
368368
) async {
369-
deleteLastPatchedApp();
370369
final Directory appCache = await getApplicationSupportDirectory();
371370
app.patchedFilePath =
372371
outFile.copySync('${appCache.path}/lastPatchedApp.apk').path;
@@ -691,16 +690,6 @@ class ManagerAPI {
691690
patchedApps.addAll(mountedApps);
692691

693692
await setPatchedApps(patchedApps);
694-
695-
// Delete the saved app if the file is not found.
696-
final PatchedApplication? lastPatchedApp = getLastPatchedApp();
697-
if (lastPatchedApp != null) {
698-
final File file = File(lastPatchedApp.patchedFilePath);
699-
if (!file.existsSync()) {
700-
deleteLastPatchedApp();
701-
_prefs.remove('lastPatchedApp');
702-
}
703-
}
704693
}
705694

706695
Future<bool> isAppUninstalled(PatchedApplication app) async {

0 commit comments

Comments
 (0)