diff options
| author | Charles Chen <charlesccchen@google.com> | 2020-06-10 15:49:51 +0800 |
|---|---|---|
| committer | Charles Chen <charlesccchen@google.com> | 2020-06-23 03:45:17 +0800 |
| commit | d2fd037ab3fabdb90627b6eee2d2aa7c35773dc3 (patch) | |
| tree | 24e07cbc4e06a8021563fa7cf5e5a9a0196208eb /core/java/android/view/ViewConfiguration.java | |
| parent | 316f0d3604152b2444dd1feab3d95c12895c9096 (diff) | |
Enable IMS and its config context to obtain UI component
Test: atest StrictModeTest
Bug: 157027563
Change-Id: I172ceb2e17722a7cba917a6e3a808d7559cad3e0
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
| -rw-r--r-- | core/java/android/view/ViewConfiguration.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 0d2d4d13eb38..ffeeb806ba54 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -500,12 +500,13 @@ public class ViewConfiguration { */ public static ViewConfiguration get(Context context) { if (!context.isUiContext() && vmIncorrectContextUseEnabled()) { - final String errorMessage = "Tried to access UI constants from a non-visual Context."; + final String errorMessage = "Tried to access UI constants from a non-visual Context:" + + context; final String message = "UI constants, such as display metrics or window metrics, " + "must be accessed from Activity or other visual Context. " + "Use an Activity or a Context created with " + "Context#createWindowContext(int, Bundle), which are adjusted to the " - + "configuration and visual bounds of an area on screen."; + + "configuration and visual bounds of an area on screen"; final Exception exception = new IllegalArgumentException(errorMessage); StrictMode.onIncorrectContextUsed(message, exception); Log.e(TAG, errorMessage + message, exception); |
