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

Commit 646f8ecf authored by Kriti Dang's avatar Kriti Dang
Browse files

Removing getSystemPreferredDisplayMode and adding it as part of

DynamicDisplayInfo

Bug: 209598222
Test: atest CtsBootDisplayModeTestCases
Test: atest libcompositionengine_test
Change-Id: I1ce0a5a3916b14e25212dd1d2fc4f5e82674fcd1
parent 0054f412
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -495,27 +495,6 @@ public:
        return result;
    }

    status_t getPreferredBootDisplayMode(const sp<IBinder>& display,
                                         ui::DisplayModeId* displayModeId) override {
        Parcel data, reply;
        status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
        if (result != NO_ERROR) {
            ALOGE("getPreferredBootDisplayMode failed to writeInterfaceToken: %d", result);
            return result;
        }
        result = data.writeStrongBinder(display);
        if (result != NO_ERROR) {
            ALOGE("getPreferredBootDisplayMode failed to writeStrongBinder: %d", result);
            return result;
        }
        result = remote()->transact(BnSurfaceComposer::GET_PREFERRED_BOOT_DISPLAY_MODE, data,
                                    &reply);
        if (result == NO_ERROR) {
            reply.writeInt32(*displayModeId);
        }
        return result;
    }

    void setAutoLowLatencyMode(const sp<IBinder>& display, bool on) override {
        Parcel data, reply;
        status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
@@ -1659,21 +1638,6 @@ status_t BnSurfaceComposer::onTransact(
            }
            return clearBootDisplayMode(display);
        }
        case GET_PREFERRED_BOOT_DISPLAY_MODE: {
            CHECK_INTERFACE(ISurfaceComposer, data, reply);
            sp<IBinder> display = nullptr;
            status_t result = data.readStrongBinder(&display);
            if (result != NO_ERROR) {
                ALOGE("getPreferredBootDisplayMode failed to readStrongBinder: %d", result);
                return result;
            }
            ui::DisplayModeId displayModeId;
            result = getPreferredBootDisplayMode(display, &displayModeId);
            if (result == NO_ERROR) {
                reply->writeInt32(displayModeId);
            }
            return result;
        }
        case SET_AUTO_LOW_LATENCY_MODE: {
            CHECK_INTERFACE(ISurfaceComposer, data, reply);
            sp<IBinder> display = nullptr;
+0 −6
Original line number Diff line number Diff line
@@ -2088,12 +2088,6 @@ status_t SurfaceComposerClient::clearBootDisplayMode(const sp<IBinder>& display)
    return ComposerService::getComposerService()->clearBootDisplayMode(display);
}

status_t SurfaceComposerClient::getPreferredBootDisplayMode(const sp<IBinder>& display,
                                                            ui::DisplayModeId* displayModeId) {
    return ComposerService::getComposerService()->getPreferredBootDisplayMode(display,
                                                                              displayModeId);
}

status_t SurfaceComposerClient::setOverrideFrameRate(uid_t uid, float frameRate) {
    return ComposerService::getComposerService()->setOverrideFrameRate(uid, frameRate);
}
+0 −7
Original line number Diff line number Diff line
@@ -234,12 +234,6 @@ public:
     */
    virtual status_t clearBootDisplayMode(const sp<IBinder>& display) = 0;

    /**
     * Gets the display mode in which the device boots if there is no user-preferred display mode.
     */
    virtual status_t getPreferredBootDisplayMode(const sp<IBinder>& display,
                                                 ui::DisplayModeId*) = 0;

    /**
     * Gets whether boot time display mode operations are supported on the device.
     *
@@ -684,7 +678,6 @@ public:
        GET_BOOT_DISPLAY_MODE_SUPPORT,
        SET_BOOT_DISPLAY_MODE,
        CLEAR_BOOT_DISPLAY_MODE,
        GET_PREFERRED_BOOT_DISPLAY_MODE,
        SET_OVERRIDE_FRAME_RATE,
        // Always append new enum to the end.
    };
+1 −2
Original line number Diff line number Diff line
@@ -174,8 +174,7 @@ public:
    static status_t setBootDisplayMode(const sp<IBinder>& display, ui::DisplayModeId);
    // Clears the user-preferred display mode
    static status_t clearBootDisplayMode(const sp<IBinder>& display);
    // Gets the display mode in which the device boots if there is no user-preferred display mode
    static status_t getPreferredBootDisplayMode(const sp<IBinder>& display, ui::DisplayModeId*);

    // Sets the frame rate of a particular app (uid). This is currently called
    // by GameManager.
    static status_t setOverrideFrameRate(uid_t uid, float frameRate);
+0 −4
Original line number Diff line number Diff line
@@ -762,10 +762,6 @@ public:
        return NO_ERROR;
    }
    status_t clearBootDisplayMode(const sp<IBinder>& /*display*/) override { return NO_ERROR; }
    status_t getPreferredBootDisplayMode(const sp<IBinder>& /*display*/,
                                         ui::DisplayModeId* /*id*/) override {
        return NO_ERROR;
    }
    void setAutoLowLatencyMode(const sp<IBinder>& /*display*/, bool /*on*/) override {}
    void setGameContentType(const sp<IBinder>& /*display*/, bool /*on*/) override {}

Loading