Home
last modified time | relevance | path

Searched refs:CarPropertyValue (Results 1 – 25 of 117) sorted by relevance

12345

/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarPropertyValueTest.java22 import android.car.hardware.CarPropertyValue;
37 private static final CarPropertyValue<Float> CAR_PROPERTY_VALUE = new CarPropertyValue<>(
42 CarPropertyValue<Float> floatValue = in testSimpleFloatValue()
43 new CarPropertyValue<>(FLOAT_PROPERTY_ID, WINDOW_DRIVER, 10f); in testSimpleFloatValue()
47 CarPropertyValue<Float> valueRead = readFromParcel(); in testSimpleFloatValue()
53 CarPropertyValue<Object> mixedValue = in testMixedValue()
54 new CarPropertyValue<>(MIXED_TYPE_PROPERTY_ID, in testMixedValue()
58 CarPropertyValue<Object[]> valueRead = readFromParcel(); in testMixedValue()
72 new CarPropertyValue<>(PROPERTY_ID, AREA_ID, TIMESTAMP_NANOS, null).hashCode()); in hashCode_returnsDifferentValueForDifferentCarPropertyValue()
94 new CarPropertyValue<>(differentPropertyId, AREA_ID, TIMESTAMP_NANOS, VALUE))) in equals_returnsFalseForDifferentPropertyIds()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/internal/property/
DContCarPropertyEventTrackerUnitTest.java21 import android.car.hardware.CarPropertyValue;
53 private static final CarPropertyValue<Integer> GOOD_CAR_PROPERTY_VALUE =
54 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, INTEGER_VALUE_1);
55 private static final CarPropertyValue<Integer> SANITIZED_GOOD_CAR_PROPERTY_VALUE =
56 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
58 private static final CarPropertyValue<Long> GOOD_LONG_CAR_PROPERTY_VALUE =
59 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, LONG_VALUE_1);
60 private static final CarPropertyValue<Long> SANITIZED_GOOD_LONG_CAR_PROPERTY_VALUE =
61 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
63 private static final CarPropertyValue<Float> GOOD_FLOAT_CAR_PROPERTY_VALUE =
[all …]
DCarPropertyEventCallbackControllerUnitTest.java27 import android.car.hardware.CarPropertyValue;
62 private static final CarPropertyValue<Integer> GOOD_CAR_PROPERTY_VALUE = new CarPropertyValue<>(
64 private static final CarPropertyValue<Integer> SANITIZED_GOOD_CAR_PROPERTY_VALUE =
65 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
67 private static final CarPropertyValue<Integer> SIMILAR_GOOD_CAR_PROPERTY_VALUE =
68 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
70 private static final CarPropertyValue<Integer> SECOND_GOOD_CAR_PROPERTY_VALUE =
71 new CarPropertyValue<>(SECOND_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, INTEGER_VALUE_1);
72 private static final CarPropertyValue<Integer> FRESH_CAR_PROPERTY_VALUE =
73 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, FRESH_TIMESTAMP_NANOS,
[all …]
DOnChangeCarPropertyEventTrackerUnitTest.java21 import android.car.hardware.CarPropertyValue;
35 private static final CarPropertyValue<Integer> GOOD_CAR_PROPERTY_VALUE =
36 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, INTEGER_VALUE_1);
37 private static final CarPropertyValue<Integer> FRESH_CAR_PROPERTY_VALUE =
38 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, FRESH_TIMESTAMP_NANOS,
40 private static final CarPropertyValue<Integer> STALE_CAR_PROPERTY_VALUE =
41 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, STALE_TIMESTAMP_NANOS,
/packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/
DVhalJsonReader.java20 import android.car.hardware.CarPropertyValue;
50 public static List<CarPropertyValue> readFromJson(InputStream in) in readFromJson()
53 List<CarPropertyValue> events = new ArrayList<>(); in readFromJson()
69 private static CarPropertyValue<?> getEvent(JSONObject rawEvent) throws JSONException { in getEvent()
76 return new CarPropertyValue<>(prop, areaId, CarPropertyValue.STATUS_AVAILABLE, in getEvent()
79 return new CarPropertyValue<>(prop, areaId, CarPropertyValue.STATUS_AVAILABLE, in getEvent()
82 return new CarPropertyValue<>(prop, areaId, CarPropertyValue.STATUS_AVAILABLE, in getEvent()
85 return new CarPropertyValue<>(prop, areaId, in getEvent()
86 CarPropertyValue.STATUS_AVAILABLE, timestamp, in getEvent()
89 return new CarPropertyValue<>(prop, areaId, CarPropertyValue.STATUS_AVAILABLE, in getEvent()
[all …]
DCarPropertyTest.java27 import android.car.hardware.CarPropertyValue;
141 public void onChangeEvent(CarPropertyValue carPropertyValue) { in onChangeEvent()
156 CarPropertyValue value) throws Exception { in setPropertyAndWaitForValueChange()
200 List<CarPropertyValue> expectedSetEvents = getExpectedEvents(CAR_HVAC_TEST_SET_JSON); in testHvacActionsFromAndroid()
206 for (CarPropertyValue expectedEvent : expectedSetEvents) { in testHvacActionsFromAndroid()
210 CarPropertyValue receivedEvent = propMgr.getProperty(valueClass, in testHvacActionsFromAndroid()
227 List<CarPropertyValue> expectedEvents = getExpectedEvents(CAR_HVAC_TEST_JSON); in testHvacHardButtonOperations()
235 for (CarPropertyValue event : expectedEvents) { in testHvacHardButtonOperations()
262 List<CarPropertyValue> expectedEvents = getExpectedEvents(CAR_INFO_TEST_JSON); in testStaticInfoOperations()
265 for (CarPropertyValue expectedEvent : expectedEvents) { in testStaticInfoOperations()
[all …]
DVhalEventVerifier.java18 import android.car.hardware.CarPropertyValue;
35 private List<CarPropertyValue> mExpectedEvents;
37 private List<CarPropertyValue> mReceivedEvents;
44 VhalEventVerifier(List<CarPropertyValue> expectedEvents) { in VhalEventVerifier()
58 public void verify(CarPropertyValue nextEvent) { in verify()
64 CarPropertyValue expectedEvent = mExpectedEvents.get(mIdx); in verify()
/packages/services/Car/service/src/com/android/car/hal/
DHalPropValue.java27 import android.car.hardware.CarPropertyValue;
186 public CarPropertyValue toCarPropertyValue(int mgrPropId, HalPropConfig config) { in toCarPropertyValue()
284 private CarPropertyValue<?> toCarPropertyValue(int propertyId) { in toCarPropertyValue()
294 } else if (status == CarPropertyValue.STATUS_AVAILABLE) { in toCarPropertyValue()
295 status = CarPropertyValue.STATUS_ERROR; in toCarPropertyValue()
300 } else if (status == CarPropertyValue.STATUS_AVAILABLE) { in toCarPropertyValue()
301 status = CarPropertyValue.STATUS_ERROR; in toCarPropertyValue()
306 } else if (status == CarPropertyValue.STATUS_AVAILABLE) { in toCarPropertyValue()
307 status = CarPropertyValue.STATUS_ERROR; in toCarPropertyValue()
312 } else if (status == CarPropertyValue.STATUS_AVAILABLE) { in toCarPropertyValue()
[all …]
/packages/services/Car/car-lib/src/android/car/hardware/
DCarPropertyValue.java52 public final class CarPropertyValue<T> implements Parcelable { class
104 public CarPropertyValue(int propertyId, int areaId, T value) { in CarPropertyValue() method in CarPropertyValue
132 public CarPropertyValue(int propertyId, int areaId, long timestampNanos, T value) { in CarPropertyValue() method in CarPropertyValue
133 this(propertyId, areaId, CarPropertyValue.STATUS_AVAILABLE, timestampNanos, value); in CarPropertyValue()
142 public CarPropertyValue(int propertyId, int areaId, int status, long timestampNanos, T value) { in CarPropertyValue() method in CarPropertyValue
157 public CarPropertyValue(Parcel in) { in CarPropertyValue() method in CarPropertyValue
180 public static final Creator<CarPropertyValue> CREATOR = new Creator<CarPropertyValue>() {
182 public CarPropertyValue createFromParcel(Parcel in) {
183 return new CarPropertyValue(in);
187 public CarPropertyValue[] newArray(int size) {
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarPropertyServiceUnitTest.java47 import android.car.hardware.CarPropertyValue;
144 private static final CarPropertyValue TEST_PROPERTY_VALUE = new CarPropertyValue(
440 0, WRITE_ONLY_INT_PROPERTY_ID, 0, new CarPropertyValue(WRITE_ONLY_INT_PROPERTY_ID, in testSetPropertiesAsync_noWaitForPropertyUpdate()
469 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue(SPEED_ID, 0, 1)); in testSetPropertiesAsync_mismatchPropertyId()
479 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue( in testSetPropertiesAsync_mismatchAreaId()
500 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue(READ_WRITE_INT_PROPERTY_ID, in testSetPropertiesAsync_nullValueToSet()
511 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue(READ_WRITE_INT_PROPERTY_ID, in testSetPropertiesAsync_mismatchPropertyType()
522 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue(READ_WRITE_INT_PROPERTY_ID, in testSetPropertiesAsync_valueLargerThanMaxValue()
533 0, READ_WRITE_INT_PROPERTY_ID, 0, new CarPropertyValue(READ_WRITE_INT_PROPERTY_ID, in testSetPropertiesAsync_valueSmallerThanMinValue()
628 CarPropertyValue<Float> mValue = in testRegisterUnregisterForContinuousProperty()
[all …]
DCarNightServiceTest.java19 import static android.car.hardware.CarPropertyValue.STATUS_AVAILABLE;
35 import android.car.hardware.CarPropertyValue;
59 private static final CarPropertyValue<Boolean> NIGHT_MODE_PROPERTY_ENABLED =
60 new CarPropertyValue<>(VehicleProperty.NIGHT_MODE, 0, STATUS_AVAILABLE, 1000, true);
61 private static final CarPropertyValue<Boolean> NIGHT_MODE_PROPERTY_DISABLED =
62 new CarPropertyValue<>(VehicleProperty.NIGHT_MODE, 0, STATUS_AVAILABLE, 1000, false);
63 private static final CarPropertyValue<Boolean> NIGHT_MODE_PROPERTY_DISABLED_NO_TIMESTAMP =
64 new CarPropertyValue<>(VehicleProperty.NIGHT_MODE, 0, STATUS_AVAILABLE, 0, false);
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/property/
DCarPropertyServiceClientUnitTest.java31 import android.car.hardware.CarPropertyValue;
69 private static final CarPropertyValue<Integer> GOOD_CAR_PROPERTY_VALUE =
70 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, INTEGER_VALUE_1);
71 private static final CarPropertyValue<Integer> SANITIZED_GOOD_CAR_PROPERTY_VALUE =
72 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
74 private static final CarPropertyValue<Integer> SIMILAR_GOOD_CAR_PROPERTY_VALUE =
75 new CarPropertyValue<>(FIRST_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS,
77 private static final CarPropertyValue<Integer> SECOND_GOOD_CAR_PROPERTY_VALUE =
78 new CarPropertyValue<>(SECOND_PROPERTY_ID, AREA_ID_1, TIMESTAMP_NANOS, INTEGER_VALUE_1);
79 private static final CarPropertyValue<Integer> FRESH_CAR_PROPERTY_VALUE =
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarDrivingRestrictionsTest.java29 import android.car.hardware.CarPropertyValue;
138 CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
144 aidlInjectVehicleSpeedEvent(0.0f, CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
151 CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
159 aidlInjectVehicleSpeedEvent(30.0f, CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
171 aidlInjectVehicleSpeedEvent(0.0f, CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
183 CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
187 aidlInjectVehicleSpeedEvent(-10.0f, CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
201 aidlInjectParkingBrakeEvent(true, CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChange()
215 CarPropertyValue.STATUS_AVAILABLE); in testDrivingStateChangeForMalformedInputs()
[all …]
DCarPropertyEventTest.java21 import android.car.hardware.CarPropertyValue;
39 private static final CarPropertyValue<Float> CAR_PROPERTY_VALUE = new CarPropertyValue<>(
81 CarPropertyValue<Integer> value = new CarPropertyValue<Integer>(FAKE_PROPERTY_ID, in testWriteAndReadEvent()
124 CarPropertyValue<Integer> differentCarPropertyValue = new CarPropertyValue<>(PROPERTY_ID, in equals_returnsFalseForDifferentCarPropertyValues()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/
DHalPropValueTest.java21 import android.car.hardware.CarPropertyValue;
468 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlBool()
490 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlInt32()
509 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlInt32Vec()
527 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlFloat()
546 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlFloatVec()
564 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlInt64()
583 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlInt64Vec()
602 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlBytes()
620 CarPropertyValue propValue = value.toCarPropertyValue( in testToCarPropertyValueFromHidlString()
[all …]
/packages/services/Car/car-lib/src/android/car/hardware/property/
DCarPropertyEvent.java22 import android.car.hardware.CarPropertyValue;
43 private final CarPropertyValue<?> mCarPropertyValue;
58 public CarPropertyValue<?> getCarPropertyValue() { in getCarPropertyValue()
92 public CarPropertyEvent(int eventType, @NonNull CarPropertyValue<?> carPropertyValue) { in CarPropertyEvent()
101 public CarPropertyEvent(int eventType, @NonNull CarPropertyValue<?> carPropertyValue, in CarPropertyEvent()
120 CarPropertyValue<Integer> valueWithErrorCode = new CarPropertyValue<>(propertyId, areaId, in createErrorEventWithErrorCode()
134 mCarPropertyValue = in.readParcelable(CarPropertyValue.class.getClassLoader()); in CarPropertyEvent()
/packages/services/Car/car-lib/src/com/android/car/internal/property/
DContCarPropertyEventTracker.java19 import android.car.hardware.CarPropertyValue;
20 import android.car.hardware.CarPropertyValue.PropertyStatus;
45 private CarPropertyValue<?> mCurrentCarPropertyValue;
71 public CarPropertyValue<?> getCurrentCarPropertyValue() { in getCurrentCarPropertyValue()
87 private CarPropertyValue<?> sanitizeCarPropertyValueByResolution( in sanitizeCarPropertyValueByResolution()
88 CarPropertyValue<?> carPropertyValue) { in sanitizeCarPropertyValueByResolution()
119 return new CarPropertyValue<>(carPropertyValue.getPropertyId(), in sanitizeCarPropertyValueByResolution()
128 public boolean hasUpdate(CarPropertyValue<?> carPropertyValue) { in hasUpdate()
138 CarPropertyValue<?> sanitizedCarPropertyValue = in hasUpdate()
DGetSetValueResult.java21 import android.car.hardware.CarPropertyValue;
38 private final CarPropertyValue mCarPropertyValue;
44 private GetSetValueResult(int requestId, @Nullable CarPropertyValue carPropertyValue, in GetSetValueResult()
56 CarPropertyValue carPropertyValue) { in newGetValueResult()
111 public @Nullable CarPropertyValue getCarPropertyValue() { in getCarPropertyValue()
153CarPropertyValue carPropertyValue = (flg & 0x2) == 0 ? null : (CarPropertyValue) in.readTypedObjec… in GetSetValueResult()
DAsyncPropertyServiceRequest.java22 import android.car.hardware.CarPropertyValue;
44 private final CarPropertyValue mCarPropertyValue;
70 new CarPropertyValue(propertyId, areaId, setPropertyRequest.getValue())); in newSetAsyncRequest()
87 @Nullable CarPropertyValue carPropertyValue) { in AsyncPropertyServiceRequest()
139 public @Nullable CarPropertyValue getCarPropertyValue() { in getCarPropertyValue()
186CarPropertyValue carPropertyValue = (flg & 0x8) == 0 ? null : (CarPropertyValue) in.readTypedObjec… in AsyncPropertyServiceRequest()
DOnChangeCarPropertyEventTracker.java19 import android.car.hardware.CarPropertyValue;
32 private CarPropertyValue<?> mCurrentCarPropertyValue;
44 public CarPropertyValue<?> getCurrentCarPropertyValue() { in getCurrentCarPropertyValue()
50 public boolean hasUpdate(CarPropertyValue<?> carPropertyValue) { in hasUpdate()
DCarPropertyEventTracker.java19 import android.car.hardware.CarPropertyValue;
34 CarPropertyValue<?> getCurrentCarPropertyValue(); in getCurrentCarPropertyValue()
37 boolean hasUpdate(CarPropertyValue<?> carPropertyValue); in hasUpdate()
/packages/services/Car/tests/CarLibUnitTest/src/android/car/hardware/property/
DCarPropertyManagerUnitTest.java58 import android.car.hardware.CarPropertyValue;
185 CarPropertyValue<Integer> value = new CarPropertyValue<>(HVAC_TEMPERATURE_SET, 0, in createErrorCarPropertyEventList()
186 CarPropertyValue.STATUS_AVAILABLE, 0, -1); in createErrorCarPropertyEventList()
194 CarPropertyValue<Float> value = new CarPropertyValue<>(HVAC_TEMPERATURE_SET, 0, 17.0f); in createCarPropertyEventList()
304 CarPropertyValue<Float> value = new CarPropertyValue<>(HVAC_TEMPERATURE_SET, 0, 17.0f); in testGetProperty_returnsValue()
347 CarPropertyValue<Float> value = new CarPropertyValue<>(HVAC_TEMPERATURE_SET, 0, 17.0f); in testGetProperty_syncOpTryAgain()
489 CarPropertyValue<Float> value = new CarPropertyValue<>(HVAC_TEMPERATURE_SET, 0, in testGetProperty_returnsValueWithUnavailableStatusBeforeU()
490 CarPropertyValue.STATUS_UNAVAILABLE, TEST_TIMESTAMP, 17.0f); in testGetProperty_returnsValueWithUnavailableStatusBeforeU()
495 new CarPropertyValue<>(HVAC_TEMPERATURE_SET, /*areaId=*/0, in testGetProperty_returnsValueWithUnavailableStatusBeforeU()
496 CarPropertyValue.STATUS_UNAVAILABLE, TEST_TIMESTAMP, 17.0f)); in testGetProperty_returnsValueWithUnavailableStatusBeforeU()
[all …]
/packages/services/Car/libs/car-test-lib/src/android/car/testapi/
DFakeCarPropertyService.java28 import android.car.hardware.CarPropertyValue;
62 private final Map<PropKey, CarPropertyValue> mValues = new HashMap<>();
67 private final ArrayList<CarPropertyValue<?>> mValuesSet = new ArrayList<>();
165 public CarPropertyValue getProperty(int prop, int zone) throws RemoteException { in getProperty()
170 public void setProperty(CarPropertyValue prop, ICarPropertyEventListener listener) in setProperty()
210 updateValues(false, new CarPropertyValue<>(propId, 0, value)); in addProperty()
218 @Nullable CarPropertyValue<?> value) { in addProperty()
227 public void updateValues(boolean triggerListeners, CarPropertyValue<?>... propValues) { in updateValues()
228 for (CarPropertyValue v : propValues) { in updateValues()
236 private void sendEvent(CarPropertyValue v) { in sendEvent()
[all …]
DCarPropertyController.java21 import android.car.hardware.CarPropertyValue;
43 @Nullable CarPropertyValue<?> value); in addProperty()
49 void updateValues(boolean triggerListeners, CarPropertyValue<?>... propValues); in updateValues()
52 List<CarPropertyValue<?>> getSetValues(); in getSetValues()
/packages/services/Car/service/src/com/android/car/
DCarDrivingStateService.java31 import android.car.hardware.CarPropertyValue;
98 private CarPropertyValue mLastParkingBrake;
100 private CarPropertyValue mLastGear;
102 private CarPropertyValue mLastSpeed;
104 private CarPropertyValue mLastIgnitionState;
358 CarPropertyValue value = event.getCarPropertyValue(); in handlePropertyEventLocked()
439 private static boolean isPropertyStatusAvailable(CarPropertyValue<?> carPropertyValue) { in isPropertyStatusAvailable()
441 && carPropertyValue.getStatus() == CarPropertyValue.STATUS_AVAILABLE; in isPropertyStatusAvailable()
554 CarPropertyValue propertyValue = mPropertyService.getPropertySafe( in updateVehiclePropertiesIfNeededLocked()
566 CarPropertyValue propertyValue = mPropertyService.getPropertySafe( in updateVehiclePropertiesIfNeededLocked()
[all …]

12345