Add debug log for tracking NPE of mMobileIfaces
Test: TH Bug: 192758557 Change-Id: Ib048c18b1c64627de5a9d2b04d10e084a014ff64
This commit is contained in:
@@ -934,6 +934,11 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
|
||||
@Override
|
||||
public String[] getMobileIfaces() {
|
||||
// TODO (b/192758557): Remove debug log.
|
||||
if (ArrayUtils.contains(mMobileIfaces, null)) {
|
||||
throw new NullPointerException(
|
||||
"null element in mMobileIfaces: " + Arrays.toString(mMobileIfaces));
|
||||
}
|
||||
return mMobileIfaces.clone();
|
||||
}
|
||||
|
||||
@@ -1383,6 +1388,11 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
}
|
||||
|
||||
mMobileIfaces = mobileIfaces.toArray(new String[0]);
|
||||
// TODO (b/192758557): Remove debug log.
|
||||
if (ArrayUtils.contains(mMobileIfaces, null)) {
|
||||
throw new NullPointerException(
|
||||
"null element in mMobileIfaces: " + Arrays.toString(mMobileIfaces));
|
||||
}
|
||||
}
|
||||
|
||||
private static int getSubIdForMobile(@NonNull NetworkStateSnapshot state) {
|
||||
|
||||
Reference in New Issue
Block a user