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

Commit 2207efc4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "PowerHAL: Make powerHAL calls compatible with HIDL"

parents eeefbe07 b5ee1789
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -142,7 +142,12 @@ LOCAL_SHARED_LIBRARIES := \
    libgui \
    libpowermanager \
    libvulkan \
    libprotobuf-cpp-full
    libprotobuf-cpp-full \
    libhidl \
    libhwbinder \
    libbase \
    libutils \
    android.hardware.power@1.0

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

+5 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
 * limitations under the License.
 */

#include <android/hardware/power/1.0/IPower.h>
#include <stdint.h>
#include <sys/types.h>

@@ -26,6 +27,7 @@

#include "PowerHAL.h"

using android::hardware::power::V1_0::PowerHint;
namespace android {
// ---------------------------------------------------------------------------

@@ -39,7 +41,9 @@ status_t PowerHAL::vsyncHint(bool enabled) {
        }
        mPowerManager = interface_cast<IPowerManager>(bs);
    }
    status_t status = mPowerManager->powerHint(POWER_HINT_VSYNC, enabled ? 1 : 0);
    status_t status;
    status = mPowerManager->powerHint(static_cast<int>(PowerHint::VSYNC),
            enabled ? 1 : 0);
    if(status == DEAD_OBJECT) {
        mPowerManager = NULL;
    }