android.support.car api updates
Jason Tholstrup [Fri, 4 Nov 2016 00:28:50 +0000 (17:28 -0700)]
Test: make -j64 dist (batland)

Change-Id: I5024e06d43b86cb0bc3f016da64fe07e8d28ec9e

src/com/android/car/hvac/HvacController.java

index d6c2397..38e5397 100644 (file)
@@ -30,7 +30,7 @@ import android.util.Log;
 
 import android.support.car.Car;
 import android.support.car.CarNotConnectedException;
-import android.support.car.ServiceConnectionCallback;
+import android.support.car.CarConnectionCallback;
 
 import com.android.car.vehiclenetwork.VehicleNetworkConsts.VehicleHvacFanDirection;
 import com.android.car.vehiclenetwork.VehicleNetworkConsts.VehicleSeat;
@@ -123,7 +123,7 @@ public class HvacController extends Service {
                 return;
             }
 
-            mCarApiClient = Car.createCar(this, mServiceConnectionCallback);
+            mCarApiClient = Car.createCar(this, mCarConnectionCallback);
             mCarApiClient.connect();
         }
     }
@@ -174,10 +174,10 @@ public class HvacController extends Service {
 
     }
 
-    private final ServiceConnectionCallback mServiceConnectionCallback =
-            new ServiceConnectionCallback() {
+    private final CarConnectionCallback mCarConnectionCallback =
+            new CarConnectionCallback() {
                 @Override
-                public void onServiceConnected() {
+                public void onConnected(Car car) {
                     synchronized (mHvacManagerReady) {
                         try {
                             initHvacManager((CarHvacManager) mCarApiClient.getCarManager(
@@ -190,11 +190,7 @@ public class HvacController extends Service {
                 }
 
                 @Override
-                public void onServiceDisconnected() {
-                }
-
-                @Override
-                public void onServiceConnectionFailed() {
+                public void onDisconnected(Car car) {
                 }
             };