Merge "Fix taskbar spring when going from home to overview." into tm-qpr-dev am: 35d4b6d250 am: 732c9d864a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22074947 Change-Id: If1800be8c33b73ad4507532e87f388096f8a0726 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -54,6 +54,7 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer {
|
||||
private final float mScreenWidth;
|
||||
|
||||
private final int mTaskbarNavThreshold;
|
||||
private final int mTaskbarNavThresholdY;
|
||||
private final boolean mIsTaskbarAllAppsOpen;
|
||||
private boolean mHasPassedTaskbarNavThreshold;
|
||||
|
||||
@@ -75,6 +76,8 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer {
|
||||
Resources res = context.getResources();
|
||||
mUnstashArea = res.getDimensionPixelSize(R.dimen.taskbar_unstash_input_area);
|
||||
mTaskbarNavThreshold = res.getDimensionPixelSize(R.dimen.taskbar_nav_threshold);
|
||||
mTaskbarNavThresholdY = taskbarActivityContext.getDeviceProfile().heightPx
|
||||
- mTaskbarNavThreshold;
|
||||
mIsTaskbarAllAppsOpen =
|
||||
mTaskbarActivityContext != null && mTaskbarActivityContext.isTaskbarAllAppsOpen();
|
||||
|
||||
@@ -165,7 +168,7 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer {
|
||||
}
|
||||
|
||||
if (dY < 0) {
|
||||
dY = -OverScroll.dampedScroll(-dY, mTaskbarNavThreshold);
|
||||
dY = -OverScroll.dampedScroll(-dY, mTaskbarNavThresholdY);
|
||||
if (mTransitionCallback != null && !mIsTaskbarAllAppsOpen) {
|
||||
mTransitionCallback.onActionMove(dY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user