Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ANDROID_POWERHALWRAPPER_H |
| 18 | #define ANDROID_POWERHALWRAPPER_H |
| 19 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 20 | #include <aidl/android/hardware/power/Boost.h> |
| 21 | #include <aidl/android/hardware/power/IPower.h> |
| 22 | #include <aidl/android/hardware/power/IPowerHintSession.h> |
| 23 | #include <aidl/android/hardware/power/Mode.h> |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 24 | #include <android-base/thread_annotations.h> |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 25 | #include <android/hardware/power/1.1/IPower.h> |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 26 | #include <android/hardware/power/1.2/IPower.h> |
| 27 | #include <android/hardware/power/1.3/IPower.h> |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 28 | #include <binder/Status.h> |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 29 | |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 30 | namespace android { |
| 31 | |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 32 | namespace power { |
| 33 | |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 34 | // State of Power HAL support for individual apis. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 35 | enum class HalSupport { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 36 | UNKNOWN = 0, |
| 37 | ON = 1, |
| 38 | OFF = 2, |
| 39 | }; |
| 40 | |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 41 | // Result of a call to the Power HAL wrapper, holding data if successful. |
| 42 | template <typename T> |
| 43 | class HalResult { |
| 44 | public: |
| 45 | static HalResult<T> ok(T value) { return HalResult(value); } |
| 46 | static HalResult<T> failed(std::string msg) { |
| 47 | return HalResult(std::move(msg), /* unsupported= */ false); |
| 48 | } |
| 49 | static HalResult<T> unsupported() { return HalResult("", /* unsupported= */ true); } |
| 50 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 51 | static HalResult<T> fromStatus(const binder::Status& status, T data) { |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 52 | if (status.exceptionCode() == binder::Status::EX_UNSUPPORTED_OPERATION) { |
| 53 | return HalResult<T>::unsupported(); |
| 54 | } |
| 55 | if (status.isOk()) { |
| 56 | return HalResult<T>::ok(data); |
| 57 | } |
| 58 | return HalResult<T>::failed(std::string(status.toString8().c_str())); |
| 59 | } |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 60 | |
| 61 | static HalResult<T> fromStatus(const ndk::ScopedAStatus& status, T data) { |
| 62 | if (status.getExceptionCode() == binder::Status::EX_UNSUPPORTED_OPERATION) { |
| 63 | return HalResult<T>::unsupported(); |
| 64 | } |
| 65 | if (status.isOk()) { |
| 66 | return HalResult<T>::ok(data); |
| 67 | } |
| 68 | return HalResult<T>::failed(std::string(status.getDescription())); |
| 69 | } |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 70 | |
| 71 | template <typename R> |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 72 | static HalResult<T> fromReturn(hardware::Return<R>& ret, T data) { |
| 73 | return ret.isOk() ? HalResult<T>::ok(data) : HalResult<T>::failed(ret.description()); |
| 74 | } |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 75 | |
| 76 | template <typename R> |
| 77 | static HalResult<T> fromReturn(hardware::Return<R>& ret, hardware::power::V1_0::Status status, |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 78 | T data) { |
| 79 | return ret.isOk() ? HalResult<T>::fromStatus(status, data) |
| 80 | : HalResult<T>::failed(ret.description()); |
| 81 | } |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 82 | |
| 83 | // This will throw std::bad_optional_access if this result is not ok. |
| 84 | const T& value() const { return mValue.value(); } |
| 85 | bool isOk() const { return !mUnsupported && mValue.has_value(); } |
| 86 | bool isFailed() const { return !mUnsupported && !mValue.has_value(); } |
| 87 | bool isUnsupported() const { return mUnsupported; } |
| 88 | const char* errorMessage() const { return mErrorMessage.c_str(); } |
| 89 | |
| 90 | private: |
| 91 | std::optional<T> mValue; |
| 92 | std::string mErrorMessage; |
| 93 | bool mUnsupported; |
| 94 | |
| 95 | explicit HalResult(T value) |
| 96 | : mValue(std::make_optional(value)), mErrorMessage(), mUnsupported(false) {} |
| 97 | explicit HalResult(std::string errorMessage, bool unsupported) |
| 98 | : mValue(), mErrorMessage(std::move(errorMessage)), mUnsupported(unsupported) {} |
| 99 | }; |
| 100 | |
| 101 | // Empty result of a call to the Power HAL wrapper. |
| 102 | template <> |
| 103 | class HalResult<void> { |
| 104 | public: |
| 105 | static HalResult<void> ok() { return HalResult(); } |
| 106 | static HalResult<void> failed(std::string msg) { return HalResult(std::move(msg)); } |
| 107 | static HalResult<void> unsupported() { return HalResult(/* unsupported= */ true); } |
| 108 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 109 | static HalResult<void> fromStatus(const binder::Status& status) { |
| 110 | if (status.exceptionCode() == binder::Status::EX_UNSUPPORTED_OPERATION) { |
| 111 | return HalResult<void>::unsupported(); |
| 112 | } |
| 113 | if (status.isOk()) { |
| 114 | return HalResult<void>::ok(); |
| 115 | } |
| 116 | return HalResult<void>::failed(std::string(status.toString8().c_str())); |
| 117 | } |
| 118 | |
| 119 | static HalResult<void> fromStatus(const ndk::ScopedAStatus& status) { |
| 120 | if (status.getExceptionCode() == binder::Status::EX_UNSUPPORTED_OPERATION) { |
| 121 | return HalResult<void>::unsupported(); |
| 122 | } |
| 123 | if (status.isOk()) { |
| 124 | return HalResult<void>::ok(); |
| 125 | } |
| 126 | return HalResult<void>::failed(std::string(status.getDescription())); |
| 127 | } |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 128 | |
| 129 | template <typename R> |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 130 | static HalResult<void> fromReturn(hardware::Return<R>& ret) { |
| 131 | return ret.isOk() ? HalResult<void>::ok() : HalResult<void>::failed(ret.description()); |
| 132 | } |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 133 | |
| 134 | bool isOk() const { return !mUnsupported && !mFailed; } |
| 135 | bool isFailed() const { return !mUnsupported && mFailed; } |
| 136 | bool isUnsupported() const { return mUnsupported; } |
| 137 | const char* errorMessage() const { return mErrorMessage.c_str(); } |
| 138 | |
| 139 | private: |
| 140 | std::string mErrorMessage; |
| 141 | bool mFailed; |
| 142 | bool mUnsupported; |
| 143 | |
| 144 | explicit HalResult(bool unsupported = false) |
| 145 | : mErrorMessage(), mFailed(false), mUnsupported(unsupported) {} |
| 146 | explicit HalResult(std::string errorMessage) |
| 147 | : mErrorMessage(std::move(errorMessage)), mFailed(true), mUnsupported(false) {} |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 148 | }; |
| 149 | |
| 150 | // Wrapper for Power HAL handlers. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 151 | class HalWrapper { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 152 | public: |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 153 | virtual ~HalWrapper() = default; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 154 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 155 | virtual HalResult<void> setBoost(aidl::android::hardware::power::Boost boost, |
| 156 | int32_t durationMs) = 0; |
| 157 | virtual HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) = 0; |
| 158 | virtual HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>> |
| 159 | createHintSession(int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds, |
| 160 | int64_t durationNanos) = 0; |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 161 | virtual HalResult<int64_t> getHintSessionPreferredRate() = 0; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | // Empty Power HAL wrapper that ignores all api calls. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 165 | class EmptyHalWrapper : public HalWrapper { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 166 | public: |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 167 | EmptyHalWrapper() = default; |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 168 | ~EmptyHalWrapper() override = default; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 169 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 170 | HalResult<void> setBoost(aidl::android::hardware::power::Boost boost, |
| 171 | int32_t durationMs) override; |
| 172 | HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) override; |
| 173 | HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>> createHintSession( |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 174 | int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds, |
| 175 | int64_t durationNanos) override; |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 176 | HalResult<int64_t> getHintSessionPreferredRate() override; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | // Wrapper for the HIDL Power HAL v1.0. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 180 | class HidlHalWrapperV1_0 : public HalWrapper { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 181 | public: |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 182 | explicit HidlHalWrapperV1_0(sp<hardware::power::V1_0::IPower> handleV1_0) |
| 183 | : mHandleV1_0(std::move(handleV1_0)) {} |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 184 | ~HidlHalWrapperV1_0() override = default; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 185 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 186 | HalResult<void> setBoost(aidl::android::hardware::power::Boost boost, |
| 187 | int32_t durationMs) override; |
| 188 | HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) override; |
| 189 | HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>> createHintSession( |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 190 | int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds, |
| 191 | int64_t durationNanos) override; |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 192 | HalResult<int64_t> getHintSessionPreferredRate() override; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 193 | |
| 194 | protected: |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 195 | const sp<hardware::power::V1_0::IPower> mHandleV1_0; |
| 196 | virtual HalResult<void> sendPowerHint(hardware::power::V1_3::PowerHint hintId, uint32_t data); |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 197 | |
| 198 | private: |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 199 | HalResult<void> setInteractive(bool enabled); |
| 200 | HalResult<void> setFeature(hardware::power::V1_0::Feature feature, bool enabled); |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 201 | }; |
| 202 | |
| 203 | // Wrapper for the HIDL Power HAL v1.1. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 204 | class HidlHalWrapperV1_1 : public HidlHalWrapperV1_0 { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 205 | public: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 206 | explicit HidlHalWrapperV1_1(sp<hardware::power::V1_1::IPower> handleV1_1) |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 207 | : HidlHalWrapperV1_0(std::move(handleV1_1)) {} |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 208 | ~HidlHalWrapperV1_1() override = default; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 209 | |
| 210 | protected: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 211 | HalResult<void> sendPowerHint(hardware::power::V1_3::PowerHint hintId, uint32_t data) override; |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 212 | }; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 213 | |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 214 | // Wrapper for the HIDL Power HAL v1.2. |
| 215 | class HidlHalWrapperV1_2 : public HidlHalWrapperV1_1 { |
| 216 | public: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 217 | HalResult<void> setBoost(aidl::android::hardware::power::Boost boost, |
| 218 | int32_t durationMs) override; |
| 219 | HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) override; |
| 220 | explicit HidlHalWrapperV1_2(sp<hardware::power::V1_2::IPower> handleV1_2) |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 221 | : HidlHalWrapperV1_1(std::move(handleV1_2)) {} |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 222 | ~HidlHalWrapperV1_2() override = default; |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 223 | |
| 224 | protected: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 225 | HalResult<void> sendPowerHint(hardware::power::V1_3::PowerHint hintId, uint32_t data) override; |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 226 | }; |
| 227 | |
| 228 | // Wrapper for the HIDL Power HAL v1.3. |
| 229 | class HidlHalWrapperV1_3 : public HidlHalWrapperV1_2 { |
| 230 | public: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 231 | HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) override; |
| 232 | explicit HidlHalWrapperV1_3(sp<hardware::power::V1_3::IPower> handleV1_3) |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 233 | : HidlHalWrapperV1_2(std::move(handleV1_3)) {} |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 234 | ~HidlHalWrapperV1_3() override = default; |
Matt Buckley | c3894a4 | 2022-09-01 21:17:15 +0000 | [diff] [blame] | 235 | |
| 236 | protected: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 237 | HalResult<void> sendPowerHint(hardware::power::V1_3::PowerHint hintId, uint32_t data) override; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 238 | }; |
| 239 | |
| 240 | // Wrapper for the AIDL Power HAL. |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 241 | class AidlHalWrapper : public HalWrapper { |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 242 | public: |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 243 | explicit AidlHalWrapper(std::shared_ptr<aidl::android::hardware::power::IPower> handle) |
| 244 | : mHandle(std::move(handle)) {} |
| 245 | ~AidlHalWrapper() override = default; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 246 | |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 247 | HalResult<void> setBoost(aidl::android::hardware::power::Boost boost, |
| 248 | int32_t durationMs) override; |
| 249 | HalResult<void> setMode(aidl::android::hardware::power::Mode mode, bool enabled) override; |
| 250 | HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>> createHintSession( |
Jimmy Shiu | 0b264bb | 2021-03-03 00:30:50 +0800 | [diff] [blame] | 251 | int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds, |
| 252 | int64_t durationNanos) override; |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 253 | HalResult<int64_t> getHintSessionPreferredRate() override; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 254 | |
| 255 | private: |
| 256 | // Control access to the boost and mode supported arrays. |
| 257 | std::mutex mBoostMutex; |
| 258 | std::mutex mModeMutex; |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 259 | std::shared_ptr<aidl::android::hardware::power::IPower> mHandle; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 260 | // Android framework only sends boost upto DISPLAY_UPDATE_IMMINENT. |
| 261 | // Need to increase the array size if more boost supported. |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 262 | std::array< |
| 263 | std::atomic<HalSupport>, |
| 264 | static_cast<int32_t>(aidl::android::hardware::power::Boost::DISPLAY_UPDATE_IMMINENT) + |
| 265 | 1> |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 266 | mBoostSupportedArray GUARDED_BY(mBoostMutex) = {HalSupport::UNKNOWN}; |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 267 | std::array<std::atomic<HalSupport>, |
Xiang Wang | 99f6f3c | 2023-05-22 13:12:16 -0700 | [diff] [blame^] | 268 | static_cast<int32_t>( |
| 269 | *(ndk::enum_range<aidl::android::hardware::power::Mode>().end() - 1)) + |
| 270 | 1> |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 271 | mModeSupportedArray GUARDED_BY(mModeMutex) = {HalSupport::UNKNOWN}; |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 272 | }; |
| 273 | |
Lais Andrade | b59a9b5 | 2020-05-07 17:23:42 +0100 | [diff] [blame] | 274 | }; // namespace power |
| 275 | |
Lais Andrade | 4d51f6c | 2020-03-25 10:58:31 +0000 | [diff] [blame] | 276 | }; // namespace android |
| 277 | |
| 278 | #endif // ANDROID_POWERHALWRAPPER_H |