Home
last modified time | relevance | path

Searched refs:PowerComponent (Results 1 – 25 of 41) sorted by relevance

12

/packages/services/Car/cpp/powerpolicy/server/tests/
DPolicyManagerTest.cpp31 using ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent;
92 const std::vector<PowerComponent>& enabledComponents, in createCarPowerPolicy()
93 const std::vector<PowerComponent>& disabledComponents) { in createCarPowerPolicy()
102 const std::string& id, const std::vector<PowerComponent>& enabledComponents, in createCarPowerPolicyWithCustomComponents()
103 const std::vector<PowerComponent>& disabledComponents, in createCarPowerPolicyWithCustomComponents()
117 {PowerComponent::WIFI},
118 {PowerComponent::AUDIO, PowerComponent::MEDIA,
119 PowerComponent::DISPLAY,
120 PowerComponent::BLUETOOTH,
121 PowerComponent::CELLULAR,
[all …]
DPowerComponentHandlerTest.cpp33 using ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent;
43 const std::vector<PowerComponent>& enabledComponents, in createPolicy()
44 const std::vector<PowerComponent>& disabledComponents, in createPolicy()
77 std::vector<PowerComponent> allComponents; in TEST_F()
78 for (auto componentId : ::ndk::enum_range<PowerComponent>()) { in TEST_F()
79 if (componentId >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in TEST_F()
90 createPolicy("test_policy", {PowerComponent::WIFI, PowerComponent::NFC}, in TEST_F()
91 {PowerComponent::AUDIO, PowerComponent::DISPLAY}, {}, {}); in TEST_F()
94 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::WIFI)); in TEST_F()
95 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::NFC)); in TEST_F()
[all …]
DSilentModeHandlerTest.cpp39 using ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent;
106 (PowerComponent componentId, bool* aidlReturn), (override));
/packages/services/Car/car-lib/src/android/car/hardware/power/
DPowerComponentUtil.java67 public static final int FIRST_POWER_COMPONENT = PowerComponent.AUDIO;
74 public static final int LAST_POWER_COMPONENT = PowerComponent.CPU;
152 return PowerComponent.AUDIO; in toPowerComponent()
154 return PowerComponent.MEDIA; in toPowerComponent()
156 return PowerComponent.DISPLAY; in toPowerComponent()
158 return PowerComponent.BLUETOOTH; in toPowerComponent()
160 return PowerComponent.WIFI; in toPowerComponent()
162 return PowerComponent.CELLULAR; in toPowerComponent()
164 return PowerComponent.ETHERNET; in toPowerComponent()
166 return PowerComponent.PROJECTION; in toPowerComponent()
[all …]
DPowerComponent.java25 public @interface PowerComponent { annotation
/packages/services/Car/libs/car-test-lib/src/android/car/testapi/
DFakeRefactoredCarPowerPolicyDaemon.java23 import android.car.hardware.power.PowerComponent;
124 new int[]{PowerComponent.AUDIO, PowerComponent.DISPLAY, PowerComponent.CPU}, in createInitialOnPowerPolicy()
125 new int[]{PowerComponent.MEDIA, PowerComponent.BLUETOOTH, in createInitialOnPowerPolicy()
126 PowerComponent.WIFI, PowerComponent.CELLULAR, in createInitialOnPowerPolicy()
127 PowerComponent.ETHERNET, PowerComponent.PROJECTION, in createInitialOnPowerPolicy()
128 PowerComponent.NFC, PowerComponent.INPUT, in createInitialOnPowerPolicy()
129 PowerComponent.VOICE_INTERACTION, in createInitialOnPowerPolicy()
130 PowerComponent.VISUAL_INTERACTION, in createInitialOnPowerPolicy()
131 PowerComponent.TRUSTED_DEVICE_DETECTION, in createInitialOnPowerPolicy()
132 PowerComponent.LOCATION, PowerComponent.MICROPHONE}); in createInitialOnPowerPolicy()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hardware/power/
DPowerComponentUtilUnitTest.java26 import android.car.hardware.power.PowerComponent;
38 Arrays.stream(PowerComponent.class.getFields()).filter(field -> {
40 return field.getInt(null) < PowerComponent.MINIMUM_CUSTOM_COMPONENT_VALUE;
71 CarPowerPolicy policy = new CarPowerPolicy("testPolicy", new int[]{PowerComponent.AUDIO}, in testHasComponents()
72 new int[]{PowerComponent.WIFI, PowerComponent.NFC}); in testHasComponents()
74 .setComponents(PowerComponent.AUDIO).build(); in testHasComponents()
76 .setComponents(PowerComponent.WIFI).build(); in testHasComponents()
78 .setComponents(PowerComponent.LOCATION, PowerComponent.NFC).build(); in testHasComponents()
80 .setComponents(PowerComponent.MEDIA).build(); in testHasComponents()
118 List<Integer> components = List.of(PowerComponent.AUDIO, PowerComponent.BLUETOOTH, in testPowerComponentsToStrings()
[all …]
DCarPowerManagerUnitTest.java19 import static android.car.hardware.power.PowerComponent.AUDIO;
20 import static android.car.hardware.power.PowerComponent.BLUETOOTH;
21 import static android.car.hardware.power.PowerComponent.CELLULAR;
22 import static android.car.hardware.power.PowerComponent.CPU;
23 import static android.car.hardware.power.PowerComponent.DISPLAY;
24 import static android.car.hardware.power.PowerComponent.ETHERNET;
25 import static android.car.hardware.power.PowerComponent.INPUT;
26 import static android.car.hardware.power.PowerComponent.LOCATION;
27 import static android.car.hardware.power.PowerComponent.MEDIA;
28 import static android.car.hardware.power.PowerComponent.MICROPHONE;
[all …]
/packages/services/Car/cpp/powerpolicy/server/src/
DPolicyManager.cpp41 using ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent;
85 const PowerComponent INVALID_POWER_COMPONENT = static_cast<PowerComponent>(-1);
88 static_cast<int>(PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE);
97 const std::vector<PowerComponent> kNoUserInteractionEnabledComponents =
98 {PowerComponent::WIFI, PowerComponent::CELLULAR, PowerComponent::ETHERNET,
99 PowerComponent::TRUSTED_DEVICE_DETECTION, PowerComponent::CPU};
100 const std::vector<PowerComponent> kNoUserInteractionDisabledComponents =
101 {PowerComponent::AUDIO,
102 PowerComponent::MEDIA,
103 PowerComponent::DISPLAY,
[all …]
DPowerComponentHandler.cpp31 using ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent;
41 for (const auto componentId : ::ndk::enum_range<PowerComponent>()) { in init()
42 if (componentId >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in init()
51 std::unordered_map<PowerComponent, bool> componentStates; in applyPowerPolicy()
116 Result<bool> PowerComponentHandler::getPowerComponentState(const PowerComponent componentId) const { in getPowerComponentState()
DPowerComponentHandler.h45 const ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent componentId)
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/
DPowerComponentHandlerUnitTest.java19 import static android.car.hardware.power.PowerComponent.AUDIO;
20 import static android.car.hardware.power.PowerComponent.BLUETOOTH;
21 import static android.car.hardware.power.PowerComponent.CELLULAR;
22 import static android.car.hardware.power.PowerComponent.CPU;
23 import static android.car.hardware.power.PowerComponent.DISPLAY;
24 import static android.car.hardware.power.PowerComponent.ETHERNET;
25 import static android.car.hardware.power.PowerComponent.INPUT;
26 import static android.car.hardware.power.PowerComponent.LOCATION;
27 import static android.car.hardware.power.PowerComponent.MEDIA;
28 import static android.car.hardware.power.PowerComponent.MICROPHONE;
[all …]
DPolicyReaderUnitTest.java19 import static android.car.hardware.power.PowerComponent.AUDIO;
20 import static android.car.hardware.power.PowerComponent.BLUETOOTH;
21 import static android.car.hardware.power.PowerComponent.CELLULAR;
22 import static android.car.hardware.power.PowerComponent.CPU;
23 import static android.car.hardware.power.PowerComponent.DISPLAY;
24 import static android.car.hardware.power.PowerComponent.ETHERNET;
25 import static android.car.hardware.power.PowerComponent.INPUT;
26 import static android.car.hardware.power.PowerComponent.LOCATION;
27 import static android.car.hardware.power.PowerComponent.MEDIA;
28 import static android.car.hardware.power.PowerComponent.MICROPHONE;
[all …]
DCarPowerManagementServiceUnitTest.java60 import android.car.hardware.power.PowerComponent;
196 PowerComponent.WIFI);
198 PowerComponent.AUDIO, PowerComponent.VOICE_INTERACTION,
199 PowerComponent.VISUAL_INTERACTION, PowerComponent.TRUSTED_DEVICE_DETECTION);
201 PowerComponent.AUDIO, PowerComponent.DISPLAY, PowerComponent.VISUAL_INTERACTION);
203 PowerComponent.WIFI, CUSTOM_COMPONENT_1002);
205 PowerComponent.WIFI, CUSTOM_COMPONENT_1000);
207 PowerComponent.AUDIO, PowerComponent.DISPLAY, PowerComponent.VISUAL_INTERACTION,
210 PowerComponent.WIFI, CUSTOM_COMPONENT_1000);
212 PowerComponent.AUDIO, PowerComponent.DISPLAY, PowerComponent.VISUAL_INTERACTION,
[all …]
/packages/services/Car/service/src/com/android/car/power/
DPowerComponentHandler.java19 import static android.car.hardware.power.PowerComponent.BLUETOOTH;
20 import static android.car.hardware.power.PowerComponent.DISPLAY;
21 import static android.car.hardware.power.PowerComponent.VOICE_INTERACTION;
22 import static android.car.hardware.power.PowerComponent.WIFI;
38 import android.car.hardware.power.PowerComponent;
538 case PowerComponent.AUDIO: in createPowerComponent()
542 case PowerComponent.MEDIA: in createPowerComponent()
544 case PowerComponent.DISPLAY: in createPowerComponent()
546 case PowerComponent.WIFI: in createPowerComponent()
548 case PowerComponent.CELLULAR: in createPowerComponent()
[all …]
DPolicyReader.java24 import static android.frameworks.automotive.powerpolicy.PowerComponent.MINIMUM_CUSTOM_COMPONENT_VAL…
38 import android.car.hardware.power.PowerComponent;
127 PowerComponent.AUDIO, PowerComponent.DISPLAY, PowerComponent.CPU
130 PowerComponent.WIFI, PowerComponent.CELLULAR,
131 PowerComponent.ETHERNET, PowerComponent.TRUSTED_DEVICE_DETECTION, PowerComponent.CPU
134 PowerComponent.AUDIO, PowerComponent.MEDIA, PowerComponent.DISPLAY,
135 PowerComponent.BLUETOOTH, PowerComponent.PROJECTION, PowerComponent.NFC,
136 PowerComponent.INPUT, PowerComponent.VOICE_INTERACTION,
137 PowerComponent.VISUAL_INTERACTION, PowerComponent.LOCATION, PowerComponent.MICROPHONE
140 new ArraySet<>(Arrays.asList(PowerComponent.BLUETOOTH, PowerComponent.NFC,
[all …]
/packages/services/Car/cpp/powerpolicy/client/include/
DPowerPolicyClientBase.h36 const std::vector<::aidl::android::frameworks::automotive::powerpolicy::PowerComponent>&
38 ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent component);
68 virtual std::vector<::aidl::android::frameworks::automotive::powerpolicy::PowerComponent>
/packages/services/Car/cpp/powerpolicy/client/src/
DPowerPolicyClientBase.cpp38 using aafap::PowerComponent;
55 bool hasComponent(const std::vector<PowerComponent>& components, PowerComponent component) { in hasComponent()
56 std::vector<PowerComponent>::const_iterator it = in hasComponent()
/packages/services/Car/service/src/com/android/car/bluetooth/
DBluetoothPowerPolicy.java27 import android.car.hardware.power.PowerComponent;
65 boolean isOn = accumulatedPolicy.isComponentEnabled(PowerComponent.BLUETOOTH);
140 .setComponents(PowerComponent.BLUETOOTH).build(); in init()
/packages/services/Car/tests/carservice_test/src/com/android/car/power/
DPowerComponentValidityTest.java35 Field[] carFields = android.car.hardware.power.PowerComponent.class.getFields(); in testSamePowerComponent()
37 android.frameworks.automotive.powerpolicy.PowerComponent.class.getFields(); in testSamePowerComponent()
DCarPowerManagementTest.java30 import android.car.hardware.power.PowerComponent;
334 .setComponents(PowerComponent.WIFI).build(); in testSleepEntry()
397 .setComponents(PowerComponent.WIFI).build(); in testUnallowedPowerStateEventAtSuspend()
610 .setComponents(PowerComponent.WIFI).build(); in testApplyPowerPolicy_vhalPropertyUpdated()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioPowerListenerTest.java31 import android.car.hardware.power.PowerComponent;
45 private static final int[] COMPONENTS_WITH_AUDIO = {PowerComponent.AUDIO};
86 .containsExactly(PowerComponent.AUDIO); in startListeningForPolicyChanges_addsPowerPolicyListener()
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java33 import android.car.hardware.power.PowerComponent;
146 accumulatedPolicy.isComponentEnabled(PowerComponent.LOCATION);
420 .setComponents(PowerComponent.LOCATION).build(); in addPowerPolicyListener()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DBatteryEntry.java112 @BatteryConsumer.PowerComponent private final int mPowerComponentId;
284 @BatteryConsumer.PowerComponent
585 Context context, @BatteryConsumer.PowerComponent int powerComponentId) { in getNameAndIconFromPowerComponent()
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/
DWifiStateSwitchPreferenceController.java19 import static android.car.hardware.power.PowerComponent.WIFI;

12