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

Commit fcadcff7 authored by Huihong Luo's avatar Huihong Luo
Browse files

Allow system account to have screenshot permission

This acts as a fallback, and it should be safe to allow system to have
the permission.

Flag: EXEMPT bug fix
Bug: 356080443
Test: manual
Change-Id: If40acd813c2eddaf1d8f496c01ce06473c2c680b
parent 9f392a93
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6907,7 +6907,8 @@ static status_t validateScreenshotPermissions(const CaptureArgs& captureArgs) {
    IPCThreadState* ipc = IPCThreadState::self();
    const int pid = ipc->getCallingPid();
    const int uid = ipc->getCallingUid();
    if (uid == AID_GRAPHICS || PermissionCache::checkPermission(sReadFramebuffer, pid, uid)) {
    if (uid == AID_GRAPHICS || uid == AID_SYSTEM ||
        PermissionCache::checkPermission(sReadFramebuffer, pid, uid)) {
        return OK;
    }