feat: disable selecting installed apps for nonroot

This commit is contained in:
Aunali321 2023-04-20 22:25:29 +05:30
parent c7483936ec
commit bb681e31c9
3 changed files with 67 additions and 2 deletions

View file

@ -22,6 +22,7 @@ class ManagerAPI {
final String patcherRepo = 'revanced-patcher';
final String cliRepo = 'revanced-cli';
late SharedPreferences _prefs;
bool isRooted = false;
String storedPatchesFile = '/selected-patches.json';
String keystoreFile =
'/sdcard/Android/data/app.revanced.manager.flutter/files/revanced-manager.keystore';
@ -40,6 +41,7 @@ class ManagerAPI {
Future<void> initialize() async {
_prefs = await SharedPreferences.getInstance();
isRooted = await _rootAPI.isRooted();
storedPatchesFile =
(await getApplicationDocumentsDirectory()).path + storedPatchesFile;
}