DO NOT MERGE Change sorting strategy when DO state changes in app launcher.
am: 23a06a15ae

Change-Id: I632e566efb99b480be8ca4ee5def14752d865714
diff --git a/src/com/android/car/carlauncher/AppGridAdapter.java b/src/com/android/car/carlauncher/AppGridAdapter.java
index 2852a08..4f6e34a 100644
--- a/src/com/android/car/carlauncher/AppGridAdapter.java
+++ b/src/com/android/car/carlauncher/AppGridAdapter.java
@@ -121,11 +121,7 @@
 
     private void sortAllApps() {
         if (mApps != null) {
-            Comparator<AppMetaData> comparator =
-                    mIsDistractionOptimizationRequired
-                            ? AppLauncherUtils.DISTRACTION_OPTIMIZED_COMPARATOR
-                            : AppLauncherUtils.ALPHABETICAL_COMPARATOR;
-            Collections.sort(mApps, comparator);
+            Collections.sort(mApps, AppLauncherUtils.ALPHABETICAL_COMPARATOR);
         }
     }
 }
\ No newline at end of file
diff --git a/src/com/android/car/carlauncher/AppLauncherUtils.java b/src/com/android/car/carlauncher/AppLauncherUtils.java
index e48d23e..30e4ae6 100644
--- a/src/com/android/car/carlauncher/AppLauncherUtils.java
+++ b/src/com/android/car/carlauncher/AppLauncherUtils.java
@@ -46,16 +46,6 @@
 
     /**
      * Comparator for {@link AppMetaData} that sorts the list
-     * first by is distraction optimized in descending order (optimized apps first)
-     * then by the "displayName" property in ascending order.
-     * Used when distraction optimization is required.
-     */
-    static final Comparator<AppMetaData> DISTRACTION_OPTIMIZED_COMPARATOR = Comparator
-            .comparing(AppMetaData::getIsDistractionOptimized).reversed()
-            .thenComparing(AppMetaData::getDisplayName, String::compareToIgnoreCase);
-
-    /**
-     * Comparator for {@link AppMetaData} that sorts the list
      * by the "displayName" property in ascending order.
      */
     static final Comparator<AppMetaData> ALPHABETICAL_COMPARATOR = Comparator