summaryrefslogtreecommitdiffstats
path: root/Power.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Power.cpp')
-rw-r--r--Power.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/Power.cpp b/Power.cpp
index 567066a..19e3abe 100644
--- a/Power.cpp
+++ b/Power.cpp
@@ -29,9 +29,9 @@
#define LOG_TAG "android.hardware.power@1.2-service-qti"
+#include "Power.h"
#include <android-base/file.h>
#include <log/log.h>
-#include "Power.h"
#include "power-common.h"
#include "power-feature.h"
@@ -41,31 +41,30 @@ namespace power {
namespace V1_2 {
namespace implementation {
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
using ::android::hardware::power::V1_0::Feature;
using ::android::hardware::power::V1_0::PowerHint;
using ::android::hardware::power::V1_0::PowerStatePlatformSleepState;
using ::android::hardware::power::V1_0::Status;
using ::android::hardware::power::V1_1::PowerStateSubsystem;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
Power::Power() {
power_init();
}
Return<void> Power::setInteractive(bool interactive) {
- set_interactive(interactive ? 1:0);
+ set_interactive(interactive ? 1 : 0);
return Void();
}
Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
-
power_hint(static_cast<power_hint_t>(hint), data ? (&data) : NULL);
return Void();
}
-Return<void> Power::setFeature(Feature feature, bool activate) {
+Return<void> Power::setFeature(Feature feature, bool activate) {
switch (feature) {
#ifdef TAP_TO_WAKE_NODE
case Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE:
@@ -80,7 +79,6 @@ Return<void> Power::setFeature(Feature feature, bool activate) {
}
Return<void> Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) {
-
hidl_vec<PowerStatePlatformSleepState> states;
states.resize(0);
@@ -89,7 +87,6 @@ Return<void> Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_c
}
Return<void> Power::getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) {
-
hidl_vec<PowerStateSubsystem> subsystems;
_hidl_cb(subsystems, Status::SUCCESS);
@@ -97,13 +94,11 @@ Return<void> Power::getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl
}
Return<void> Power::powerHintAsync(PowerHint_1_0 hint, int32_t data) {
-
return powerHint(hint, data);
}
Return<void> Power::powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) {
-
- return powerHint(static_cast<PowerHint_1_0> (hint), data);
+ return powerHint(static_cast<PowerHint_1_0>(hint), data);
}
} // namespace implementation