summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InvariantDeviceProfile.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2019-05-28 15:49:09 -0700
committerJon Miranda <jonmiranda@google.com>2019-05-28 16:05:09 -0700
commitc0f1f4f3afe1d6cf275ad4f54fabfc134f0294c3 (patch)
tree8e80aab5de4a7096a1d1877aa247a0d2f0742ce5 /src/com/android/launcher3/InvariantDeviceProfile.java
parentb36ab46e93b332b1e1bc08b0404a87c237a25f6e (diff)
downloadandroid_packages_apps_Trebuchet-c0f1f4f3afe1d6cf275ad4f54fabfc134f0294c3.tar.gz
android_packages_apps_Trebuchet-c0f1f4f3afe1d6cf275ad4f54fabfc134f0294c3.tar.bz2
android_packages_apps_Trebuchet-c0f1f4f3afe1d6cf275ad4f54fabfc134f0294c3.zip
Fix bug where changing the display size does not update the launcher grid.
The bug is caused by launcher saving the grid name and using that grid name to look for matching display options. This makes sense when changing the grid size, but doesn't work well when changing the display size. Example: Initial Pixel display size is set to Default, so we save "normal" as the KEY_IDP_GRID_NAME. When we change display size to Largest, the KEY_IDP_GRID_NAME is still "normal" and so we only look at display options under "normal". Before this, Pixel with display size set to Largest would be set to "reasonable". This should be safe change for Q, and we can have a proper fix when we officially support changing grid size. Bug: 131867841 Change-Id: If5f3b0a13b90069973e929024b26bd9b9c45a7d8
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index 8a8a2fbe5..bde87cb50 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -288,7 +288,9 @@ public class InvariantDeviceProfile {
InvariantDeviceProfile oldProfile = new InvariantDeviceProfile(this);
// Re-init grid
- initGrid(context, Utilities.getPrefs(context).getString(KEY_IDP_GRID_NAME, null));
+ // TODO(b/131867841): We pass in null here so that we can calculate the closest profile
+ // without the bias of the grid name.
+ initGrid(context, null);
int changeFlags = 0;
if (numRows != oldProfile.numRows ||