Check for mAttachInfo nullness when getting the autofillable drawable.

Test: manual verification on Caviar (automated test will be added later)
Test: CtsAutoFillServiceTestCases pass

Bug: 38341498
Fixes:  38323841

Change-Id: I15cc792de87987cc19a229c2ab2dfc317877f7ec
This commit is contained in:
Felipe Leme
2017-05-16 10:37:33 -07:00
parent 1827f12b50
commit 354587a972

View File

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