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

Commit 8c6bbd63 authored by Romain Guy's avatar Romain Guy
Browse files

Let the system process set the saturation boost

The display manager service will need to call this code early
in the boot process, but before the hardware test calling permission
check can pass (it depends on the order of initalization of other
services like sensors).

Bug: 62238038
Test: Manual (modified display manager service)
Change-Id: I46a673ba971e566a0b9e023005c41fa54603cd1f
parent 0147a17a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -3830,10 +3830,11 @@ status_t SurfaceFlinger::onTransact(
    status_t err = BnSurfaceComposer::onTransact(code, data, reply, flags);
    if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
        CHECK_INTERFACE(ISurfaceComposer, data, reply);
        if (CC_UNLIKELY(!PermissionCache::checkCallingPermission(sHardwareTest))) {
        IPCThreadState* ipc = IPCThreadState::self();
            const int pid = ipc->getCallingPid();
        const int uid = ipc->getCallingUid();
        if (CC_UNLIKELY(uid != AID_SYSTEM
                && !PermissionCache::checkCallingPermission(sHardwareTest))) {
            const int pid = ipc->getCallingPid();
            ALOGE("Permission Denial: "
                    "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
            return PERMISSION_DENIED;