power: clang-format

* Using AOSP interface .clang-format
* Clean Android.mk while we are at it

Change-Id: I630f72e3dffb676ca1930e72945e897f62103ada
Signed-off-by: Arian <arian.kulmer@web.de>
This commit is contained in:
Michael Bestas
2019-09-29 23:59:05 +03:00
parent 39e18570bf
commit 0b6459f08e
27 changed files with 634 additions and 809 deletions

View File

@@ -46,9 +46,9 @@
#include <android/binder_process.h>
using ::aidl::android::hardware::power::BnPower;
using ::aidl::android::hardware::power::Boost;
using ::aidl::android::hardware::power::IPower;
using ::aidl::android::hardware::power::Mode;
using ::aidl::android::hardware::power::Boost;
using ::ndk::ScopedAStatus;
using ::ndk::SharedRefBase;
@@ -65,7 +65,7 @@ extern bool setDeviceSpecificMode(Mode type, bool enabled);
#endif
void setInteractive(bool interactive) {
set_interactive(interactive ? 1:0);
set_interactive(interactive ? 1 : 0);
}
ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
@@ -75,7 +75,7 @@ ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
return ndk::ScopedAStatus::ok();
}
#endif
switch(type){
switch (type) {
#ifdef TAP_TO_WAKE_NODE
case Mode::DOUBLE_TAP_TO_WAKE:
::android::base::WriteStringToFile(enabled ? "1" : "0", TAP_TO_WAKE_NODE, true);
@@ -120,7 +120,7 @@ ndk::ScopedAStatus Power::isModeSupported(Mode type, bool* _aidl_return) {
return ndk::ScopedAStatus::ok();
}
#endif
switch(type){
switch (type) {
case Mode::EXPENSIVE_RENDERING:
if (is_expensive_rendering_supported()) {
*_aidl_return = true;
@@ -144,8 +144,7 @@ ndk::ScopedAStatus Power::isModeSupported(Mode type, bool* _aidl_return) {
}
ndk::ScopedAStatus Power::setBoost(Boost type, int32_t durationMs) {
LOG(INFO) << "Power setBoost: " << static_cast<int32_t>(type)
<< ", duration: " << durationMs;
LOG(INFO) << "Power setBoost: " << static_cast<int32_t>(type) << ", duration: " << durationMs;
return ndk::ScopedAStatus::ok();
}
@@ -154,7 +153,9 @@ ndk::ScopedAStatus Power::isBoostSupported(Boost type, bool* _aidl_return) {
*_aidl_return = false;
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Power::createHintSession(int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds, int64_t durationNanos,
ndk::ScopedAStatus Power::createHintSession(int32_t tgid, int32_t uid,
const std::vector<int32_t>& threadIds,
int64_t durationNanos,
std::shared_ptr<IPowerHintSession>* _aidl_return) {
LOG(INFO) << "Power createHintSession";
if (threadIds.size() == 0) {