Fix a crash on the lock screen wallet icon.

Setting image drawable on the wallet button should be in UI thread.

Test: manual
Bug: 232969910
Change-Id: If25ef2270845074b122245be3a45f8e5080356ce
This commit is contained in:
Silin Huang
2022-05-18 09:55:09 -07:00
parent c3b917ad97
commit 6e7ab2ee43

View File

@@ -1195,10 +1195,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
public void onWalletCardsRetrieved(@NonNull GetWalletCardsResponse response) {
mHasCard = !response.getWalletCards().isEmpty();
Drawable tileIcon = mQuickAccessWalletController.getWalletClient().getTileIcon();
if (tileIcon != null) {
mWalletButton.setImageDrawable(tileIcon);
}
post(() -> {
if (tileIcon != null) {
mWalletButton.setImageDrawable(tileIcon);
}
updateWalletVisibility();
updateAffordanceColors();
});