Update CTS tests for method renaming in ContentSuggestionsService.
Bug: 126702561
Test: atest CtsContentSuggestionsTestCases
Change-Id: I9c7cb9508bbffb6da12c2e783238552198659286
diff --git a/tests/contentsuggestions/src/android/contentsuggestions/cts/ContentSuggestionsManagerTest.java b/tests/contentsuggestions/src/android/contentsuggestions/cts/ContentSuggestionsManagerTest.java
index a8b0777..6415b87 100644
--- a/tests/contentsuggestions/src/android/contentsuggestions/cts/ContentSuggestionsManagerTest.java
+++ b/tests/contentsuggestions/src/android/contentsuggestions/cts/ContentSuggestionsManagerTest.java
@@ -99,7 +99,7 @@
String requestId = "TEST";
mManager.notifyInteraction(requestId, new Bundle());
- verifyService().notifyInteraction(eq(requestId), any());
+ verifyService().onNotifyInteraction(eq(requestId), any());
}
@Test
@@ -107,7 +107,7 @@
int taskId = 1;
mManager.provideContextImage(taskId, new Bundle());
- verifyService().processContextImage(eq(taskId), any(), any());
+ verifyService().onProcessContextImage(eq(taskId), any(), any());
}
@Test
@@ -117,7 +117,7 @@
mManager.suggestContentSelections(request, Executors.newSingleThreadExecutor(), callback);
- verifyService().suggestContentSelections(any(), any());
+ verifyService().onSuggestContentSelections(any(), any());
}
@Test
@@ -129,7 +129,7 @@
mManager.classifyContentSelections(request, Executors.newSingleThreadExecutor(), callback);
- verifyService().classifyContentSelections(any(), any());
+ verifyService().onClassifyContentSelections(any(), any());
}
private CtsContentSuggestionsService verifyService() {
diff --git a/tests/contentsuggestions/src/android/contentsuggestions/cts/CtsContentSuggestionsService.java b/tests/contentsuggestions/src/android/contentsuggestions/cts/CtsContentSuggestionsService.java
index 52444bd..565fac4 100644
--- a/tests/contentsuggestions/src/android/contentsuggestions/cts/CtsContentSuggestionsService.java
+++ b/tests/contentsuggestions/src/android/contentsuggestions/cts/CtsContentSuggestionsService.java
@@ -66,47 +66,48 @@
}
@Override
- public void processContextImage(int taskId, Bitmap contextImage, Bundle extras) {
+ public void onProcessContextImage(int taskId, Bitmap contextImage, Bundle extras) {
if (DEBUG) {
Log.d(TAG,
- "processContextImage() called with: taskId = [" + taskId + "], contextImage = ["
+ "onProcessContextImage() called with: taskId = [" + taskId
+ + "], contextImage = ["
+ contextImage + "], extras = [" + extras + "]");
}
- sWatcher.verifier.processContextImage(taskId, contextImage, extras);
+ sWatcher.verifier.onProcessContextImage(taskId, contextImage, extras);
}
@Override
- public void suggestContentSelections(SelectionsRequest request, SelectionsCallback callback) {
+ public void onSuggestContentSelections(SelectionsRequest request, SelectionsCallback callback) {
if (DEBUG) {
Log.d(TAG,
- "suggestContentSelections() called with: request = [" + request
+ "onSuggestContentSelections() called with: request = [" + request
+ "], callback = ["
+ callback + "]");
}
- sWatcher.verifier.suggestContentSelections(request, callback);
+ sWatcher.verifier.onSuggestContentSelections(request, callback);
}
@Override
- public void classifyContentSelections(ClassificationsRequest request,
+ public void onClassifyContentSelections(ClassificationsRequest request,
ClassificationsCallback callback) {
if (DEBUG) {
Log.d(TAG,
- "classifyContentSelections() called with: request = [" + request
+ "onClassifyContentSelections() called with: request = [" + request
+ "], callback = ["
+ callback + "]");
}
- sWatcher.verifier.classifyContentSelections(request, callback);
+ sWatcher.verifier.onClassifyContentSelections(request, callback);
}
@Override
- public void notifyInteraction(String requestId, Bundle interaction) {
+ public void onNotifyInteraction(String requestId, Bundle interaction) {
if (DEBUG) {
Log.d(TAG,
- "notifyInteraction() called with: requestId = [" + requestId
+ "onNotifyInteraction() called with: requestId = [" + requestId
+ "], interaction = ["
+ interaction + "]");
}
- sWatcher.verifier.notifyInteraction(requestId, interaction);
+ sWatcher.verifier.onNotifyInteraction(requestId, interaction);
}
public static Watcher setWatcher() {