Invert logic

This commit is contained in:
topjohnwu 2022-09-11 14:46:16 -07:00
parent b6a5415a6e
commit 9f75ae9598
2 changed files with 4 additions and 4 deletions

View File

@ -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() {

View File

@ -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) {