Merge "Remove debug log from NetworkStatsService" am: bd96778236

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2117037

Change-Id: Ib3595f06234661044ea7ef300c63fe21952b304f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aaron Huang
2022-06-09 02:59:22 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 21 deletions

View File

@@ -1597,11 +1597,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
@Override
public String[] getMobileIfaces() {
// TODO (b/192758557): Remove debug log.
if (CollectionUtils.contains(mMobileIfaces, null)) {
throw new NullPointerException(
"null element in mMobileIfaces: " + Arrays.toString(mMobileIfaces));
}
return mMobileIfaces.clone();
}
@@ -2072,11 +2067,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
}
mMobileIfaces = mobileIfaces.toArray(new String[0]);
// TODO (b/192758557): Remove debug log.
if (CollectionUtils.contains(mMobileIfaces, null)) {
throw new NullPointerException(
"null element in mMobileIfaces: " + Arrays.toString(mMobileIfaces));
}
}
private static int getSubIdForMobile(@NonNull NetworkStateSnapshot state) {

View File

@@ -140,6 +140,17 @@ import com.android.testutils.HandlerUtils;
import com.android.testutils.TestBpfMap;
import com.android.testutils.TestableNetworkStatsProviderBinder;
import libcore.testing.io.TestIoUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -153,17 +164,6 @@ import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import libcore.testing.io.TestIoUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
* Tests for {@link NetworkStatsService}.
*