mirror of
https://github.com/topjohnwu/libsu.git
synced 2024-11-23 03:59:43 +00:00
Invert logic
This commit is contained in:
parent
b6a5415a6e
commit
9f75ae9598
@ -173,8 +173,8 @@ public final class Utils {
|
||||
currentRootState = value ? 2 : 0;
|
||||
}
|
||||
|
||||
public static boolean isRootPossible() {
|
||||
return !Objects.equals(isAppGrantedRoot(), Boolean.FALSE);
|
||||
public static boolean isRootImpossible() {
|
||||
return Objects.equals(isAppGrantedRoot(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
public static boolean isMainShellRoot() {
|
||||
|
@ -107,7 +107,7 @@ public abstract class RootService extends ContextWrapper {
|
||||
@NonNull Intent intent,
|
||||
@NonNull Executor executor,
|
||||
@NonNull ServiceConnection conn) {
|
||||
if (!Utils.isRootPossible())
|
||||
if (Utils.isRootImpossible())
|
||||
return;
|
||||
Shell.Task task = bindOrTask(intent, executor, conn);
|
||||
if (task != null) {
|
||||
@ -168,7 +168,7 @@ public abstract class RootService extends ContextWrapper {
|
||||
*/
|
||||
@MainThread
|
||||
public static void stop(@NonNull Intent intent) {
|
||||
if (!Utils.isRootPossible())
|
||||
if (Utils.isRootImpossible())
|
||||
return;
|
||||
Shell.Task task = stopOrTask(intent);
|
||||
if (task != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user