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

Commit cf7a7b25 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Treat AID_GRAPHICS and AID_SYSTEM as having InternalSystemWindowAccess

Without this check, some devices hit a deadlock in the permission cache.

Bug: 212402133
Bug: 211797674
Bug: 211835607
Test: manual
Change-Id: Ib11d46439db57b90486bad07dd90f2cf0822182a
parent 7fd536f3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -364,7 +364,8 @@ bool callingThreadHasInternalSystemWindowAccess() {
    IPCThreadState* ipc = IPCThreadState::self();
    const int pid = ipc->getCallingPid();
    const int uid = ipc->getCallingUid();
    return PermissionCache::checkPermission(sInternalSystemWindow, pid, uid);
    return uid == AID_GRAPHICS || uid == AID_SYSTEM ||
        PermissionCache::checkPermission(sInternalSystemWindow, pid, uid);
}

SurfaceFlinger::SurfaceFlinger(Factory& factory, SkipInitializationTag)