mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-13 04:57:37 +02:00
fix: Prevent printing of denied root permission exceptions for unrooted users
This commit is contained in:
@ -7,8 +7,12 @@ class RootAPI {
|
||||
|
||||
Future<bool> hasRootPermissions() async {
|
||||
try {
|
||||
bool? isRooted = await Root.isRooted();
|
||||
return isRooted != null && isRooted;
|
||||
bool? isRooted = await Root.isRootAvailable();
|
||||
if (isRooted != null && isRooted) {
|
||||
isRooted = await Root.isRooted();
|
||||
return isRooted != null && isRooted;
|
||||
}
|
||||
return false;
|
||||
} on Exception {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user