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

Commit 0874a8b7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adjust SET_DISPLAY_BRIGHTNESS check" into sc-dev am: 3509323b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14039005

Change-Id: I8dd2bf950594f8d67ede086416a5ec2888be59f6
parents f10d5baa 3509323b
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -5114,17 +5114,15 @@ status_t SurfaceFlinger::CheckTransactCodeCredentials(uint32_t code) {
        // captureLayers and captureDisplay will handle the permission check in the function
        // captureLayers and captureDisplay will handle the permission check in the function
        case CAPTURE_LAYERS:
        case CAPTURE_LAYERS:
        case CAPTURE_DISPLAY:
        case CAPTURE_DISPLAY:
        case SET_DISPLAY_BRIGHTNESS:
        case SET_FRAME_TIMELINE_INFO:
        case SET_FRAME_TIMELINE_INFO:
        case GET_GPU_CONTEXT_PRIORITY:
        case GET_GPU_CONTEXT_PRIORITY:
        case GET_EXTRA_BUFFER_COUNT: {
        case GET_EXTRA_BUFFER_COUNT: {
            // This is not sensitive information, so should not require permission control.
            // This is not sensitive information, so should not require permission control.
            return OK;
            return OK;
        }
        }
        case SET_DISPLAY_BRIGHTNESS:
        case ADD_HDR_LAYER_INFO_LISTENER:
        case ADD_HDR_LAYER_INFO_LISTENER:
        case REMOVE_HDR_LAYER_INFO_LISTENER: {
        case REMOVE_HDR_LAYER_INFO_LISTENER: {
            // TODO (b/183985553): Should getting & setting brightness be part of this...?
            // codes that require permission check
            IPCThreadState* ipc = IPCThreadState::self();
            IPCThreadState* ipc = IPCThreadState::self();
            const int pid = ipc->getCallingPid();
            const int pid = ipc->getCallingPid();
            const int uid = ipc->getCallingUid();
            const int uid = ipc->getCallingUid();