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

Commit 5e888e93 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

QS Footer: Don't update icon from wrong thread. am: f9c6026a am: b10b5127

am: d1e62a4f

Change-Id: I5a3bd0c58ecd2e3d39de882c692ab9eb0da5f2b3
parents 20a882c8 d1e62a4f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -126,8 +126,8 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene
                ? R.drawable.ic_qs_branded_vpn
                : R.drawable.ic_qs_vpn);
            if (mFooterIconId != footerIconId) {
                mFooterIcon.setImageResource(footerIconId);
                mFooterIconId = footerIconId;
                mMainHandler.post(mUpdateIcon);
            }
            mIsVisible = mIsIconVisible;
        }
@@ -207,6 +207,13 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene
        }
    }

    private final Runnable mUpdateIcon = new Runnable() {
        @Override
        public void run() {
            mFooterIcon.setImageResource(mFooterIconId);
        }
    };

    private final Runnable mUpdateDisplayState = new Runnable() {
        @Override
        public void run() {