fix: Surround isRooted with a try/catch just to be safe

This commit is contained in:
Alberto Ponces 2022-09-16 16:39:37 +01:00
parent 31756884b6
commit ef0c59f693

View file

@ -6,8 +6,12 @@ class RootAPI {
final String _serviceDDirPath = '/data/adb/service.d';
Future<bool> hasRootPermissions() async {
bool? isRooted = await Root.isRooted();
return isRooted != null && isRooted;
try {
bool? isRooted = await Root.isRooted();
return isRooted != null && isRooted;
} on Exception {
return false;
}
}
Future<void> setPermissions(