Home
last modified time | relevance | path

Searched refs:CarPowerPolicy (Results 1 – 25 of 54) sorted by relevance

123

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/
DPowerComponentHandlerUnitTest.java41 import android.car.hardware.power.CarPowerPolicy;
78 CarPowerPolicy policy = mHandler.getAccumulatedPolicy(); in testGetAccumulatedPolicy_firstTime()
79 CarPowerPolicy expected = new CarPowerPolicy("", new int[]{}, in testGetAccumulatedPolicy_firstTime()
89 CarPowerPolicy policy = new CarPowerPolicy("test_policy1", new int[]{WIFI, BLUETOOTH, in testApplyPowerPolicy_oneTime()
91 CarPowerPolicy expected = new CarPowerPolicy("test_policy1", new int[]{WIFI, BLUETOOTH, in testApplyPowerPolicy_oneTime()
103 CarPowerPolicy[] policies = new CarPowerPolicy[]{ in testApplyPowerPolicy_multipleTimes()
104 new CarPowerPolicy("test_policy1", new int[]{WIFI}, new int[]{AUDIO}), in testApplyPowerPolicy_multipleTimes()
105 new CarPowerPolicy("test_policy2", new int[]{WIFI, DISPLAY}, new int[]{NFC}), in testApplyPowerPolicy_multipleTimes()
106 new CarPowerPolicy("test_policy3", new int[]{CPU, INPUT}, new int[]{WIFI}), in testApplyPowerPolicy_multipleTimes()
107 new CarPowerPolicy("test_policy4", new int[]{MEDIA, AUDIO}, new int[]{})}; in testApplyPowerPolicy_multipleTimes()
[all …]
DPolicyReaderUnitTest.java44 import android.car.hardware.power.CarPowerPolicy;
80 private static final CarPowerPolicy POLICY_OTHER_OFF = new CarPowerPolicy(POLICY_ID_OTHER_OFF,
85 private static final CarPowerPolicy POLICY_OTHER_ON = new CarPowerPolicy(POLICY_ID_OTHER_ON,
89 private static final CarPowerPolicy POLICY_OTHER_UNTOUCHED =
90 new CarPowerPolicy(POLICY_ID_OTHER_UNTOUCHED,
94 private static final CarPowerPolicy POLICY_OTHER_NONE = new CarPowerPolicy(POLICY_ID_OTHER_NONE,
97 private static final CarPowerPolicy SYSTEM_POWER_POLICY_NO_USER_INTERACTION =
98 new CarPowerPolicy(NO_USER_INTERACTION_POLICY_ID,
102 private static final CarPowerPolicy SYSTEM_POWER_POLICY_MODIFIED =
103 new CarPowerPolicy(NO_USER_INTERACTION_POLICY_ID,
[all …]
/packages/services/Car/libs/car-test-lib/src/android/car/testapi/
DFakeRefactoredCarPowerPolicyDaemon.java25 import android.frameworks.automotive.powerpolicy.CarPowerPolicy;
78 private final Map<String, CarPowerPolicy> mPolicies = new ArrayMap<>();
79 private final Map<String, SparseArray<CarPowerPolicy>> mPowerPolicyGroups = new ArrayMap<>();
99 CarPowerPolicy policyInitialOn = createInitialOnPowerPolicy(); in FakeRefactoredCarPowerPolicyDaemon()
100 CarPowerPolicy policyAllOn = createAllOnPowerPolicy(); in FakeRefactoredCarPowerPolicyDaemon()
101 CarPowerPolicy policyNoUser = createNoUserPowerPolicy(); in FakeRefactoredCarPowerPolicyDaemon()
102 CarPowerPolicy policySuspendPrep = createSuspendPrepPowerPolicy(); in FakeRefactoredCarPowerPolicyDaemon()
112 private static CarPowerPolicy createPolicy( in createPolicy()
114 CarPowerPolicy policy = new CarPowerPolicy(); in createPolicy()
122 private static CarPowerPolicy createInitialOnPowerPolicy() { in createInitialOnPowerPolicy()
[all …]
/packages/services/Car/car-lib/src/android/car/hardware/power/
DCarPowerPolicy.java35 public final class CarPowerPolicy implements Parcelable { class
104 public CarPowerPolicy( in CarPowerPolicy() method in CarPowerPolicy
166 /* package-private */ CarPowerPolicy(@NonNull android.os.Parcel in) { in CarPowerPolicy() method in CarPowerPolicy
188 public static final @NonNull Parcelable.Creator<CarPowerPolicy> CREATOR
189 = new Parcelable.Creator<CarPowerPolicy>() {
191 public CarPowerPolicy[] newArray(int size) {
192 return new CarPowerPolicy[size];
196 public CarPowerPolicy createFromParcel(@NonNull android.os.Parcel in) {
197 return new CarPowerPolicy(in);
DICarPowerPolicyListener.aidl19 import android.car.hardware.power.CarPowerPolicy;
30 void onPolicyChanged(in CarPowerPolicy appliedPolicy, in CarPowerPolicy accumulatedPolicy); in onPolicyChanged()
DICarPower.aidl19 import android.car.hardware.power.CarPowerPolicy;
40 CarPowerPolicy getCurrentPowerPolicy(); in getCurrentPowerPolicy()
/packages/services/Car/cpp/powerpolicy/server/tests/
DPolicyManagerTest.cpp30 using ::aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy;
91 CarPowerPolicy createCarPowerPolicy(const std::string& id, in createCarPowerPolicy()
94 CarPowerPolicy policy; in createCarPowerPolicy()
101 CarPowerPolicy createCarPowerPolicyWithCustomComponents( in createCarPowerPolicyWithCustomComponents()
106 CarPowerPolicy policy; in createCarPowerPolicyWithCustomComponents()
115 const CarPowerPolicy kExistingPowerPolicyWithCustomComponents_OtherOff =
134 const CarPowerPolicy kExistingPowerPolicy_OtherOff_With_Custom_Components =
151 const CarPowerPolicy kExistingPowerPolicy_OtherOff =
160 const CarPowerPolicy kExistingPowerPolicyWithCustomComponents_OtherOn =
177 const CarPowerPolicy kExistingPowerPolicy_ToBeRegistered =
[all …]
DCarPowerPolicyServerTest.cpp58 using ::aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy;
88 ScopedAStatus onPolicyChanged(const CarPowerPolicy& /*policy*/) override { in onPolicyChanged() argument
95 MOCK_METHOD(ScopedAStatus, updatePowerComponents, (const CarPowerPolicy&), (override));
96 MOCK_METHOD(ScopedAStatus, onApplyPowerPolicySucceeded, (int32_t, const CarPowerPolicy&, bool),
100 MOCK_METHOD(ScopedAStatus, onPowerPolicyChanged, (const CarPowerPolicy&), (override));
156 ScopedAStatus getCurrentPowerPolicy(CarPowerPolicy* aidlReturn) { in getCurrentPowerPolicy()
353 Invoke([&policyIdForUpdate](const CarPowerPolicy& policy) -> ScopedAStatus { in testApplyPowerPolicyPerPowerStateChangeAsyncInternal()
360 &mutex](int32_t requestId, const CarPowerPolicy& accumulatedPolicy, in testApplyPowerPolicyPerPowerStateChangeAsyncInternal()
460 CarPowerPolicy currentPolicy; in TEST_F()
483 CarPowerPolicy policy; in TEST_F()
[all …]
/packages/services/Car/service/src/com/android/car/power/
DPolicyReader.java37 import android.car.hardware.power.CarPowerPolicy;
146 private static final CarPowerPolicy POWER_POLICY_ALL_ON;
147 private static final CarPowerPolicy POWER_POLICY_INITIAL_ON;
148 private static final CarPowerPolicy POWER_POLICY_SUSPEND_PREP;
162 POWER_POLICY_ALL_ON = new CarPowerPolicy(POWER_POLICY_ID_ALL_ON, ALL_COMPONENTS.clone(),
164 POWER_POLICY_INITIAL_ON = new CarPowerPolicy(POWER_POLICY_ID_INITIAL_ON,
166 POWER_POLICY_SUSPEND_PREP = new CarPowerPolicy(POWER_POLICY_ID_SUSPEND_PREP,
172 private ArrayMap<String, CarPowerPolicy> mRegisteredPowerPolicies;
175 private ArrayMap<String, CarPowerPolicy> mPreemptivePowerPolicies;
184 CarPowerPolicy getPowerPolicy(String policyId) { in getPowerPolicy()
[all …]
DCarPowerManagementService.java49 import android.car.hardware.power.CarPowerPolicy;
317 private CarPowerPolicy mCurrentAccumulatedPowerPolicy = getInitialAccumulatedPowerPolicy();
961 CarPowerPolicy accumulatedPolicy = request.getAccumulatedPolicy(); in notifyPowerStateChangeToDaemon()
1105 CarPowerPolicy policy; in applyDefaultPowerPolicyForState()
1870 private void doHandlePowerPolicyNotification(CarPowerPolicy accumulatedPolicy) { in doHandlePowerPolicyNotification()
2042 public CarPowerPolicy getCurrentPowerPolicy() { in getCurrentPowerPolicy()
2235 private CarPowerPolicy convertPowerPolicyFromDaemon( in convertPowerPolicyFromDaemon()
2236 android.frameworks.automotive.powerpolicy.CarPowerPolicy policy) { in convertPowerPolicyFromDaemon()
2237 return new CarPowerPolicy(policy.policyId, policy.enabledComponents, in convertPowerPolicyFromDaemon()
2244 android.frameworks.automotive.powerpolicy.CarPowerPolicy policy) { in updatePowerComponents()
[all …]
/packages/services/Car/cpp/powerpolicy/aidl/android/automotive/powerpolicy/internal/
DICarPowerPolicyDelegateCallback.aidl20 import android.frameworks.automotive.powerpolicy.CarPowerPolicy;
41 void updatePowerComponents(in CarPowerPolicy powerPolicy); in updatePowerComponents()
51 oneway void onApplyPowerPolicySucceeded(int requestId, in CarPowerPolicy accumulatedPolicy, in onApplyPowerPolicySucceeded()
70 oneway void onPowerPolicyChanged(in CarPowerPolicy accumulatedPolicy); in onPowerPolicyChanged()
DPowerPolicyInitData.aidl19 import android.frameworks.automotive.powerpolicy.CarPowerPolicy;
35 CarPowerPolicy currentPowerPolicy;
40 CarPowerPolicy[] registeredPolicies;
/packages/services/Car/car-lib/native/include/
DCarPowerPolicy.h30 class CarPowerPolicy : public android::Parcelable {
32 CarPowerPolicy() = default;
33 CarPowerPolicy(const std::string& policyId, const std::vector<int32_t>& enabledComponents,
35 virtual ~CarPowerPolicy() = default;
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioPowerListener.java23 import android.car.hardware.power.CarPowerPolicy;
45 public void onPolicyChanged(CarPowerPolicy policy,
46 CarPowerPolicy accumulatedPolicy) {
98 CarPowerPolicy policy = mCarPowerManagementService.getCurrentPowerPolicy(); in initializePowerState()
111 private void updateAudioPowerStateLocked(CarPowerPolicy policy) { in updateAudioPowerStateLocked()
/packages/services/Car/car-lib/native/CarPowerManager/
DCarPowerPolicy.cpp29 CarPowerPolicy::CarPowerPolicy(const std::string& policyId, in CarPowerPolicy() function in android::car::hardware::power::CarPowerPolicy
36 status_t CarPowerPolicy::writeToParcel(Parcel* parcel) const { in writeToParcel()
48 status_t CarPowerPolicy::readFromParcel(const Parcel* parcel) { in readFromParcel()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioPowerListenerTest.java28 import android.car.hardware.power.CarPowerPolicy;
46 private static final CarPowerPolicy ENABLED_POLICY = new CarPowerPolicy(POLICY_ID,
48 private static final CarPowerPolicy DISABLED_POLICY = new CarPowerPolicy(POLICY_ID,
50 private static final CarPowerPolicy EMPTY_POLICY = new CarPowerPolicy(POLICY_ID,
/packages/services/Car/cpp/powerpolicy/aidl/aidl_api/android.automotive.powerpolicy.delegate/1/android/automotive/powerpolicy/internal/
DICarPowerPolicyDelegateCallback.aidl37 …void updatePowerComponents(in android.frameworks.automotive.powerpolicy.CarPowerPolicy powerPolicy… in updatePowerComponents()
38 …ucceeded(int requestId, in android.frameworks.automotive.powerpolicy.CarPowerPolicy accumulatedPol… in onApplyPowerPolicySucceeded()
40 …oneway void onPowerPolicyChanged(in android.frameworks.automotive.powerpolicy.CarPowerPolicy accum… in onPowerPolicyChanged()
DPowerPolicyInitData.aidl38 android.frameworks.automotive.powerpolicy.CarPowerPolicy currentPowerPolicy;
39 android.frameworks.automotive.powerpolicy.CarPowerPolicy[] registeredPolicies;
/packages/services/Car/cpp/powerpolicy/aidl/aidl_api/android.automotive.powerpolicy.delegate/current/android/automotive/powerpolicy/internal/
DICarPowerPolicyDelegateCallback.aidl37 …void updatePowerComponents(in android.frameworks.automotive.powerpolicy.CarPowerPolicy powerPolicy… in updatePowerComponents()
38 …ucceeded(int requestId, in android.frameworks.automotive.powerpolicy.CarPowerPolicy accumulatedPol… in onApplyPowerPolicySucceeded()
40 …oneway void onPowerPolicyChanged(in android.frameworks.automotive.powerpolicy.CarPowerPolicy accum… in onPowerPolicyChanged()
DPowerPolicyInitData.aidl38 android.frameworks.automotive.powerpolicy.CarPowerPolicy currentPowerPolicy;
39 android.frameworks.automotive.powerpolicy.CarPowerPolicy[] registeredPolicies;
/packages/services/Car/tests/common_utils/src/com/android/car/test/power/
DCarPowerPolicyUtil.java21 import android.car.hardware.power.CarPowerPolicy;
27 public static void assertPolicyIdentical(CarPowerPolicy first, CarPowerPolicy second) { in assertPolicyIdentical()
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DPowerPolicyListener.java21 import android.car.hardware.power.CarPowerPolicy;
46 public void onPolicyChanged(@NonNull CarPowerPolicy policy) {
112 CarPowerPolicy policy = mCarPowerManager.getCurrentPowerPolicy(); in handleCurrentPolicy()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/bluetooth/
DBluetoothPowerPolicyTest.java33 import android.car.hardware.power.CarPowerPolicy;
201 CarPowerPolicy policy; in sendPowerPolicyBluetoothOnOff()
203 policy = new CarPowerPolicy("bt_on", allComponents, noComponents); in sendPowerPolicyBluetoothOnOff()
205 policy = new CarPowerPolicy("bt_off", noComponents, allComponents); in sendPowerPolicyBluetoothOnOff()
/packages/services/Car/cpp/powerpolicy/server/src/
DPolicyManager.h38 const ::aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy& policy);
46 std::shared_ptr<::aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy>;
92 std::vector<aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy>
/packages/services/Car/service/src/com/android/car/bluetooth/
DBluetoothPowerPolicy.java24 import android.car.hardware.power.CarPowerPolicy;
63 public void onPolicyChanged(CarPowerPolicy appliedPolicy,
64 CarPowerPolicy accumulatedPolicy) {

123