Merge "QS Footer: Don't update icon from wrong thread." into nyc-mr1-dev

This commit is contained in:
TreeHugger Robot
2016-08-15 19:25:45 +00:00
committed by Android (Google) Code Review

View File

@@ -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() {