diff options
| author | 2020-01-03 17:49:04 +0000 | |
|---|---|---|
| committer | 2020-01-03 17:49:04 +0000 | |
| commit | b07b18dba636700acfacffa1afc28893d4873948 (patch) | |
| tree | 5d2cc1c058cc8e5732d561dc0a0451292a958d0d | |
| parent | 666c7482f73e08f7532c88d8960f7fda8257e6d1 (diff) | |
| parent | 187ccaa15a6405973cb9b0b213bf092952d7da42 (diff) | |
Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull"
| -rw-r--r-- | services/core/java/com/android/server/attention/AttentionManagerService.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/attention/AttentionManagerService.java b/services/core/java/com/android/server/attention/AttentionManagerService.java index fc67e24684bb..5ac5b29b1475 100644 --- a/services/core/java/com/android/server/attention/AttentionManagerService.java +++ b/services/core/java/com/android/server/attention/AttentionManagerService.java @@ -67,6 +67,7 @@ import com.android.server.SystemService; import java.io.FileDescriptor; import java.io.PrintWriter; +import java.util.Objects; /** * An attention service implementation that runs in System Server process. @@ -120,7 +121,7 @@ public class AttentionManagerService extends SystemService { AttentionManagerService(Context context, PowerManager powerManager, Object lock, AttentionHandler handler) { super(context); - mContext = Preconditions.checkNotNull(context); + mContext = Objects.requireNonNull(context); mPowerManager = powerManager; mLock = lock; mAttentionHandler = handler; @@ -200,7 +201,7 @@ public class AttentionManagerService extends SystemService { */ @VisibleForTesting boolean checkAttention(long timeout, AttentionCallbackInternal callbackInternal) { - Preconditions.checkNotNull(callbackInternal); + Objects.requireNonNull(callbackInternal); if (!isAttentionServiceSupported()) { Slog.w(LOG_TAG, "Trying to call checkAttention() on an unsupported device."); @@ -543,9 +544,9 @@ public class AttentionManagerService extends SystemService { UserState(int userId, Context context, Object lock, Handler handler, ComponentName componentName) { mUserId = userId; - mContext = Preconditions.checkNotNull(context); - mLock = Preconditions.checkNotNull(lock); - mComponentName = Preconditions.checkNotNull(componentName); + mContext = Objects.requireNonNull(context); + mLock = Objects.requireNonNull(lock); + mComponentName = Objects.requireNonNull(componentName); mAttentionHandler = handler; } |