Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b3fd07b authored by Brad Lassey's avatar Brad Lassey Committed by Android (Google) Code Review
Browse files

Merge "Check access permission for QuickAccessWalletTile icon." into main

parents 5aa3adcf b24d52e9
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -16,8 +16,13 @@

package com.android.systemui.qs.tiles;

import static android.graphics.drawable.Icon.TYPE_URI;
import static android.provider.Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT;
import static android.graphics.drawable.Icon.TYPE_URI;
import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP;
import static android.graphics.drawable.Icon.TYPE_RESOURCE;
import static android.graphics.drawable.Icon.TYPE_BITMAP;
import static android.graphics.drawable.Icon.TYPE_ADAPTIVE_BITMAP;
import static android.graphics.drawable.Icon.TYPE_DATA;

import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.DEFAULT_PAYMENT_APP_CHANGE;
import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.DEFAULT_WALLET_APP_CHANGE;
@@ -237,11 +242,21 @@ public class QuickAccessWalletTile extends QSTileImpl<QSTile.State> {
                return;
            }
            mSelectedCard = cards.get(selectedIndex);
            android.graphics.drawable.Icon cardImageIcon = mSelectedCard.getCardImage();
            if (cardImageIcon.getType() == TYPE_URI) {
            switch (mSelectedCard.getCardImage().getType()) {
                case TYPE_URI:
                case TYPE_URI_ADAPTIVE_BITMAP:
                    mCardViewDrawable = null;
            } else {
                    break;
                case TYPE_RESOURCE:
                case TYPE_BITMAP:
                case TYPE_ADAPTIVE_BITMAP:
                case TYPE_DATA:
                    mCardViewDrawable = mSelectedCard.getCardImage().loadDrawable(mContext);
                    break;
                default:
                    Log.e(TAG, "Unknown icon type: " + mSelectedCard.getCardImage().getType());
                    mCardViewDrawable = null;
                    break;
            }
            refreshState();
        }