From 87f39a3dd4063c88d749e3944dffc7997be237f3 Mon Sep 17 00:00:00 2001 From: Quallenauge Date: Mon, 18 Jan 2021 21:18:14 +0100 Subject: [PATCH] power: Re-Enable power_hint() call for Mode::LAUNCH. This hint is handled by most supported targets. Change-Id: I9e02dd50e748bde078c2c7588f4f60dcae9027dc --- Power.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Power.cpp b/Power.cpp index 3deedb6..119865e 100644 --- a/Power.cpp +++ b/Power.cpp @@ -79,7 +79,6 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) { case Mode::DOUBLE_TAP_TO_WAKE: #endif case Mode::LOW_POWER: - case Mode::LAUNCH: case Mode::EXPENSIVE_RENDERING: case Mode::DEVICE_IDLE: case Mode::DISPLAY_INACTIVE: @@ -91,6 +90,9 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) { case Mode::VR: LOG(INFO) << "Mode " << static_cast(type) << "Not Supported"; break; + case Mode::LAUNCH: + power_hint(POWER_HINT_LAUNCH, enabled ? &enabled : NULL); + break; case Mode::INTERACTIVE: setInteractive(enabled); power_hint(POWER_HINT_INTERACTION, NULL); @@ -119,6 +121,7 @@ ndk::ScopedAStatus Power::isModeSupported(Mode type, bool* _aidl_return) { #ifdef TAP_TO_WAKE_NODE case Mode::DOUBLE_TAP_TO_WAKE: #endif + case Mode::LAUNCH: case Mode::INTERACTIVE: case Mode::SUSTAINED_PERFORMANCE: case Mode::FIXED_PERFORMANCE: