Merge "Revert "Band-aid for getHomeActivities returning null"" into sc-v2-dev am: fc88784f8d am: 90cedcc741

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15732511

Change-Id: I2fd4bf13a7a6b74e7fa68793be62be928e6cc5e0
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index 780032e..0efe666 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -33,11 +33,8 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
-import android.os.SystemClock;
-import android.util.Log;
 import android.util.SparseIntArray;
 
-import com.android.launcher3.testing.TestProtocol;
 import com.android.launcher3.tracing.OverviewComponentObserverProto;
 import com.android.launcher3.tracing.TouchInteractionServiceProto;
 import com.android.launcher3.util.SimpleBroadcastReceiver;
@@ -132,16 +129,6 @@
     private void updateOverviewTargets() {
         ComponentName defaultHome = PackageManagerWrapper.getInstance()
                 .getHomeActivities(new ArrayList<>());
-        if (TestProtocol.sDebugTracing && defaultHome == null) {
-            Log.d(TestProtocol.THIRD_PARTY_LAUNCHER_NOT_SET, "getHomeActivities returned null");
-            while ((defaultHome =
-                    PackageManagerWrapper.getInstance().getHomeActivities(new ArrayList<>()))
-                    == null) {
-                SystemClock.sleep(10);
-            }
-            Log.d(TestProtocol.THIRD_PARTY_LAUNCHER_NOT_SET,
-                    "getHomeActivities returned non-null: " + defaultHome);
-        }
 
         mIsHomeDisabled = mDeviceState.isHomeDisabled();
         mIsDefaultHome = Objects.equals(mMyHomeIntent.getComponent(), defaultHome);
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index c484811..42a38b6 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -117,7 +117,6 @@
     public static final String PERMANENT_DIAG_TAG = "TaplTarget";
     public static final String WORK_PROFILE_REMOVED = "b/159671700";
     public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015";
-    public static final String THIRD_PARTY_LAUNCHER_NOT_SET = "b/187080582";
     public static final String TASK_VIEW_ID_CRASH = "b/195430732";
     public static final String L3_SWIPE_TO_HOME = "b/192018189";
 }