mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-24 11:23:45 +02:00
bug
This commit is contained in:
@@ -520,11 +520,17 @@ class AppsProvider with ChangeNotifier {
|
|||||||
int? code;
|
int? code;
|
||||||
switch (settingsProvider.installMethod) {
|
switch (settingsProvider.installMethod) {
|
||||||
case InstallMethodSettings.normal:
|
case InstallMethodSettings.normal:
|
||||||
code = await AndroidPackageInstaller.installApk(apkFilePath: file.file.path);
|
code = await AndroidPackageInstaller.installApk(
|
||||||
|
apkFilePath: file.file.path);
|
||||||
case InstallMethodSettings.shizuku:
|
case InstallMethodSettings.shizuku:
|
||||||
code = (await Installers.installWithShizuku(apkFileUri: file.file.uri.toString())) ? 0 : 1;
|
code = (await Installers.installWithShizuku(
|
||||||
|
apkFileUri: file.file.uri.toString()))
|
||||||
|
? 0
|
||||||
|
: 1;
|
||||||
case InstallMethodSettings.root:
|
case InstallMethodSettings.root:
|
||||||
code = (await Installers.installWithRoot(apkFilePath: file.file.path)) ? 0 : 1;
|
code = (await Installers.installWithRoot(apkFilePath: file.file.path))
|
||||||
|
? 0
|
||||||
|
: 1;
|
||||||
}
|
}
|
||||||
bool installed = false;
|
bool installed = false;
|
||||||
if (code != null && code != 0 && code != 3) {
|
if (code != null && code != 0 && code != 3) {
|
||||||
@@ -683,7 +689,8 @@ class AppsProvider with ChangeNotifier {
|
|||||||
bool willBeSilent = await canInstallSilently(apps[appId]!.app);
|
bool willBeSilent = await canInstallSilently(apps[appId]!.app);
|
||||||
switch (settingsProvider.installMethod) {
|
switch (settingsProvider.installMethod) {
|
||||||
case InstallMethodSettings.normal:
|
case InstallMethodSettings.normal:
|
||||||
if (!(await settingsProvider.getInstallPermission(enforce: false))) {
|
if (!(await settingsProvider.getInstallPermission(
|
||||||
|
enforce: false))) {
|
||||||
throw ObtainiumError(tr('cancelled'));
|
throw ObtainiumError(tr('cancelled'));
|
||||||
}
|
}
|
||||||
case InstallMethodSettings.shizuku:
|
case InstallMethodSettings.shizuku:
|
||||||
@@ -743,7 +750,9 @@ class AppsProvider with ChangeNotifier {
|
|||||||
await Future.wait(
|
await Future.wait(
|
||||||
appsToInstall.map((id) => updateFn(id, skipInstalls: true)));
|
appsToInstall.map((id) => updateFn(id, skipInstalls: true)));
|
||||||
for (var id in appsToInstall) {
|
for (var id in appsToInstall) {
|
||||||
await updateFn(id);
|
if (!errors.appIdNames.containsKey(id)) {
|
||||||
|
await updateFn(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user