Snap for 9480469 from f1963f7e86 to udc-release

Change-Id: I3037e7d1f5181035f54fc9bf187b83159a5bca16
This commit is contained in:
Android Build Coastguard Worker
2023-01-12 02:27:32 +00:00
5 changed files with 32 additions and 6 deletions
@@ -364,7 +364,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
* Returns the height that taskbar will be touchable.
*/
public int getTouchableHeight() {
return mIsStashed ? mStashedHeight : mUnstashedHeight;
int bottomMargin = 0;
if (DisplayController.isTransientTaskbar(mActivity)) {
bottomMargin = mActivity.getResources().getDimensionPixelSize(
R.dimen.transient_taskbar_margin);
}
return mIsStashed ? mStashedHeight : (mUnstashedHeight + bottomMargin);
}
/**
@@ -322,6 +322,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
private final boolean mIsTransientTaskbar;
// May be set to false when mIsTransientTaskbar is true.
private boolean mCanSlowSwipeGoHome = true;
private boolean mHasReachedOverviewThreshold = false;
@Nullable
private RemoteAnimationTargets.ReleaseCheck mSwipePipToHomeReleaseCheck = null;
@@ -764,6 +765,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
private void setIsLikelyToStartNewTask(boolean isLikelyToStartNewTask, boolean animate) {
if (mIsLikelyToStartNewTask != isLikelyToStartNewTask) {
if (isLikelyToStartNewTask && mIsTransientTaskbar) {
setDividerShown(false /* shown */, true /* immediate */);
}
mIsLikelyToStartNewTask = isLikelyToStartNewTask;
maybeUpdateRecentsAttachedState(animate);
}
@@ -1666,7 +1671,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
mRecentsAnimationController.enableInputConsumer();
// Start hiding the divider
setDividerShown(false /* shown */, true /* immediate */);
if (!mIsTransientTaskbar || mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen) {
setDividerShown(false /* shown */, true /* immediate */);
}
}
private void computeRecentsScrollIfInvisible() {
@@ -2302,6 +2309,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
// "Catch up" with the displacement at mTaskbarCatchUpThreshold.
if (displacement < mTaskbarCatchUpThreshold) {
if (!mHasReachedOverviewThreshold) {
setDividerShown(false /* shown */, true /* immediate */);
mHasReachedOverviewThreshold = true;
}
return Utilities.mapToRange(displacement, mTaskbarAppWindowThreshold,
mTaskbarCatchUpThreshold, 0, mTaskbarCatchUpThreshold, ACCEL_DEACCEL);
}
@@ -233,10 +233,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener {
* @return whether the coordinates of the {@param event} is in the swipe up gesture region.
*/
public boolean isInSwipeUpTouchRegion(MotionEvent event, BaseActivityInterface activity) {
boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(),
event.getY());
if (inBarArea) {
return true;
}
if (isTrackpadMotionEvent(event)) {
return !activity.isResumed();
}
return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(), event.getY());
return false;
}
/**
@@ -245,11 +250,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener {
*/
public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex,
BaseActivityInterface activity) {
boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions(
event.getX(pointerIndex), event.getY(pointerIndex));
if (inBarArea) {
return true;
}
if (isTrackpadMotionEvent(event)) {
return !activity.isResumed();
}
return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(pointerIndex),
event.getY(pointerIndex));
return false;
}
@Override
@@ -802,7 +802,7 @@ public class TouchInteractionService extends Service
// If Taskbar is present, we listen for long press to unstash it.
TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext();
if (tac != null) {
if (tac != null && canStartSystemGesture) {
reasonString.append(NEWLINE_PREFIX)
.append(reasonPrefix)
.append(SUBSTRING_PREFIX)
+1
View File
@@ -1,3 +1,4 @@
# Bug component: 164335
vadimt@google.com
sunnygoyal@google.com
winsonc@google.com