Modified the tests to address the API changes

Bug: 176851064
Test: Test changes

Change-Id: I3f29901f767e758638ad63ae96d417d12e2a500f
diff --git a/tests/smartspace/src/android/smartspace/cts/SmartspaceManagerTest.java b/tests/smartspace/src/android/smartspace/cts/SmartspaceManagerTest.java
index 936a835..8177a99 100644
--- a/tests/smartspace/src/android/smartspace/cts/SmartspaceManagerTest.java
+++ b/tests/smartspace/src/android/smartspace/cts/SmartspaceManagerTest.java
@@ -101,7 +101,7 @@
     @After
     public void tearDown() throws Exception {
         Log.d(TAG, "Starting tear down, watcher is: " + mWatcher);
-        mClient.destroy();
+        mClient.close();
         setService(null);
         await(mWatcher.destroyed, "Waiting for onDestroy()");
 
@@ -118,7 +118,7 @@
     @Test
     public void testDestroySession() {
         SmartspaceSession localClient = createSmartspaceSession(createSmartspaceConfig("surface"));
-        localClient.destroy();
+        localClient.close();
         await(mWatcher.destroyed, "Waiting for onDestroy()");
     }
 
@@ -131,7 +131,7 @@
                 SmartspaceTargetEvent.EVENT_TARGET_INTERACTION).setSmartspaceTarget(
                 testTarget).setSmartspaceActionId("id").build();
         mClient.notifySmartspaceEvent(testEvent);
-        mClient.registerSmartspaceUpdates(Executors.newSingleThreadExecutor(),
+        mClient.addOnTargetsAvailableListener(Executors.newSingleThreadExecutor(),
                 targets -> {
                     if (targets.size() > 0 && targets.get(0).equals(testTarget)) {
                         mWatcher.queried.countDown();
@@ -156,14 +156,14 @@
         SmartspaceSession client1 = createSmartspaceSession(config1);
         SmartspaceConfig config2 = createSmartspaceConfig("surface 2");
         SmartspaceSession client2 = createSmartspaceSession(config2);
-        client1.registerSmartspaceUpdates(Executors.newSingleThreadExecutor(),
+        client1.addOnTargetsAvailableListener(Executors.newSingleThreadExecutor(),
                 targets -> {
                     // Counting down only if the returned list only contains test target.
                     if (targets.size() > 0 && targets.get(0).equals(testTarget)) {
                         mWatcher.queriedTwice.countDown();
                     }
                 });
-        client2.registerSmartspaceUpdates(Executors.newSingleThreadExecutor(),
+        client2.addOnTargetsAvailableListener(Executors.newSingleThreadExecutor(),
                 targets -> {
                     // Counting down only if the returned list is empty.
                     if (targets.isEmpty()) {
@@ -267,7 +267,7 @@
         }
     }
 
-    private static class RequestVerifier implements SmartspaceSession.Callback {
+    private static class RequestVerifier implements SmartspaceSession.OnTargetsAvailableListener {
         @Override
         public void onTargetsAvailable(List<SmartspaceTarget> targets) {