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

Commit d01d8365 authored by Junyu Lai's avatar Junyu Lai
Browse files

Add debug log for tracking NPE of mMobileIfaces

Test: TH
Bug: 192758557
Change-Id: Ib048c18b1c64627de5a9d2b04d10e084a014ff64
parent 14946edc
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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) {