summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-05-14 19:35:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-14 19:35:58 +0000
commita0abe2661eaf4f8e66990ac68386e54260836183 (patch)
tree70adfea8c9555ad19d23c730d425914df21a5ffa /src/com/android/launcher3
parent88c66dd4c584455fd9e7208f28ac7bed5b005461 (diff)
parent532e6ea2e6e4b5f968038b52db9bb998cb9fe84a (diff)
downloadandroid_packages_apps_Trebuchet-a0abe2661eaf4f8e66990ac68386e54260836183.tar.gz
android_packages_apps_Trebuchet-a0abe2661eaf4f8e66990ac68386e54260836183.tar.bz2
android_packages_apps_Trebuchet-a0abe2661eaf4f8e66990ac68386e54260836183.zip
Merge "Fixing crash when updating the scroll position state when there are no items." into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/AppsContainerRecyclerView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppsContainerRecyclerView.java b/src/com/android/launcher3/AppsContainerRecyclerView.java
index 34e621a46..3859be865 100644
--- a/src/com/android/launcher3/AppsContainerRecyclerView.java
+++ b/src/com/android/launcher3/AppsContainerRecyclerView.java
@@ -497,6 +497,12 @@ public class AppsContainerRecyclerView extends BaseContainerRecyclerView {
stateOut.rowIndex = -1;
stateOut.rowTopOffset = -1;
stateOut.rowHeight = -1;
+
+ // Return early if there are no items
+ if (items.isEmpty()) {
+ return;
+ }
+
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);