mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Report ITYPE_BOTTOM_MANDATORY_GESTURES insets for Taskbar
Bug: 205493938 Change-Id: I196bc52c1bec75b5442f3546f466799ba9c3831b
This commit is contained in:
@@ -40,6 +40,7 @@ import android.view.accessibility.AccessibilityEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.InsettableFrameLayout;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
@@ -553,8 +554,14 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
Insets gestureInsets = insets.getMandatorySystemGestureInsets();
|
||||
int gestureInsetBottom = gestureInsets.bottom;
|
||||
DeviceProfile dp = mActivity.getDeviceProfile();
|
||||
if (dp.isTaskbarPresent) {
|
||||
// Ignore taskbar gesture insets to avoid interfering with TouchControllers.
|
||||
gestureInsetBottom = Math.max(0, gestureInsetBottom - dp.taskbarSize);
|
||||
}
|
||||
mSystemGestureRegion.set(gestureInsets.left, gestureInsets.top,
|
||||
gestureInsets.right, gestureInsets.bottom);
|
||||
gestureInsets.right, gestureInsetBottom);
|
||||
}
|
||||
return super.dispatchApplyWindowInsets(insets);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user