Merge "Build car support lib against the public SDK. This is to prevent ProGuard errors when the built JAR is used in an app. Modify a method call to use the public API argument types."
diff --git a/car-support-lib/Android.mk b/car-support-lib/Android.mk
index bb12a9f..d0052e4 100644
--- a/car-support-lib/Android.mk
+++ b/car-support-lib/Android.mk
@@ -28,6 +28,9 @@
 
 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
 
+# Build against the current public APIs of the SDK
+LOCAL_SDK_VERSION := current
+
 LOCAL_MANIFEST_FILE := AndroidManifest.xml
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
@@ -52,6 +55,7 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := android.support.car
+LOCAL_SDK_VERSION := current
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
 
diff --git a/car-support-lib/src/android/support/car/hardware/CarSensorsProxy.java b/car-support-lib/src/android/support/car/hardware/CarSensorsProxy.java
index 633768a..a0eb482 100644
--- a/car-support-lib/src/android/support/car/hardware/CarSensorsProxy.java
+++ b/car-support-lib/src/android/support/car/hardware/CarSensorsProxy.java
@@ -127,17 +127,17 @@
                 synchronized (CarSensorsProxy.this) {
                     switch (type) {
                         case Sensor.TYPE_GYROSCOPE:
-                            System.arraycopy(event.values, 0, mLastGyroscopeData, 0, 3);
+                            System.arraycopy((Object) event.values, 0, (Object) mLastGyroscopeData, 0, 3);
                             mLastGyroscopeDataTime = System.nanoTime();
                             pushSensorChanges(CarSensorManager.SENSOR_TYPE_GYROSCOPE);
                             break;
                         case Sensor.TYPE_MAGNETIC_FIELD:
-                            System.arraycopy(event.values, 0, mLastMagneticFieldData, 0, 3);
+                            System.arraycopy((Object) event.values, 0, (Object) mLastMagneticFieldData, 0, 3);
                             mLastMagneticFieldDataTime = System.nanoTime();
                             pushSensorChanges(CarSensorManager.SENSOR_TYPE_COMPASS);
                             break;
                         case Sensor.TYPE_ACCELEROMETER:
-                            System.arraycopy(event.values, 0, mLastAccelerometerData, 0, 3);
+                            System.arraycopy((Object) event.values, 0, (Object) mLastAccelerometerData, 0, 3);
                             mLastAccelerometerDataTime = System.nanoTime();
                             pushSensorChanges(CarSensorManager.SENSOR_TYPE_ACCELEROMETER);
                             pushSensorChanges(CarSensorManager.SENSOR_TYPE_COMPASS);