Merge "QS Footer: Don't update icon from wrong thread." into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
aedfa81517
@@ -126,8 +126,8 @@ public class QSFooter implements OnClickListener, DialogInterface.OnClickListene
|
|||||||
? R.drawable.ic_qs_branded_vpn
|
? R.drawable.ic_qs_branded_vpn
|
||||||
: R.drawable.ic_qs_vpn);
|
: R.drawable.ic_qs_vpn);
|
||||||
if (mFooterIconId != footerIconId) {
|
if (mFooterIconId != footerIconId) {
|
||||||
mFooterIcon.setImageResource(footerIconId);
|
|
||||||
mFooterIconId = footerIconId;
|
mFooterIconId = footerIconId;
|
||||||
|
mMainHandler.post(mUpdateIcon);
|
||||||
}
|
}
|
||||||
mIsVisible = mIsIconVisible;
|
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() {
|
private final Runnable mUpdateDisplayState = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
Reference in New Issue
Block a user