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 package android.car.hardware.power; 18 19 20 /** 21 * Copy from android.frameworks.automotive.powerpolicy-java-source/gen/android/frameworks/automotive 22 * /powerpolicy/PowerComponent.java. Must be updated when power components are added to 23 * {@code android.frameworks.automotive.powerpolicy.PowerComponent}. 24 */ 25 public @interface PowerComponent { 26 /** 27 * This is used to turn on/off audio through power policy. 28 */ 29 int AUDIO = 1; 30 /** 31 * This is used to turn on/off media playing/recording through power policy. 32 */ 33 int MEDIA = 2; 34 /** 35 * This is used to turn on/off display through power policy. 36 */ 37 int DISPLAY = 3; 38 /** 39 * This is used to turn on/off bluetooth through power policy. 40 */ 41 int BLUETOOTH = 4; 42 /** 43 * This is used to turn on/off WiFi network through power policy. 44 */ 45 int WIFI = 5; 46 /** 47 * This is used to turn on/off cellular network through power policy. 48 */ 49 int CELLULAR = 6; 50 /** 51 * This is used to turn on/off ethernet through power policy. 52 */ 53 int ETHERNET = 7; 54 /** 55 * This is used to turn on/off projection from other devices through power policy. 56 */ 57 int PROJECTION = 8; 58 /** 59 * This is used to turn on/off NFC through power policy. 60 */ 61 int NFC = 9; 62 /** 63 * This is used to turn on/off all inputs from users through power policy. 64 */ 65 int INPUT = 10; 66 /** 67 * This is used to turn on/off voice interaction through power policy. 68 */ 69 int VOICE_INTERACTION = 11; 70 /** 71 * This is used to turn on/off visual interaction through power policy. 72 */ 73 int VISUAL_INTERACTION = 12; 74 /** 75 * This is used to turn on/off trusted device detection through power policy. 76 */ 77 int TRUSTED_DEVICE_DETECTION = 13; 78 /** 79 * This is used to turn on/off location through power policy. 80 */ 81 int LOCATION = 14; 82 /** 83 * This is used to turn on/off microphone through power policy. 84 */ 85 int MICROPHONE = 15; 86 /** 87 * This is used to turn on/off CPU through power policy. It will turn into off state when system 88 * goes into sleep state. It will be restored to on state when system gets out of sleep state. 89 */ 90 int CPU = 16; 91 /** 92 * This is minimal allowed value for custom defined power components 93 */ 94 int MINIMUM_CUSTOM_COMPONENT_VALUE = 1000; 95 96 } 97