Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 978d9d3b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Replace com.android.internal.util.Preconditions.checkNotNull with...

Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull"
parents 3af2a7ec 44eeff34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -1785,7 +1786,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
    }

    int runGetCurrentUser(PrintWriter pw) throws RemoteException {
        UserInfo currentUser = Preconditions.checkNotNull(mInterface.getCurrentUser(),
        UserInfo currentUser = Objects.requireNonNull(mInterface.getCurrentUser(),
                "Current user not set");
        pw.println(currentUser.id);
        return 0;
+1 −1
Original line number Diff line number Diff line
@@ -1723,7 +1723,7 @@ class UserController implements Handler.Callback {
    }

    void registerUserSwitchObserver(IUserSwitchObserver observer, String name) {
        Preconditions.checkNotNull(name, "Observer name cannot be null");
        Objects.requireNonNull(name, "Observer name cannot be null");
        checkCallingPermission(INTERACT_ACROSS_USERS_FULL, "registerUserSwitchObserver");
        mUserSwitchObservers.register(observer, name);
    }