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 committed 2024-11-21 16:38:32 -05:00
1 parent 8ed2ef9029
commit 7205b24938
7 files changed
+58 -23

No files matched your search

@@ -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);