diff options
author | Charles Chen <charlesccchen@google.com> | 2021-02-03 12:12:28 +0800 |
---|---|---|
committer | Charles Chen <charlesccchen@google.com> | 2021-04-07 21:58:42 +0800 |
commit | d12be75275d2b4e244e72c4382720b76a53d1084 (patch) | |
tree | 7ca18d6e231b12f4770d158ce1c53def11f71937 /test-mock | |
parent | 57f2f51eb679e7026972212deed6813eeaa58411 (diff) |
Allow config context to inflate views
Besides UI contexts, the context created via
Context#createConfigurationContext with a proper configuration
should be allowed to inflate views or obtain ViewConfiguration.
An example is that a wear device inflate views into bitmap and pass
the bitmap to the Wear OS Companion app on the phone.
Bug: 177847640
Test: atest StrictModeTest
Change-Id: Iab232a80a973f54bf0484262d45af3e4c2f0e5dc
Diffstat (limited to 'test-mock')
-rw-r--r-- | test-mock/src/android/test/mock/MockContext.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java index 5391bd8642d5..65aa9aed8f99 100644 --- a/test-mock/src/android/test/mock/MockContext.java +++ b/test-mock/src/android/test/mock/MockContext.java @@ -950,4 +950,10 @@ public class MockContext extends Context { public boolean isUiContext() { throw new UnsupportedOperationException(); } + + /** {@hide} */ + @Override + public boolean isConfigurationContext() { + throw new UnsupportedOperationException(); + } } |