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

Commit cf865895 authored by Varun Shah's avatar Varun Shah
Browse files

Fix NPE in onFgsTimeout().

Fixes: 337451395
Test: atest CtsFgsTimeoutTestCases
Change-Id: I37fc893f608142a57b23271aadd4eaf2b26f629b
parent 4f05ba58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3856,7 +3856,7 @@ public final class ActiveServices {
    void onFgsTimeout(ServiceRecord sr) {
        synchronized (mAm) {
            final int fgsType = getTimeLimitedFgsType(sr.foregroundServiceType);
            if (fgsType == ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE) {
            if (fgsType == ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE || sr.app == null) {
                mFGSAnrTimer.discard(sr);
                return;
            }