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

Commit 95722b51 authored by Michal Karpinski's avatar Michal Karpinski
Browse files

Add explicit SYSTEM_UID check

to ActivityStarter#isUidPersistentSystemProcess()

Due to b/123502026 we're seeing some flakyness with
notifications especially, and SYSTEM_UID should never
be in those states.

Bug: 123359226
Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Change-Id: I0d3c3b31c34cf4c9fa14e17ee10fc4b9b35553c7
parent 4086088a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -982,7 +982,8 @@ class ActivityStarter {

    /** Returns true if uid is in a persistent state. */
    private boolean isUidPersistentSystemProcess(int uid) {
        return (mService.getUidStateLocked(uid) <= ActivityManager.PROCESS_STATE_PERSISTENT_UI);
        return (uid == Process.SYSTEM_UID)
                || (mService.getUidStateLocked(uid) <= ActivityManager.PROCESS_STATE_PERSISTENT_UI);
    }

    private void maybeLogActivityStart(int callingUid, String callingPackage, int realCallingUid,