mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-15 19:38:10 +02:00
Slight XAPK support improvement + BG install bugfix
This commit is contained in:
@@ -485,8 +485,17 @@ class AppsProvider with ChangeNotifier {
|
|||||||
.listSync()
|
.listSync()
|
||||||
.where((e) => e.path.toLowerCase().endsWith('.apk'))
|
.where((e) => e.path.toLowerCase().endsWith('.apk'))
|
||||||
.toList();
|
.toList();
|
||||||
newInfo =
|
for (var i = 0; i < apks.length; i++) {
|
||||||
await pm.getPackageArchiveInfo(archiveFilePath: apks.first.path);
|
try {
|
||||||
|
newInfo = await pm.getPackageArchiveInfo(
|
||||||
|
archiveFilePath: apks.first.path);
|
||||||
|
break;
|
||||||
|
} catch (e) {
|
||||||
|
if (i == apks.length - 1) {
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (newInfo == null) {
|
if (newInfo == null) {
|
||||||
downloadedFile.delete();
|
downloadedFile.delete();
|
||||||
@@ -844,7 +853,11 @@ class AppsProvider with ChangeNotifier {
|
|||||||
if (needBGWorkaround) {
|
if (needBGWorkaround) {
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
installApk(downloadedFile, contextIfNewInstall,
|
installApk(downloadedFile, contextIfNewInstall,
|
||||||
needsBGWorkaround: true);
|
needsBGWorkaround: true,
|
||||||
|
shizukuPretendToBeGooglePlay: apps[id]!
|
||||||
|
.app
|
||||||
|
.additionalSettings['shizukuPretendToBeGooglePlay'] ==
|
||||||
|
true);
|
||||||
} else {
|
} else {
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
sayInstalled = await installApk(downloadedFile, contextIfNewInstall,
|
sayInstalled = await installApk(downloadedFile, contextIfNewInstall,
|
||||||
|
Reference in New Issue
Block a user