mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-25 20:03:44 +02:00
Add some logs to troubleshoot #1550
This commit is contained in:
@@ -565,9 +565,11 @@ class AppsProvider with ChangeNotifier {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (app.additionalSettings['exemptFromBackgroundUpdates'] == true) {
|
if (app.additionalSettings['exemptFromBackgroundUpdates'] == true) {
|
||||||
|
logs.add('Exempted from BG updates: ${app.id}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (app.apkUrls.length > 1) {
|
if (app.apkUrls.length > 1) {
|
||||||
|
logs.add('Multiple APK URLs: ${app.id}');
|
||||||
return false; // Manual API selection means silent install is not possible
|
return false; // Manual API selection means silent install is not possible
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,6 +581,8 @@ class AppsProvider with ChangeNotifier {
|
|||||||
?.installingPackageName
|
?.installingPackageName
|
||||||
: (await pm.getInstallerPackageName(packageName: app.id));
|
: (await pm.getInstallerPackageName(packageName: app.id));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
logs.add(
|
||||||
|
'Failed to get installed package details: ${app.id} (${e.toString()})');
|
||||||
return false; // App probably not installed
|
return false; // App probably not installed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -587,6 +591,7 @@ class AppsProvider with ChangeNotifier {
|
|||||||
// The APK should target a new enough API
|
// The APK should target a new enough API
|
||||||
// https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setRequireUserAction(int)
|
// https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setRequireUserAction(int)
|
||||||
if (!(targetSDK != null && targetSDK >= (osInfo.version.sdkInt - 3))) {
|
if (!(targetSDK != null && targetSDK >= (osInfo.version.sdkInt - 3))) {
|
||||||
|
logs.add('Multiple APK URLs: ${app.id}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -601,8 +606,12 @@ class AppsProvider with ChangeNotifier {
|
|||||||
// If we did not install the app, silent install is not possible
|
// If we did not install the app, silent install is not possible
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (osInfo.version.sdkInt < 31) {
|
||||||
// The OS must also be new enough
|
// The OS must also be new enough
|
||||||
return osInfo.version.sdkInt >= 31;
|
logs.add('Android SDK too old: ${osInfo.version.sdkInt}');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> waitForUserToReturnToForeground(BuildContext context) async {
|
Future<void> waitForUserToReturnToForeground(BuildContext context) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user