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

Android 13.0.0 Release 67 (TQ3A.230805.001)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZNFQywAKCRDorT+BmrEO
# eEGeAJ9iELjBi41jxvo1fvcKJf8M1BPMwACeK7uRIo+MGHh6II81USuPEEevRek=
# =Yuyc
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Aug  7 23:15:07 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 1806 signatures in the past
#      21 months.  Encrypted 4 messages in the past 19 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_r67':
  Revert "Grant Launcher permission to access AppSearch"

 Conflicts:
	AndroidManifest-common.xml

Change-Id: I5102d52429c7349a205a0db09d1c0f88f57ed04b
diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index febe10b..18ebcbd 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -44,7 +44,6 @@
     <!-- for rotating surface by arbitrary degree -->
     <uses-permission android:name="android.permission.ROTATE_SURFACE_FLINGER" />
     <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
-    <uses-permission android:name="android.permission.READ_HOME_APP_SEARCH_DATA" />
     <uses-permission android:name="android.permission.USE_BIOMETRIC" />
 
     <!--
diff --git a/src/com/android/launcher3/icons/IconCache.java b/src/com/android/launcher3/icons/IconCache.java
index bc57f66..3c63f26 100644
--- a/src/com/android/launcher3/icons/IconCache.java
+++ b/src/com/android/launcher3/icons/IconCache.java
@@ -100,7 +100,6 @@
     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 @@
         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 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;
     }