summaryrefslogtreecommitdiff
path: root/test-mock
diff options
context:
space:
mode:
authorAndrii Kulian <akulian@google.com>2020-01-21 21:41:38 -0800
committerAndrii Kulian <akulian@google.com>2020-01-22 18:30:29 -0800
commit4a316973192b3f60b59d5cc311f8232420bad6c2 (patch)
tree19a7b5234f020f83f8cc04ae6745deeaf2805dc2 /test-mock
parent2175e3ebef2cbcbff79e8d9ed959799d2a9c96ab (diff)
Introduce WindowContext API
Test: atest WmTests CtsWindowManagerDeviceTestCases Bug: 128338354 Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
Diffstat (limited to 'test-mock')
-rw-r--r--test-mock/api/test-current.txt1
-rw-r--r--test-mock/src/android/test/mock/MockContext.java7
2 files changed, 6 insertions, 2 deletions
diff --git a/test-mock/api/test-current.txt b/test-mock/api/test-current.txt
index cc260ac14147..32ca250b6c74 100644
--- a/test-mock/api/test-current.txt
+++ b/test-mock/api/test-current.txt
@@ -2,7 +2,6 @@
package android.test.mock {
public class MockContext extends android.content.Context {
- method public android.view.Display getDisplay();
method public int getDisplayId();
}
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java
index 9d913b9861e5..36074edd187e 100644
--- a/test-mock/src/android/test/mock/MockContext.java
+++ b/test-mock/src/android/test/mock/MockContext.java
@@ -17,6 +17,7 @@
package android.test.mock;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.IApplicationThread;
import android.app.IServiceConnection;
@@ -811,6 +812,11 @@ public class MockContext extends Context {
}
@Override
+ public @NonNull Context createWindowContext(int type) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public boolean isRestricted() {
throw new UnsupportedOperationException();
}
@@ -821,7 +827,6 @@ public class MockContext extends Context {
throw new UnsupportedOperationException();
}
- /** @hide */
@Override
public Display getDisplay() {
throw new UnsupportedOperationException();