Lines Matching refs:PowerComponent
41 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,
104 PowerComponent::BLUETOOTH,
105 PowerComponent::PROJECTION,
106 PowerComponent::NFC,
107 PowerComponent::INPUT,
108 PowerComponent::VOICE_INTERACTION,
109 PowerComponent::VISUAL_INTERACTION,
110 PowerComponent::LOCATION,
111 PowerComponent::MICROPHONE};
112 const std::vector<PowerComponent> kAllComponents = {PowerComponent::AUDIO,
113 PowerComponent::MEDIA,
114 PowerComponent::DISPLAY,
115 PowerComponent::BLUETOOTH,
116 PowerComponent::WIFI,
117 PowerComponent::CELLULAR,
118 PowerComponent::ETHERNET,
119 PowerComponent::PROJECTION,
120 PowerComponent::NFC,
121 PowerComponent::INPUT,
122 PowerComponent::VOICE_INTERACTION,
123 PowerComponent::VISUAL_INTERACTION,
124 PowerComponent::TRUSTED_DEVICE_DETECTION,
125 PowerComponent::LOCATION,
126 PowerComponent::MICROPHONE,
127 PowerComponent::CPU};
128 const std::vector<PowerComponent> kInitialOnComponents = {PowerComponent::AUDIO,
129 PowerComponent::DISPLAY,
130 PowerComponent::CPU};
131 const std::vector<PowerComponent> kNoComponents;
132 const std::vector<PowerComponent> kSuspendPrepDisabledComponents = {PowerComponent::AUDIO,
133 PowerComponent::BLUETOOTH,
134 PowerComponent::WIFI,
135 PowerComponent::LOCATION,
136 PowerComponent::MICROPHONE,
137 PowerComponent::CPU};
138 const std::unordered_set<PowerComponent> kNoUserInteractionConfigurableComponents =
139 {PowerComponent::BLUETOOTH, PowerComponent::NFC, PowerComponent::TRUSTED_DEVICE_DETECTION};
141 void iterateAllPowerComponents(const std::function<bool(PowerComponent)>& processor) { in iterateAllPowerComponents()
142 for (const auto component : ::ndk::enum_range<PowerComponent>()) { in iterateAllPowerComponents()
143 if (component >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in iterateAllPowerComponents()
152 PowerComponent toPowerComponent(std::string_view id, std::string_view prefix) { in toPowerComponent()
157 PowerComponent matchedComponent = INVALID_POWER_COMPONENT; in toPowerComponent()
158 iterateAllPowerComponents([componentId, &matchedComponent](PowerComponent component) -> bool { in toPowerComponent()
200 std::unordered_set<PowerComponent>* visited, in readComponents()
227 PowerComponent componentId = toPowerComponent(id, kPowerComponentPrefix); in readComponents()
273 const std::unordered_set<PowerComponent>& visited, in readOtherComponents()
292 iterateAllPowerComponents([&visited, &policy](PowerComponent component) -> bool { in readOtherComponents()
305 iterateAllPowerComponents([&visited, &policy](PowerComponent component) -> bool { in readOtherComponents()
337 std::unordered_set<PowerComponent> visited; in readPolicies()
453 bool isConfigurableComponent(PowerComponent component) { in isConfigurableComponent()
457 Result<void> checkConfigurableComponents(const std::vector<PowerComponent>& components) { in checkConfigurableComponents()
523 void configureComponents(const std::vector<PowerComponent>& configComponents, in configureComponents()
524 std::vector<PowerComponent>* componentsAddedTo, in configureComponents()
525 std::vector<PowerComponent>* componentsRemovedFrom) { in configureComponents()
539 std::vector<PowerComponent>* components, in stringsToComponents()
543 PowerComponent componentId = toPowerComponent(component, ""); in stringsToComponents()
559 const std::vector<PowerComponent>& enabledComponents, in createPolicy()
560 const std::vector<PowerComponent>& disabledComponents, in createPolicy()
574 std::string toString(const std::vector<PowerComponent>& components) { in toString()
827 std::vector<PowerComponent> initialOnDisabledComponents; in initRegularPowerPolicy()
828 for (const auto component : ::ndk::enum_range<PowerComponent>()) { in initRegularPowerPolicy()
829 if (component >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in initRegularPowerPolicy()