Home
last modified time | relevance | path

Searched refs:componentId (Results 1 – 15 of 15) sorted by relevance

/packages/services/Car/cpp/powerpolicy/server/src/
DPowerComponentHandler.cpp41 for (const auto componentId : ::ndk::enum_range<PowerComponent>()) { in init()
42 if (componentId >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in init()
45 mAccumulatedPolicy->disabledComponents.push_back(componentId); in init()
94 Result<bool> getComponentState(const T& componentId, const std::vector<T>& enabledComponents, in getComponentState() argument
96 auto findComponent = [componentId](const std::vector<T> components) -> bool { in getComponentState()
97 return std::find(components.begin(), components.end(), componentId) != components.end(); in getComponentState()
106 return Error() << StringPrintf("Invalid power component(%d)", componentId); in getComponentState()
109 Result<bool> PowerComponentHandler::getCustomPowerComponentState(const int componentId) const { in getCustomPowerComponentState()
112 return getComponentState(componentId, mAccumulatedPolicy->enabledCustomComponents, in getCustomPowerComponentState()
116 Result<bool> PowerComponentHandler::getPowerComponentState(const PowerComponent componentId) const { in getPowerComponentState()
[all …]
DPolicyManager.cpp156 std::string_view componentId = id.substr(prefix.size()); in toPowerComponent() local
158 iterateAllPowerComponents([componentId, &matchedComponent](PowerComponent component) -> bool { in toPowerComponent()
159 if (componentId == toString(component)) { in toPowerComponent()
203 auto updateVisitedComponents = [](const auto& componentId, auto* visitedComponents) { in readComponents() argument
204 visitedComponents->insert(componentId); in readComponents()
207 auto updateComponentState = [](const auto& componentId, const auto& powerState, in readComponents()
211 enabledComponents->push_back(componentId); in readComponents()
213 disabledComponents->push_back(componentId); in readComponents()
227 PowerComponent componentId = toPowerComponent(id, kPowerComponentPrefix); in readComponents() local
229 if (componentId == INVALID_POWER_COMPONENT) { in readComponents()
[all …]
DPowerComponentHandler.h45 const ::aidl::android::frameworks::automotive::powerpolicy::PowerComponent componentId)
48 android::base::Result<bool> getCustomPowerComponentState(const int componentId) const;
DCarPowerPolicyServer.cpp389 ScopedAStatus CarPowerPolicyServer::getPowerComponentState(PowerComponent componentId, in getPowerComponentState() argument
391 const auto& ret = mComponentHandler.getPowerComponentState(componentId); in getPowerComponentState()
394 ALOGW("getPowerComponentState(%s) failed: %s", toString(componentId).c_str(), in getPowerComponentState()
DCarPowerPolicyServer.h199 aidl::android::frameworks::automotive::powerpolicy::PowerComponent componentId,
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DBatteryDiffData.java162 final Integer componentId = entry.mComponentId; in purgeBatteryDiffData() local
166 || hideSystemComponentSet.contains(componentId) in purgeBatteryDiffData()
252 final int componentId = batteryDiffEntry.mComponentId; in combineSystemItemsIntoOthers() local
253 if (othersSystemComponentSet.contains(componentId) in combineSystemItemsIntoOthers()
254 || (componentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID in combineSystemItemsIntoOthers()
DDataProcessor.java1740 for (int componentId = 0; in getCoalescedUsageList()
1741 componentId < BatteryConsumer.POWER_COMPONENT_COUNT; in getCoalescedUsageList()
1742 componentId++) { in getCoalescedUsageList()
1746 componentId, in getCoalescedUsageList()
1747 deviceConsumer.getConsumedPower(componentId), in getCoalescedUsageList()
1748 deviceConsumer.getUsageDurationMillis(componentId), in getCoalescedUsageList()
1749 componentId == POWER_COMPONENT_SYSTEM_SERVICES in getCoalescedUsageList()
1750 || componentId == POWER_COMPONENT_WAKELOCK)); in getCoalescedUsageList()
1753 for (int componentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID; in getCoalescedUsageList()
1754 componentId in getCoalescedUsageList()
[all …]
DBatteryDiffEntry.java124 int componentId, in BatteryDiffEntry() argument
142 mComponentId = componentId; in BatteryDiffEntry()
/packages/services/Car/service/src/com/android/car/power/
DPolicyReader.java697 String componentId = intermediatePolicyComponents.keyAt(i); in toCarPowerPolicy() local
699 int powerComponent = toPowerComponent(componentId, true); in toCarPowerPolicy()
701 powerComponent = toCustomPowerComponentId(componentId, customComponents); in toCarPowerPolicy()
704 throw new PolicyXmlException(" Unknown component id : " + componentId); in toCarPowerPolicy()
709 "invalid value(" + componentId + ") in |" + ATTR_ID + "| attribute of |" in toCarPowerPolicy()
734 int componentId = customComponents.valueAt(i); in toCarPowerPolicy() local
735 if (components.indexOfKey(componentId) < 0) { // key not found in toCarPowerPolicy()
736 components.put(componentId, enabled); in toCarPowerPolicy()
957 int componentId = customComponentIds.get(i); in parseComponents() local
959 if (!mCustomComponents.containsValue(componentId)) { in parseComponents()
[all …]
DPowerComponentHandler.java386 int componentId = components[i]; in registerCustomComponents() local
388 if (mRegisteredComponents.indexOf(componentId) == -1) { in registerCustomComponents()
389 mRegisteredComponents.add(componentId); in registerCustomComponents()
/packages/services/Car/cpp/powerpolicy/server/tests/
DPowerComponentHandlerTest.cpp78 for (auto componentId : ::ndk::enum_range<PowerComponent>()) { in TEST_F()
79 if (componentId >= PowerComponent::MINIMUM_CUSTOM_COMPONENT_VALUE) { in TEST_F()
82 allComponents.push_back(componentId); in TEST_F()
DSilentModeHandlerTest.cpp106 (PowerComponent componentId, bool* aidlReturn), (override));
/packages/modules/Uwb/service/java/com/android/server/uwb/
DUwbDiagnostics.java162 public BetterBugIntentBuilder setComponentId(long componentId) { in setComponentId() argument
163 mBetterBugIntent.putExtra(EXTRA_COMPONENT_ID, componentId); in setComponentId()
/packages/apps/Nfc/src/com/android/nfc/
DNfcDiagnostics.java181 public BetterBugIntentBuilder setComponentId(long componentId) { in setComponentId() argument
182 mBetterBugIntent.putExtra(EXTRA_COMPONENT_ID, componentId); in setComponentId()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiDiagnostics.java944 public BetterBugIntentBuilder setComponentId(long componentId) { in setComponentId() argument
945 mBetterBugIntent.putExtra(EXTRA_COMPONENT_ID, componentId); in setComponentId()