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

Commit 9e9281ef authored by Rheygine Medel's avatar Rheygine Medel Committed by Haamed Gheibi
Browse files

sf: Allow SystemServer to set the display brightness

As part of the boot up sequence, SystemServer initializes the
DisplayManagerService to manage the global lifecycle of all displays.
Currently, the DisplayManagerService is not permitted to adjust the
display brightness settings and this is causing boot up failures.

This change allows SystemServer or AID to set the display brightness
to avoid such issues.

Bug: 248249039
Change-Id: Ia57c5fc8f3875da4f5ab31ab68d24571a5599fe4
parent 866e5471
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7564,7 +7564,7 @@ status_t SurfaceComposerAIDL::checkControlDisplayBrightnessPermission() {
    IPCThreadState* ipc = IPCThreadState::self();
    const int pid = ipc->getCallingPid();
    const int uid = ipc->getCallingUid();
    if ((uid != AID_GRAPHICS) &&
    if ((uid != AID_GRAPHICS) && (uid != AID_SYSTEM) &&
        !PermissionCache::checkPermission(sControlDisplayBrightness, pid, uid)) {
        ALOGE("Permission Denial: can't control brightness pid=%d, uid=%d", pid, uid);
        return PERMISSION_DENIED;