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

Commit 1b9b21ce authored by Chenjie Yu's avatar Chenjie Yu
Browse files

fix uid for ForegroundServiceStateChanged

+ was using userId, change to appInfo.uid

Test: will add cts test
Change-Id: I82990fe8f4a21c833e09d40a0e19e2bda6530f1c
Fix: 73290567
parent 049ecedd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1089,7 +1089,7 @@ public final class ActiveServices {
                    active.mNumActive++;
                }
                r.isForeground = true;
                StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.userId, r.shortName,
                StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.appInfo.uid, r.shortName,
                        StatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER);
            }
            r.postNotification();
@@ -1106,7 +1106,7 @@ public final class ActiveServices {
                    decActiveForegroundAppLocked(smap, r);
                }
                r.isForeground = false;
                StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.userId, r.shortName,
                StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.appInfo.uid, r.shortName,
                        StatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__EXIT);
                if (r.app != null) {
                    mAm.updateLruProcessLocked(r.app, false, null);
@@ -2532,7 +2532,7 @@ public final class ActiveServices {
        cancelForegroundNotificationLocked(r);
        if (r.isForeground) {
            decActiveForegroundAppLocked(smap, r);
            StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.userId, r.shortName,
            StatsLog.write(StatsLog.FOREGROUND_SERVICE_STATE_CHANGED, r.appInfo.uid, r.shortName,
                    StatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__EXIT);
        }