summaryrefslogtreecommitdiff
path: root/test-mock
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2018-11-12 15:01:40 -0800
committerDianne Hackborn <hackbod@google.com>2018-11-13 16:03:02 -0800
commit27b4d94a07ac00367ad12b667c983a89153537d8 (patch)
tree6e7786697585c7cbefe705c79ddc83f7eeb85109 /test-mock
parent59805434784886d79c6bdb8253b0aae5351be8d3 (diff)
Implement naming of isolated service bindings.
This allows clients to run multiple instances of the same manifest service declaration. It only works for isolated services, to avoid too much abuse temptation. This is part of the "Chrome site isolation" work, to allow chrome to have many more render processes running and help it manage them. Bug: 111434506 Test: atest CtsAppTestCases:ServiceTest Change-Id: I22e65758678a07075ed32ed6463082ddf846d3a4
Diffstat (limited to 'test-mock')
-rw-r--r--test-mock/api/current.txt1
-rw-r--r--test-mock/src/android/test/mock/MockContext.java7
2 files changed, 8 insertions, 0 deletions
diff --git a/test-mock/api/current.txt b/test-mock/api/current.txt
index fc9b4c6831e8..f91d74a30693 100644
--- a/test-mock/api/current.txt
+++ b/test-mock/api/current.txt
@@ -31,6 +31,7 @@ package android.test.mock {
public class MockContext extends android.content.Context {
ctor public MockContext();
+ method public boolean bindIsolatedService(android.content.Intent, android.content.ServiceConnection, int, java.lang.String);
method public boolean bindService(android.content.Intent, android.content.ServiceConnection, int);
method public int checkCallingOrSelfPermission(java.lang.String);
method public int checkCallingOrSelfUriPermission(android.net.Uri, int);
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java
index fa5b896ea126..66be6d9d9840 100644
--- a/test-mock/src/android/test/mock/MockContext.java
+++ b/test-mock/src/android/test/mock/MockContext.java
@@ -576,6 +576,13 @@ public class MockContext extends Context {
throw new UnsupportedOperationException();
}
+ @Override
+ public boolean bindIsolatedService(Intent service,
+ ServiceConnection conn, int flags,
+ String instanceName) {
+ throw new UnsupportedOperationException();
+ }
+
/** @hide */
@Override
public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,