No longer blocking App ID changes in updates

This commit is contained in:
Imran Remtulla
2023-02-12 14:16:19 -05:00
parent 55d4d1f978
commit 32c40ae7b3
11 changed files with 5 additions and 16 deletions

View File

@@ -179,12 +179,9 @@ class AppsProvider with ChangeNotifier {
}
}
// If the APK package ID is different from the App ID, it is either new (using a placeholder ID) or the ID has changed
// The former case should be handled (give the App its real ID), the latter is a security issue
// In either case, the app should be given the new ID
var newInfo = await PackageArchiveInfo.fromPath(downloadedFile.path);
if (app.id != newInfo.packageName) {
if (apps[app.id] != null && !SourceProvider().isTempId(app.id)) {
throw IDChangedError();
}
var originalAppId = app.id;
app.id = newInfo.packageName;
downloadedFile = downloadedFile.renameSync(