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

Commit 8739de66 authored by Adam Cohen's avatar Adam Cohen Committed by Android Git Automerger
Browse files

am 18bbc6a0: Adding workaround for issue with null drawable

* commit '18bbc6a0':
  Adding workaround for issue with null drawable
parents 6bd73154 18bbc6a0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -49,6 +49,13 @@ public class InfoDropTarget extends ButtonDropTarget {
        Resources r = getResources();
        mHoverColor = r.getColor(R.color.info_target_hover_tint);
        mDrawable = (TransitionDrawable) getCurrentDrawable();

        if (mDrawable == null) {
            // TODO: investigate why this is ever happening. Presently only on one known device.
            mDrawable = r.getDrawable(R.drawable.info_target_selector);
            setCompoundDrawablesRelativeWithIntrinsicBounds(mDrawable, null, null, null);
        }

        if (null != mDrawable) {
            mDrawable.setCrossFadeEnabled(true);
        }