diff options
| -rw-r--r-- | core/java/android/view/View.java | 5 |
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(); } |