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

Unverified Commit a2180205 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r75' into staging/lineage-20.0_merge-android-13.0.0_r75

Android 13.0.0 release 75

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZQiSygAKCRDorT+BmrEO
# eHLXAJ9OoTXtOPbCnWT9kEhGaO+nmhumUQCfebQzP9iyQKU3owD762UE4OGh2ic=
# =+Vja
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Sep 18 21:11:22 2023 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1890 signatures in the past
#      22 months.  Encrypted 4 messages in the past 20 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Pinyao Ting
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r75':
  [RESTRICT AUTOMERGE] Fix permission issue in legacy shortcut

Change-Id: I8419027e799dbd1953eaa4318d16daa0b8c27ea0
parents 80cbcb47 3d9a6af3
Loading
Loading
Loading
Loading
+11 −23
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ public class IconCache extends BaseIconCache {
    private final UserCache mUserManager;
    private final InstantAppResolver mInstantAppResolver;
    private final IconProvider mIconProvider;
    private final HandlerRunnable mCancelledRunnable;

    private final SparseArray<BitmapInfo> mWidgetCategoryBitmapInfos;

@@ -122,10 +121,6 @@ public class IconCache extends BaseIconCache {
        mInstantAppResolver = InstantAppResolver.newInstance(mContext);
        mIconProvider = iconProvider;
        mWidgetCategoryBitmapInfos = new SparseArray<>();

        mCancelledRunnable = new HandlerRunnable(
                mWorkerHandler, () -> null, MAIN_EXECUTOR, c -> { });
        mCancelledRunnable.cancel();
    }

    @Override
@@ -181,30 +176,23 @@ public class IconCache extends BaseIconCache {
    public HandlerRunnable updateIconInBackground(final ItemInfoUpdateReceiver caller,
            final ItemInfoWithIcon info) {
        Preconditions.assertUIThread();
        Supplier<ItemInfoWithIcon> task;
        if (info instanceof AppInfo || info instanceof WorkspaceItemInfo) {
            task = () -> {
                getTitleAndIcon(info, false);
                return info;
            };
        } else if (info instanceof PackageItemInfo) {
            task = () -> {
                getTitleAndIconForApp((PackageItemInfo) info, false);
                return info;
            };
        } else {
            Log.i(TAG, "Icon update not supported for "
                    + info == null ? "null" : info.getClass().getName());
            return mCancelledRunnable;
        }

        if (mPendingIconRequestCount <= 0) {
            MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND);
        }
        mPendingIconRequestCount++;

        HandlerRunnable<ItemInfoWithIcon> request = new HandlerRunnable<>(mWorkerHandler,
                task, MAIN_EXECUTOR, caller::reapplyItemInfo, this::onIconRequestEnd);
                () -> {
                    if (info instanceof AppInfo || info instanceof WorkspaceItemInfo) {
                        getTitleAndIcon(info, false);
                    } else if (info instanceof PackageItemInfo) {
                        getTitleAndIconForApp((PackageItemInfo) info, false);
                    }
                    return info;
                },
                MAIN_EXECUTOR,
                caller::reapplyItemInfo,
                this::onIconRequestEnd);
        Utilities.postAsyncCallback(mWorkerHandler, request);
        return request;
    }