mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Don't apply left/right inset on gesture nav landscape
Fix: 201775630 Test: Go to landscape with gesture nav, widgets not cropped and cellSize matches HSV Change-Id: I68e62897b31dbb8509c95a20e8d3a3528a40fe9b
This commit is contained in:
@@ -60,10 +60,10 @@ public class WindowManagerCompat {
|
||||
}
|
||||
WindowInsets defaultInsets = windowContext.getSystemService(WindowManager.class)
|
||||
.getMaximumWindowMetrics().getWindowInsets();
|
||||
boolean hasNavbar = ResourceUtils.getIntegerByName(
|
||||
boolean isGesturalMode = ResourceUtils.getIntegerByName(
|
||||
"config_navBarInteractionMode",
|
||||
windowContext.getResources(),
|
||||
INVALID_RESOURCE_HANDLE) != 0;
|
||||
INVALID_RESOURCE_HANDLE) == 2;
|
||||
|
||||
WindowInsets.Builder insetsBuilder = new WindowInsets.Builder(defaultInsets);
|
||||
Set<WindowBounds> result = new ArraySet<>();
|
||||
@@ -74,7 +74,7 @@ public class WindowManagerCompat {
|
||||
if (isTablet && !consumeTaskBar) {
|
||||
portraitNav = landscapeNav = Insets.of(0, 0, 0, windowContext.getResources()
|
||||
.getDimensionPixelSize(R.dimen.taskbar_size));
|
||||
} else if (hasNavbar) {
|
||||
} else if (!isGesturalMode) {
|
||||
portraitNav = Insets.of(0, 0, 0,
|
||||
getSystemResource(windowContext, "navigation_bar_height", swDP));
|
||||
landscapeNav = isTablet
|
||||
|
||||
Reference in New Issue
Block a user