Follow RegisteredServicesCache API changes.

Bug: 7276595
Change-Id: I6064684380b7bbbec87c2345f782931d731ad5cb
diff --git a/apps/Development/src/com/android/development/SyncAdapterDriver.java b/apps/Development/src/com/android/development/SyncAdapterDriver.java
index 3a21903..1bf27ae 100644
--- a/apps/Development/src/com/android/development/SyncAdapterDriver.java
+++ b/apps/Development/src/com/android/development/SyncAdapterDriver.java
@@ -35,6 +35,7 @@
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
+import android.os.UserHandle;
 import android.widget.ArrayAdapter;
 import android.widget.AdapterView;
 import android.widget.Spinner;
@@ -88,14 +89,9 @@
         mSyncAdaptersCache.setListener(this, null /* Handler */);
     }
 
-    protected void onDestroy() {
-        mSyncAdaptersCache.close();
-        super.onDestroy();
-    }
-
     private void getSyncAdapters() {
         Collection<RegisteredServicesCache.ServiceInfo<SyncAdapterType>> all =
-                mSyncAdaptersCache.getAllServices();
+                mSyncAdaptersCache.getAllServices(UserHandle.myUserId());
         synchronized (mSyncAdaptersLock) {
             mSyncAdapters = new Object[all.size()];
             String[] names = new String[mSyncAdapters.length];
@@ -201,7 +197,7 @@
         updateUi();
     }
 
-    public void onServiceChanged(SyncAdapterType type, boolean removed) {
+    public void onServiceChanged(SyncAdapterType type, int userId, boolean removed) {
         getSyncAdapters();
     }