onDrawScrollIndicators returns early if the view isn't attached
Test: Install a test app that can reproduce the null pointer
exception. Flash and install a build with this CL. Null
pointer exception can no longer be observed.
Bug: 183386115
Change-Id: Iab155dfca20e0119cc401d111ace23e416e93b93
This commit is contained in:
@@ -19782,6 +19782,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAttachInfo == null) {
|
||||
// View is not attached.
|
||||
return;
|
||||
}
|
||||
|
||||
final int h = dr.getIntrinsicHeight();
|
||||
final int w = dr.getIntrinsicWidth();
|
||||
final Rect rect = mAttachInfo.mTmpInvalRect;
|
||||
|
||||
Reference in New Issue
Block a user