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

Commit 44eeff34 authored by Daulet Zhanguzin's avatar Daulet Zhanguzin Committed by Tobias Thierer
Browse files

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

java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Exempt-From-Owner-Approval: Global refactoring.
Change-Id: I21f223c4609d256b591601953422c1a7e145106d
parent 6aefe5f5
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);
    }