summaryrefslogtreecommitdiff
path: root/test-mock
diff options
context:
space:
mode:
authorBo Liu <boliu@google.com>2019-03-06 20:21:45 +0000
committerBo Liu <boliu@google.com>2019-03-06 20:21:45 +0000
commit58a57667e4d84927f29efb9228e7844bac7937e9 (patch)
tree05ac601075122074ce1ac7d2d6de163d16c2bfd4 /test-mock
parentf278d267f5f29db63e5f488f32984fe73949d4b4 (diff)
Add Context.bindService with executor parameter
Allow app to control the thread where ServiceConnection methods are called on. Bug: 111434506 Test: Used new bindContext method in chrome and checked callbacks are on the correct thread. Change-Id: I480e5bd6773a530fb9e8e73e3a2a2a88b76569ec
Diffstat (limited to 'test-mock')
-rw-r--r--test-mock/src/android/test/mock/MockContext.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java
index ae6cd29fb2de..a95b6f11e98a 100644
--- a/test-mock/src/android/test/mock/MockContext.java
+++ b/test-mock/src/android/test/mock/MockContext.java
@@ -577,9 +577,14 @@ public class MockContext extends Context {
}
@Override
- public boolean bindIsolatedService(Intent service,
- ServiceConnection conn, int flags,
- String instanceName) {
+ public boolean bindService(Intent service, int flags, Executor executor,
+ ServiceConnection conn) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean bindIsolatedService(Intent service, int flags, String instanceName,
+ Executor executor, ServiceConnection conn) {
throw new UnsupportedOperationException();
}