Ignore events that occur between app icons on the taskbar

Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual, flip the flag, long-click between taskbar items
Change-Id: If2ee00f31fcd1788bac2c2c0cd78ba1eada86115
This commit is contained in:
Artsiom Mitrokhin
2024-10-18 14:33:13 -04:00
parent 8ed2ef9029
commit 7205b24938
7 changed files with 58 additions and 23 deletions
@@ -356,12 +356,12 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
return mTaskbarView.getMaxNumIconViews();
}
public Rect getIconLayoutVisualBounds() {
return mTaskbarView.getIconLayoutVisualBounds();
public Rect getTransientTaskbarIconLayoutBounds() {
return mTaskbarView.getTransientTaskbarIconLayoutBounds();
}
public Rect getIconLayoutBounds() {
return mTaskbarView.getIconLayoutBounds();
public Rect getTransientTaskbarIconLayoutBoundsInParent() {
return mTaskbarView.getTransientTaskbarIconLayoutBoundsInParent();
}
public View[] getIconViews() {
@@ -559,14 +559,14 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
if (mControllers.getSharedState().startTaskbarVariantIsTransient) {
float transY =
mTransientTaskbarDp.taskbarBottomMargin + (mTransientTaskbarDp.taskbarHeight
- mTaskbarView.getIconLayoutVisualBounds().bottom)
- mTaskbarView.getTransientTaskbarIconLayoutBounds().bottom)
- (mPersistentTaskbarDp.taskbarHeight
- mTransientTaskbarDp.taskbarIconSize) / 2f;
taskbarIconTranslationYForPinningValue = mapRange(scale, 0f, transY);
} else {
float transY =
-mTransientTaskbarDp.taskbarBottomMargin + (mPersistentTaskbarDp.taskbarHeight
- mTaskbarView.getIconLayoutVisualBounds().bottom)
- mTaskbarView.getTransientTaskbarIconLayoutBounds().bottom)
- (mTransientTaskbarDp.taskbarHeight
- mTransientTaskbarDp.taskbarIconSize) / 2f;
taskbarIconTranslationYForPinningValue = mapRange(scale, transY, 0f);