diff options
author | Bo Liu <boliu@google.com> | 2019-03-06 20:21:45 +0000 |
---|---|---|
committer | Bo Liu <boliu@google.com> | 2019-03-06 20:21:45 +0000 |
commit | 58a57667e4d84927f29efb9228e7844bac7937e9 (patch) | |
tree | 05ac601075122074ce1ac7d2d6de163d16c2bfd4 /test-runner | |
parent | f278d267f5f29db63e5f488f32984fe73949d4b4 (diff) | |
download | base-58a57667e4d84927f29efb9228e7844bac7937e9.tar.gz |
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-runner')
-rw-r--r-- | test-runner/src/android/test/IsolatedContext.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test-runner/src/android/test/IsolatedContext.java b/test-runner/src/android/test/IsolatedContext.java index 73db4517e130..dd4a9a3a4d69 100644 --- a/test-runner/src/android/test/IsolatedContext.java +++ b/test-runner/src/android/test/IsolatedContext.java @@ -17,13 +17,13 @@ package android.test; import android.accounts.AccountManager; -import android.content.ContextWrapper; +import android.content.BroadcastReceiver; import android.content.ContentResolver; -import android.content.Intent; import android.content.Context; -import android.content.ServiceConnection; -import android.content.BroadcastReceiver; +import android.content.ContextWrapper; +import android.content.Intent; import android.content.IntentFilter; +import android.content.ServiceConnection; import android.content.pm.PackageManager; import android.net.Uri; import android.test.mock.MockAccountManager; @@ -31,6 +31,7 @@ import android.test.mock.MockAccountManager; import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.Executor; /** @@ -75,8 +76,14 @@ public class IsolatedContext extends ContextWrapper { } @Override - public boolean bindIsolatedService(Intent service, ServiceConnection conn, int flags, - String instanceName) { + public boolean bindService(Intent service, int flags, Executor executor, + ServiceConnection conn) { + return false; + } + + @Override + public boolean bindIsolatedService(Intent service, int flags, String instanceName, + Executor executor, ServiceConnection conn) { return false; } |