Merge "Removing dependency on getApplicationInfo method added in N" into ub-launcher3-calgary
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index 9ed42f7..effecaf 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -802,7 +802,7 @@
     }
 
     private static final class IconDB extends SQLiteCacheHelper {
-        private final static int DB_VERSION = 8;
+        private final static int DB_VERSION = 9;
 
         private final static int RELEASE_VERSION = DB_VERSION +
                 (FeatureFlags.LAUNCHER3_DISABLE_ICON_NORMALIZATION ? 0 : 1);
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index daeb4c1..5606a24 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1565,8 +1565,6 @@
             } else if (getCurrentPage() > mTempVisiblePagesRange[1]) {
                 setCurrentPage(mTempVisiblePagesRange[1]);
             }
-        } else {
-            setCurrentPage(getPageNearestToCenterOfScreen());
         }
 
         setEnableOverscroll(!freeScroll);
diff --git a/src/com/android/launcher3/model/GridSizeMigrationTask.java b/src/com/android/launcher3/model/GridSizeMigrationTask.java
index 931466c..e054734 100644
--- a/src/com/android/launcher3/model/GridSizeMigrationTask.java
+++ b/src/com/android/launcher3/model/GridSizeMigrationTask.java
@@ -958,13 +958,15 @@
                 // The following list defines all possible grid sizes (and intermediate steps
                 // during migration). Note that at each step, dx <= 1 && dy <= 1. Any grid size
                 // which is not in this list is not migrated.
+                // Note that the InvariantDeviceProfile defines (rows, cols) but the Points
+                // specified here are defined as (cols, rows).
                 ArrayList<Point> gridSizeSteps = new ArrayList<>();
-                gridSizeSteps.add(new Point(2, 3));
+                gridSizeSteps.add(new Point(3, 2));
                 gridSizeSteps.add(new Point(3, 3));
-                gridSizeSteps.add(new Point(3, 4));
+                gridSizeSteps.add(new Point(4, 3));
                 gridSizeSteps.add(new Point(4, 4));
                 gridSizeSteps.add(new Point(5, 5));
-                gridSizeSteps.add(new Point(5, 6));
+                gridSizeSteps.add(new Point(6, 5));
                 gridSizeSteps.add(new Point(6, 6));
                 gridSizeSteps.add(new Point(7, 7));
 
diff --git a/src/com/android/launcher3/util/IconNormalizer.java b/src/com/android/launcher3/util/IconNormalizer.java
index 001cac0..4087d7b 100644
--- a/src/com/android/launcher3/util/IconNormalizer.java
+++ b/src/com/android/launcher3/util/IconNormalizer.java
@@ -28,7 +28,7 @@
 public class IconNormalizer {
 
     // Ratio of icon visible area to full icon size for a square shaped icon
-    private static final float MAX_SQUARE_AREA_FACTOR = 359.0f / 576;
+    private static final float MAX_SQUARE_AREA_FACTOR = 375.0f / 576;
     // Ratio of icon visible area to full icon size for a circular shaped icon
     private static final float MAX_CIRCLE_AREA_FACTOR = 380.0f / 576;