Add a way to stash/unstash transient taskbar.

- Adds threshold to show taskbar during swipe
- Introduces FLAG_STASHED_IN_APP_AUTO flag
- Adds logic for taskbar to auto hide based on time
  and touch

Bug: 252905206
Test: manual
Change-Id: I070cd619487fdd4498a988ae5aadce6dd14313f7
This commit is contained in:
Jon Miranda
2022-11-01 11:59:54 -07:00
parent 59228a6511
commit 6163e2d39f
10 changed files with 359 additions and 44 deletions

View File

@@ -380,13 +380,23 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
return super.dispatchTouchEvent(ev);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
mControllerCallbacks.onInterceptTouchEvent(ev);
return super.onInterceptTouchEvent(ev);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (!mTouchEnabled) {
return true;
}
if (mIconLayoutBounds.left <= event.getX() && event.getX() <= mIconLayoutBounds.right) {
// Don't allow long pressing between icons, or above/below them.
if (mIconLayoutBounds.left <= event.getX()
&& event.getX() <= mIconLayoutBounds.right
&& !DisplayController.isTransientTaskbar(mActivityContext)) {
// Don't allow long pressing between icons, or above/below them
// unless its transient taskbar.
mControllerCallbacks.clearTouchInProgress();
return true;
}
if (mControllerCallbacks.onTouchEvent(event)) {
@@ -403,6 +413,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
public void setTouchesEnabled(boolean touchEnabled) {
this.mTouchEnabled = touchEnabled;
mControllerCallbacks.clearTouchInProgress();
}
/**