Snap for 4818837 from 798359b6b13a92fbeb247ef274dd48026f8a66cd to pi-release
Change-Id: Iafe90b380836d9688bb586d6946372a409abd30c
diff --git a/src/com/android/car/hvac/LocalHvacPropertyService.java b/src/com/android/car/hvac/LocalHvacPropertyService.java
index f879f15..8be525c 100644
--- a/src/com/android/car/hvac/LocalHvacPropertyService.java
+++ b/src/com/android/car/hvac/LocalHvacPropertyService.java
@@ -15,6 +15,13 @@
*/
package com.android.car.hvac;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
import android.car.VehicleAreaSeat;
import android.car.VehicleAreaType;
import android.car.VehicleAreaWindow;
@@ -28,12 +35,6 @@
import android.os.RemoteException;
import android.util.Pair;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
/**
* A local {@link ICarProperty} that is used to mock up data for HVAC.
*/
@@ -87,12 +88,12 @@
private final IBinder mCarPropertyService = new ICarProperty.Stub(){
@Override
- public void registerListener(ICarPropertyEventListener listener) throws RemoteException {
+ public void registerListener(int propId, float rate, ICarPropertyEventListener listener) throws RemoteException {
mListeners.add(listener);
}
@Override
- public void unregisterListener(ICarPropertyEventListener listener) throws RemoteException {
+ public void unregisterListener(int propId, ICarPropertyEventListener listener) throws RemoteException {
mListeners.remove(listener);
}
@@ -110,8 +111,9 @@
public void setProperty(CarPropertyValue prop) throws RemoteException {
mProperties.put(new Pair(prop.getPropertyId(), prop.getAreaId()), prop.getValue());
for (ICarPropertyEventListener listener : mListeners) {
- listener.onEvent(
- new CarPropertyEvent(CarPropertyEvent.PROPERTY_EVENT_PROPERTY_CHANGE, prop));
+ LinkedList<CarPropertyEvent> l = new LinkedList<>();
+ l.add(new CarPropertyEvent(CarPropertyEvent.PROPERTY_EVENT_PROPERTY_CHANGE, prop));
+ listener.onEvent(l);
}
}
};