summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-05-14 16:00:15 -0700
committerVadim Tryshev <vadimt@google.com>2018-05-14 17:24:00 -0700
commiteb701c636095791d6a6171836c0837a2dad7f02b (patch)
tree031911a157b09e1494796c2e4c62641ec726f486 /src
parent98f4fc00ac8f6ca8289c8823b07bcc400576ef09 (diff)
downloadandroid_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.tar.gz
android_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.tar.bz2
android_packages_apps_Trebuchet-eb701c636095791d6a6171836c0837a2dad7f02b.zip
Scrolling on the most recent task upon Overview start
Fixes this problem: 1. Open a single task in Recents 2. Dismiss via Clear-all 3. Start a task 4. Press Home 5. Press square button get Recents revealing Clear All button Bug: 79117932 Test: Manual Change-Id: I47bcc50cb72f1757025d2abac0196460e0bb3f36
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/PagedView.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 87ee076f3..990132df5 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -92,7 +92,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
@ViewDebug.ExportedProperty(category = "launcher")
protected int mCurrentPage;
- private int mChildCountOnLastLayout;
@ViewDebug.ExportedProperty(category = "launcher")
protected int mNextPage = INVALID_PAGE;
@@ -543,18 +542,19 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
mIsLayoutValid = true;
- if (getChildCount() == 0) {
- return;
- }
-
- if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
final int childCount = getChildCount();
-
boolean pageScrollChanged = false;
- if (mPageScrolls == null || childCount != mChildCountOnLastLayout) {
+ if (mPageScrolls == null || childCount != mPageScrolls.length) {
mPageScrolls = new int[childCount];
pageScrollChanged = true;
}
+
+ if (childCount == 0) {
+ return;
+ }
+
+ if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
+
if (getPageScrolls(mPageScrolls, true, SIMPLE_SCROLL_LOGIC)) {
pageScrollChanged = true;
}
@@ -591,7 +591,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
if (mScroller.isFinished() && pageScrollChanged) {
setCurrentPage(getNextPage());
}
- mChildCountOnLastLayout = childCount;
}
/**