mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Prevent printing of denied root permission exceptions for unrooted users
This commit is contained in:
parent
3d25655851
commit
f0f934f6a1
@ -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;
|
||||
}
|
||||
|
@ -54,7 +54,10 @@ dependencies:
|
||||
path_provider: ^2.0.11
|
||||
permission_handler: ^10.0.0
|
||||
pull_to_refresh: ^2.0.0
|
||||
root: ^2.0.2
|
||||
root:
|
||||
git:
|
||||
url: https://github.com/gokul1630/root
|
||||
ref: main
|
||||
share_extend: ^2.0.0
|
||||
shared_preferences: ^2.0.15
|
||||
skeletons: ^0.0.3
|
||||
|
Loading…
Reference in New Issue
Block a user