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

java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I42117ebfb640e3b0b133183e5e146860bed8471a
This commit is contained in:
Daulet Zhanguzin
2019-12-30 15:41:28 +00:00
parent d55b2c8674
commit 634844fe4a

View File

@@ -16,8 +16,6 @@
package android.app.usage;
import static com.android.internal.util.Preconditions.checkNotNull;
import android.annotation.Nullable;
import android.annotation.SystemService;
import android.annotation.TestApi;
@@ -42,6 +40,8 @@ import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
import java.util.Objects;
/**
* Provides access to network usage history and statistics. Usage data is collected in
* discrete bins of time called 'Buckets'. See {@link NetworkStats.Bucket} for details.
@@ -418,7 +418,7 @@ public class NetworkStatsManager {
/** @hide */
public void registerUsageCallback(NetworkTemplate template, int networkType,
long thresholdBytes, UsageCallback callback, @Nullable Handler handler) {
checkNotNull(callback, "UsageCallback cannot be null");
Objects.requireNonNull(callback, "UsageCallback cannot be null");
final Looper looper;
if (handler == null) {