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

Commit 38fd7cde authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by Android (Google) Code Review
Browse files

Merge "Fix TextView potential NPE in isLayoutRtl()"

parents 85284fbc 83fa41b0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -4144,11 +4144,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    @Override
    public boolean isLayoutRtl(Drawable who) {
        if (who == null) return false;
        final TextView.Drawables drawables = mDrawables;
        if (mDrawables != null) {
            final Drawables drawables = mDrawables;
            if (who == drawables.mDrawableLeft || who == drawables.mDrawableRight ||
                who == drawables.mDrawableTop || who == drawables.mDrawableBottom) {
                return isLayoutRtl();
            }
        }
        return super.isLayoutRtl(who);
    }