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

Commit d5aac032 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch 'lineage-19.1' into 'v2.9-s'

March security patch

See merge request e/os/android_frameworks_base!267
parents d55708fd 833e77ac
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
@@ -63,8 +64,6 @@ import com.android.packageinstaller.television.ErrorFragment;
import com.android.packageinstaller.television.UninstallAlertFragment;
import com.android.packageinstaller.television.UninstallAppProgress;

import java.util.List;

/*
 * This activity presents UI to uninstall an application. Usually launched with intent
 * Intent.ACTION_UNINSTALL_PKG_COMMAND and attribute
@@ -172,15 +171,18 @@ public class UninstallerActivity extends Activity {
        if (mDialogInfo.user == null) {
            mDialogInfo.user = android.os.Process.myUserHandle();
        } else {
            UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE);
            List<UserHandle> profiles = userManager.getUserProfiles();
            if (!profiles.contains(mDialogInfo.user)) {
                Log.e(TAG, "User " + android.os.Process.myUserHandle() + " can't request uninstall "
            if (!mDialogInfo.user.equals(Process.myUserHandle())) {
                UserManager userManager = getBaseContext().getSystemService(UserManager.class);
                final boolean isCurrentUserProfileOwner = Process.myUserHandle().equals(
                        userManager.getProfileParent(mDialogInfo.user));
                if (!isCurrentUserProfileOwner) {
                    Log.e(TAG, "User " + Process.myUserHandle() + " can't request uninstall "
                            + "for user " + mDialogInfo.user);
                    showUserIsNotAllowed();
                    return;
                }
            }
        }

        mDialogInfo.callback = intent.getIBinderExtra(PackageInstaller.EXTRA_CALLBACK);

+545 −0

File added.

Preview size limit exceeded, changes collapsed.

+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) {
                mCardViewDrawable = null;
            } else {
            switch (mSelectedCard.getCardImage().getType()) {
                case TYPE_BITMAP:
                case TYPE_ADAPTIVE_BITMAP:
                    mCardViewDrawable = mSelectedCard.getCardImage().loadDrawable(mContext);
                    break;
                case TYPE_URI:
                case TYPE_URI_ADAPTIVE_BITMAP:
                case TYPE_RESOURCE:
                case TYPE_DATA:
                    mCardViewDrawable = null;
                    break;
                default:
                    Log.e(TAG, "Unknown icon type: " + mSelectedCard.getCardImage().getType());
                    mCardViewDrawable = null;
                    break;
            }
            refreshState();
        }
+10 −4
Original line number Diff line number Diff line
@@ -319,13 +319,19 @@ public class WalletScreenController implements
        QAWalletCardViewInfo(Context context, WalletCard walletCard) {
            mWalletCard = walletCard;
            Icon cardImageIcon = mWalletCard.getCardImage();
            if (cardImageIcon.getType() == Icon.TYPE_URI) {
                mCardDrawable = null;
            } else {
            if (cardImageIcon.getType() == Icon.TYPE_BITMAP
                    || cardImageIcon.getType() == Icon.TYPE_ADAPTIVE_BITMAP) {
                mCardDrawable = mWalletCard.getCardImage().loadDrawable(context);
            } else {
                mCardDrawable = null;
            }
            Icon icon = mWalletCard.getCardIcon();
            mIconDrawable = icon == null ? null : icon.loadDrawable(context);
            if (icon != null && (icon.getType() == Icon.TYPE_BITMAP
                    || icon.getType() == Icon.TYPE_ADAPTIVE_BITMAP)) {
                mIconDrawable = icon.loadDrawable(context);
            } else {
                mIconDrawable = null;
            }
        }

        @Override
+5 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading