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

Commit bb5f2fdc authored by Carlos Martinez Romero's avatar Carlos Martinez Romero Committed by Android (Google) Code Review
Browse files

Merge "Add permission checks for sfdo functions." into main

parents 9849c540 4a8e5f7e
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -9177,26 +9177,46 @@ binder::Status SurfaceComposerAIDL::setGameDefaultFrameRateOverride(int32_t uid,
}

binder::Status SurfaceComposerAIDL::enableRefreshRateOverlay(bool active) {
    status_t status = checkAccessPermission();
    if (status != OK) {
        return binderStatusFromStatusT(status);
    }
    mFlinger->sfdo_enableRefreshRateOverlay(active);
    return binder::Status::ok();
}

binder::Status SurfaceComposerAIDL::setDebugFlash(int delay) {
    status_t status = checkAccessPermission();
    if (status != OK) {
        return binderStatusFromStatusT(status);
    }
    mFlinger->sfdo_setDebugFlash(delay);
    return binder::Status::ok();
}

binder::Status SurfaceComposerAIDL::scheduleComposite() {
    status_t status = checkAccessPermission();
    if (status != OK) {
        return binderStatusFromStatusT(status);
    }
    mFlinger->sfdo_scheduleComposite();
    return binder::Status::ok();
}

binder::Status SurfaceComposerAIDL::scheduleCommit() {
    status_t status = checkAccessPermission();
    if (status != OK) {
        return binderStatusFromStatusT(status);
    }
    mFlinger->sfdo_scheduleCommit();
    return binder::Status::ok();
}

binder::Status SurfaceComposerAIDL::forceClientComposition(bool enabled) {
    status_t status = checkAccessPermission();
    if (status != OK) {
        return binderStatusFromStatusT(status);
    }
    mFlinger->sfdo_forceClientComposition(enabled);
    return binder::Status::ok();
}