diff options
author | Winson Chung <winsonc@google.com> | 2015-06-01 15:42:37 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-06-01 22:43:32 +0000 |
commit | dd5814c471c316091f59febcffedb8d58d693492 (patch) | |
tree | e72967e834992e5992174b5b5e84f1e60d73cedd /src/com/android | |
parent | e4ca4a9ca16d3007f44e3ef30dbeacd20815b402 (diff) | |
download | android_packages_apps_Trebuchet-dd5814c471c316091f59febcffedb8d58d693492.tar.gz android_packages_apps_Trebuchet-dd5814c471c316091f59febcffedb8d58d693492.tar.bz2 android_packages_apps_Trebuchet-dd5814c471c316091f59febcffedb8d58d693492.zip |
Fixing crash on tablets from merging scheme changes.
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/allapps/AlphabeticalAppsList.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 7a9dfa16e..13e18289a 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -542,14 +542,14 @@ public class AlphabeticalAppsList { int sectionAppCount = 0; for (int i = 0; i < mSections.size() - 1; i++) { SectionInfo section = mSections.get(i); - SectionInfo nextSection = mSections.get(i + 1); sectionAppCount = section.numApps; int mergeCount = 1; // Merge rows based on the current strategy - while (mMergeAlgorithm.continueMerging(section, nextSection, sectionAppCount, - mNumAppsPerRow, mergeCount)) { - nextSection = mSections.remove(i + 1); + while (i < (mSections.size() - 1) && + mMergeAlgorithm.continueMerging(section, mSections.get(i + 1), + sectionAppCount, mNumAppsPerRow, mergeCount)) { + SectionInfo nextSection = mSections.remove(i + 1); // Remove the next section break mAdapterItems.remove(nextSection.sectionBreakItem); |