Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32a1305c authored by Steven Ng's avatar Steven Ng
Browse files

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
parent 375467b8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;