Merge "Check for mAttachInfo nullness when getting the autofillable drawable." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-16 19:38:32 +00:00
committed by Android (Google) Code Review

View File

@@ -20506,6 +20506,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @throws IllegalStateException if the drawable could not be found. * @throws IllegalStateException if the drawable could not be found.
*/ */
@Nullable private Drawable getAutofilledDrawable() { @Nullable private Drawable getAutofilledDrawable() {
if (mAttachInfo == null) {
return null;
}
// Lazily load the isAutofilled drawable. // Lazily load the isAutofilled drawable.
if (mAttachInfo.mAutofilledDrawable == null) { if (mAttachInfo.mAutofilledDrawable == null) {
Context rootContext = getRootView().getContext(); Context rootContext = getRootView().getContext();