diff options
author | Silin Huang <silin@google.com> | 2023-05-09 05:10:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-09 05:10:28 +0000 |
commit | 11a6dbad7d453564ddcdfb9a0e84db24b33fad5a (patch) | |
tree | c81a30e723cba974be98d9840b8f570e468d0e1e | |
parent | 366ee4d953614cfb93401be6a0303140e09a477d (diff) | |
parent | 7e5be56aace3517d8557fb5e26f7e787228b6f37 (diff) | |
download | QuickAccessWallet-11a6dbad7d453564ddcdfb9a0e84db24b33fad5a.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 am: e30aab3de3 am: 7e5be56aac
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/QuickAccessWallet/+/22956343
Change-Id: I56b605543eb1a6043dbacde4b1845a36b38358aa
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); } |