Merge branch 'dev/11/fp3/security-aosp-rvc-release' into int/11/fp3

* dev/11/fp3/security-aosp-rvc-release:
  Do not load drawable for wallet card if the card image icon is created with content URI.

Change-Id: I278c010139af791f19253db5b97e0fe0c866e331
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.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 @@
          */
         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);
         }