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

Commit e035a551 authored by Brad Lassey's avatar Brad Lassey Committed by Android Build Coastguard Worker
Browse files

Check access permission for QuickAccessWalletTile icon.

Bug: 290365279
Flag: EXEMPT bugfix
Test: tested against POC
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b24d52e9e610dd0cd3e8e81c2286fd37d0abe98b)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c7be41ba02273aaed99dfe3fd128746fd6daa2ba)
Merged-In: Ica8cd4f0ba6d3af91594f015cd96dccdb79f5c49
Change-Id: Ica8cd4f0ba6d3af91594f015cd96dccdb79f5c49
parent 10cfc013
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;

@@ -241,11 +246,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();
        }