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

Commit 129c3bf1 authored by Arun Kumar K.R's avatar Arun Kumar K.R Committed by Giulio Cervera
Browse files

HDMIDaemon: Store actionsafe width and height as a system property

(cherry picked from commit 9b6f55560bf5066ea4ba9670d2d009f2b6c36e3b)

Change-Id: I63c213c2f203e63c8047f597e33d06026085c0c8
parent 177e5259
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -578,7 +578,9 @@ int HDMIDaemon::processFrameworkCommand()
        return -1;

    buffer[ret] = 0;

#ifdef QCOM_HARDWARE
    char actionsafe[PROPERTY_VALUE_MAX];
#endif
    if (!strcmp(buffer, HDMI_CMD_ENABLE_HDMI)) {
        if (!openFramebuffer())
            return -1;
@@ -604,13 +606,23 @@ int HDMIDaemon::processFrameworkCommand()
        float asWidthRatio;
        int ret = sscanf(buffer, HDMI_CMD_SET_ASWIDTH "%f", &asWidthRatio);
        if(ret==1) {
#ifdef QCOM_HARDWARE
            sprintf(actionsafe, "%0.2f", asWidthRatio);
            property_set("hw.actionsafe.width", actionsafe);
#else
            SurfaceComposerClient::setActionSafeWidthRatio(asWidthRatio);
#endif
        }
    } else if (!strncmp(buffer, HDMI_CMD_SET_ASHEIGHT, strlen(HDMI_CMD_SET_ASHEIGHT))) {
        float asHeightRatio;
        int ret = sscanf(buffer, HDMI_CMD_SET_ASHEIGHT "%f", &asHeightRatio);
        if(ret==1) {
#ifdef QCOM_HARDWARE
            sprintf(actionsafe, "%0.2f", asHeightRatio);
            property_set("hw.actionsafe.height", actionsafe);
#else
            SurfaceComposerClient::setActionSafeHeightRatio(asHeightRatio);
#endif
        }
    } else if (!strncmp(buffer, HDMI_CMD_HPDOPTION, strlen(HDMI_CMD_HPDOPTION))) {
        int option;