mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-23 03:01:02 +00:00
fix: Improve root installations management to fix patching of already patched apps
This commit is contained in:
@@ -198,7 +198,10 @@ class ManagerAPI {
|
||||
Future<bool> isAppUninstalled(PatchedApplication app) async {
|
||||
bool existsRoot = false;
|
||||
if (app.isRooted) {
|
||||
existsRoot = await _rootAPI.isAppInstalled(app.packageName);
|
||||
bool hasRootPermissions = await _rootAPI.hasRootPermissions();
|
||||
if (hasRootPermissions) {
|
||||
existsRoot = await _rootAPI.isAppInstalled(app.packageName);
|
||||
}
|
||||
}
|
||||
bool existsNonRoot = await DeviceApps.isAppInstalled(app.packageName);
|
||||
return !existsRoot && !existsNonRoot;
|
||||
|
||||
Reference in New Issue
Block a user