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