diff options
author | Winson Chung <winsonc@google.com> | 2011-09-07 11:20:10 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-09-07 11:22:04 -0700 |
commit | 36f9736cd3519e15ab54ba4f89573969e8e7bfe3 (patch) | |
tree | e40491de4b9287a73b792ab318795e1630b751a6 /src | |
parent | e05b381c55a09170e4dfeb999800e8176731b29c (diff) | |
download | android_packages_apps_Trebuchet-36f9736cd3519e15ab54ba4f89573969e8e7bfe3.tar.gz android_packages_apps_Trebuchet-36f9736cd3519e15ab54ba4f89573969e8e7bfe3.tar.bz2 android_packages_apps_Trebuchet-36f9736cd3519e15ab54ba4f89573969e8e7bfe3.zip |
Loading the workspace favourites in reverse order to work around duplicate issue. (5208427)
Change-Id: I87dee7a9aab345740f51d8168c6b073a93e20652
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/LauncherModel.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index e0b04dacb..c61607e72 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -949,9 +949,12 @@ public class LauncherModel extends BroadcastReceiver { final ArrayList<Long> itemsToRemove = new ArrayList<Long>(); final Cursor c = contentResolver.query( - LauncherSettings.Favorites.CONTENT_URI, null, null, null, null); + LauncherSettings.Favorites.CONTENT_URI, null, null, null, + LauncherSettings.Favorites._ID + " DESC"); // +1 for the hotseat (it can be larger than the workspace) + // Load workspace in reverse order to ensure that latest items are loaded first (and + // before any earlier duplicates) final ItemInfo occupied[][][] = new ItemInfo[Launcher.SCREEN_COUNT + 1][mCellCountX + 1][mCellCountY + 1]; |