Implemented CarVendorExtensionManager
Also, some refactoring like omitting excessive
synchronization and reworked takeSupportedProperties from
being exception driven in PropertyHalServiceBase.
Change switch/case statement to SparseIntArray, it has
some maintanance and performance benefits.
Change-Id: Ie9e9239718d6fb50801a616b823a20567237ac95
Fix: b/28244032
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index 7e09ac1..866d223 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -33,6 +33,7 @@
field public static final java.lang.String RADIO_SERVICE = "radio";
field public static final java.lang.String SENSOR_SERVICE = "sensor";
field public static final java.lang.String TEST_SERVICE = "car-service-test";
+ field public static final java.lang.String VENDOR_EXTENSION_SERVICE = "vendor_extension";
field public static final int VERSION = 1; // 0x1
}
@@ -567,6 +568,21 @@
method public abstract void onSensorChanged(android.car.hardware.CarSensorEvent);
}
+ public class CarVendorExtensionManager {
+ method public E getGlobalProperty(java.lang.Class<E>, int) throws android.car.CarNotConnectedException;
+ method public java.util.List<android.car.hardware.CarPropertyConfig> getProperties() throws android.car.CarNotConnectedException;
+ method public E getProperty(java.lang.Class<E>, int, int) throws android.car.CarNotConnectedException;
+ method public void registerListener(android.car.hardware.CarVendorExtensionManager.CarVendorExtensionListener) throws android.car.CarNotConnectedException;
+ method public void setGlobalProperty(java.lang.Class<E>, int, E) throws android.car.CarNotConnectedException;
+ method public void setProperty(java.lang.Class<E>, int, int, E) throws android.car.CarNotConnectedException;
+ method public void unregisterListener(android.car.hardware.CarVendorExtensionManager.CarVendorExtensionListener) throws android.car.CarNotConnectedException;
+ }
+
+ public static abstract interface CarVendorExtensionManager.CarVendorExtensionListener {
+ method public abstract void onChangeEvent(android.car.hardware.CarPropertyValue);
+ method public abstract void onErrorEvent(int, int);
+ }
+
}
package android.car.hardware.cabin {