diff options
author | Silin Huang <silin@google.com> | 2023-05-09 03:39:30 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-09 03:39:30 +0000 |
commit | e30aab3de3bc28569cc8e857c784153ff7f313f8 (patch) | |
tree | 0906ef56f00fd4ced12976962c91bac79eccf51e | |
parent | 1712c51f956a91347c3140cb21ae2a85a779b7ad (diff) | |
parent | bc0243e70959fd0474cd3cbf9c1ae4b0ec9ab664 (diff) | |
download | QuickAccessWallet-e30aab3de3bc28569cc8e857c784153ff7f313f8.tar.gz |
Do not load drawable for wallet card if the card image icon is created am: 3628485241 am: e2082b91e3 am: 7c410c265e am: eabcba2e69 am: bc0243e709
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/QuickAccessWallet/+/22956343
Change-Id: I340b728d90352e1e0c7c1fe9789d2051f721bfe4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java b/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java index 22165d4..4e9ce4f 100644 --- a/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java +++ b/src/com/android/systemui/plugin/globalactions/wallet/WalletPanelViewController.java @@ -24,6 +24,7 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.os.Handler; +import android.os.UserHandle; import android.os.Looper; import android.service.quickaccesswallet.GetWalletCardsError; import android.service.quickaccesswallet.GetWalletCardsRequest; @@ -361,7 +362,14 @@ public class WalletPanelViewController implements */ QAWalletCardViewInfo(WalletCard walletCard) { mWalletCard = walletCard; - mCardDrawable = mWalletCard.getCardImage().loadDrawable(mPluginContext); + Icon cardImage = mWalletCard.getCardImage(); + if (cardImage.getType() == Icon.TYPE_URI) { + // Do not allow icon created with content URI. + mCardDrawable = null; + } else { + mCardDrawable = + mWalletCard.getCardImage().loadDrawable(mPluginContext); + } Icon icon = mWalletCard.getCardIcon(); mIconDrawable = icon == null ? null : icon.loadDrawable(mPluginContext); } |