From 6e7ab2ee4351b3b37f393e39c30689c876b94039 Mon Sep 17 00:00:00 2001 From: Silin Huang Date: Wed, 18 May 2022 09:55:09 -0700 Subject: [PATCH] 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 --- .../systemui/statusbar/phone/KeyguardBottomAreaView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index fd307df8d304c..414bc84fcd857 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -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(); });