Skip to content

Commit

Permalink
Invert logic
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Sep 11, 2022
1 parent b6a5415 commit 9f75ae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ synchronized static void setConfirmedRootState(boolean value) {
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static void bind(
@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) {
Expand Down Expand Up @@ -168,7 +168,7 @@ public static void unbind(@NonNull ServiceConnection conn) {
*/
@MainThread
public static void stop(@NonNull Intent intent) {
if (!Utils.isRootPossible())
if (Utils.isRootImpossible())
return;
Shell.Task task = stopOrTask(intent);
if (task != null) {
Expand Down

0 comments on commit 9f75ae9

Please sign in to comment.