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

Commit b1063015 authored by Kunal Malhotra's avatar Kunal Malhotra Committed by Android (Google) Code Review
Browse files

Merge "Bug fix for NPE if FGS stop log called before FGS start" into udc-dev

parents 53a00e58 802bb5ca
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -190,6 +190,10 @@ public class ForegroundServiceTypeLoggerModule {
        // and also clean up the start calls stack by UID
        final ArrayList<Integer> apiTypes = convertFgsTypeToApiTypes(record.foregroundServiceType);
        final UidState uidState = mUids.get(uid);
        if (uidState == null) {
            Log.e(TAG, "FGS stop call being logged with no start call for UID " + uid);
            return;
        }
        final ArrayList<Integer> apisFound = new ArrayList<>();
        final ArrayList<Long> timestampsFound = new ArrayList<>();
        for (int i = 0, size = apiTypes.size(); i < size; i++) {