• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 #include "ThrottleDecision.h"
18 
19 namespace aidl {
20 namespace google {
21 namespace hardware {
22 namespace power {
23 namespace impl {
24 namespace pixel {
25 
ThrottleString(ThrottleDecision throttleDecision)26 std::string ThrottleString(ThrottleDecision throttleDecision) {
27     switch (throttleDecision) {
28         case ThrottleDecision::NO_THROTTLE:
29             return "NO_THROTTLE";
30         case ThrottleDecision::THROTTLE_60:
31             return "THROTTLE_60";
32         case ThrottleDecision::THROTTLE_70:
33             return "THROTTLE_70";
34         case ThrottleDecision::THROTTLE_80:
35             return "THROTTLE_80";
36         case ThrottleDecision::THROTTLE_90:
37             return "THROTTLE_90";
38         default:
39             return "unknown";
40     }
41 }
42 
43 }  // namespace pixel
44 }  // namespace impl
45 }  // namespace power
46 }  // namespace hardware
47 }  // namespace google
48 }  // namespace aidl
49