summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Philip P. Moltmann <moltmann@google.com> 2017-05-08 23:06:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-05-08 23:06:31 +0000
commitf51b5f991c5f316c8f34d4cad01e910bce87660c (patch)
tree434bc029c0ffcad8c7f1f0e488a99555d41eef6b
parent7acd87d8d007c4ba02ba42db7ced9a5293dacc64 (diff)
parentde97af1b6cbb8a20eef98bc150b95d4aaae904a4 (diff)
Merge "Read the autofill highlight from rootView context" into oc-dev
-rw-r--r--core/java/android/view/View.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 0af49edfc555..7399f771859a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -20430,9 +20430,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
@Nullable private Drawable getAutofilledDrawable() {
// Lazily load the isAutofilled drawable.
if (mAttachInfo.mAutofilledDrawable == null) {
- TypedArray a = mContext.getTheme().obtainStyledAttributes(AUTOFILL_HIGHLIGHT_ATTR);
+ Context rootContext = getRootView().getContext();
+ TypedArray a = rootContext.getTheme().obtainStyledAttributes(AUTOFILL_HIGHLIGHT_ATTR);
int attributeResourceId = a.getResourceId(0, 0);
- mAttachInfo.mAutofilledDrawable = mContext.getDrawable(attributeResourceId);
+ mAttachInfo.mAutofilledDrawable = rootContext.getDrawable(attributeResourceId);
a.recycle();
}