Loading src/com/android/launcher3/DeviceProfile.java +3 −1 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ public class DeviceProfile { // Taskbar public boolean isTaskbarPresent; public int taskbarSize; // How much of the bottom inset is due to Taskbar rather than other system elements. public int nonOverlappingTaskbarInset; DeviceProfile(Context context, InvariantDeviceProfile inv, Info info, Point minSize, Point maxSize, int width, int height, boolean isLandscape, Loading Loading @@ -221,7 +223,7 @@ public class DeviceProfile { WindowInsets windowInsets = DisplayController.INSTANCE.get(context).getHolder(mInfo.id) .getDisplayContext().getSystemService(WindowManager.class) .getCurrentWindowMetrics().getWindowInsets(); int nonOverlappingTaskbarInset = nonOverlappingTaskbarInset = taskbarSize - windowInsets.getSystemWindowInsetBottom(); if (nonOverlappingTaskbarInset > 0) { nonFinalAvailableHeightPx -= nonOverlappingTaskbarInset; Loading src/com/android/launcher3/LauncherRootView.java +9 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,15 @@ public class LauncherRootView extends InsettableFrameLayout { } private void handleSystemWindowInsets(Rect insets) { // Update device profile before notifying th children. mActivity.getDeviceProfile().updateInsets(insets); DeviceProfile dp = mActivity.getDeviceProfile(); // Taskbar provides insets, but we don't want that for most Launcher elements so remove it. mTempRect.set(insets); insets = mTempRect; insets.bottom = Math.max(0, insets.bottom - dp.nonOverlappingTaskbarInset); // Update device profile before notifying the children. dp.updateInsets(insets); boolean resetState = !insets.equals(mInsets); setInsets(insets); Loading src/com/android/launcher3/Workspace.java +2 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator> Rect padding = grid.workspacePadding; setPadding(padding.left, padding.top, padding.right, padding.bottom); mInsets.set(insets); // Increase our bottom insets so we don't overlap with the taskbar. mInsets.bottom += grid.nonOverlappingTaskbarInset; if (mWorkspaceFadeInAdjacentScreens) { // In landscape mode the page spacing is set to the default. Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +2 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) { if (Utilities.ATLEAST_Q) { mNavBarScrimHeight = insets.getTappableElementInsets().bottom; mNavBarScrimHeight = insets.getTappableElementInsets().bottom - mLauncher.getDeviceProfile().nonOverlappingTaskbarInset; } else { mNavBarScrimHeight = insets.getStableInsetBottom(); } Loading src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java +1 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ public class WorkspacePageIndicator extends View implements Insettable, PageIndi lp.leftMargin = lp.rightMargin = 0; lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM; lp.bottomMargin = grid.isTaskbarPresent ? grid.workspacePadding.bottom + insets.bottom ? grid.workspacePadding.bottom + grid.taskbarSize : grid.hotseatBarSizePx + insets.bottom; } setLayoutParams(lp); Loading Loading
src/com/android/launcher3/DeviceProfile.java +3 −1 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ public class DeviceProfile { // Taskbar public boolean isTaskbarPresent; public int taskbarSize; // How much of the bottom inset is due to Taskbar rather than other system elements. public int nonOverlappingTaskbarInset; DeviceProfile(Context context, InvariantDeviceProfile inv, Info info, Point minSize, Point maxSize, int width, int height, boolean isLandscape, Loading Loading @@ -221,7 +223,7 @@ public class DeviceProfile { WindowInsets windowInsets = DisplayController.INSTANCE.get(context).getHolder(mInfo.id) .getDisplayContext().getSystemService(WindowManager.class) .getCurrentWindowMetrics().getWindowInsets(); int nonOverlappingTaskbarInset = nonOverlappingTaskbarInset = taskbarSize - windowInsets.getSystemWindowInsetBottom(); if (nonOverlappingTaskbarInset > 0) { nonFinalAvailableHeightPx -= nonOverlappingTaskbarInset; Loading
src/com/android/launcher3/LauncherRootView.java +9 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,15 @@ public class LauncherRootView extends InsettableFrameLayout { } private void handleSystemWindowInsets(Rect insets) { // Update device profile before notifying th children. mActivity.getDeviceProfile().updateInsets(insets); DeviceProfile dp = mActivity.getDeviceProfile(); // Taskbar provides insets, but we don't want that for most Launcher elements so remove it. mTempRect.set(insets); insets = mTempRect; insets.bottom = Math.max(0, insets.bottom - dp.nonOverlappingTaskbarInset); // Update device profile before notifying the children. dp.updateInsets(insets); boolean resetState = !insets.equals(mInsets); setInsets(insets); Loading
src/com/android/launcher3/Workspace.java +2 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator> Rect padding = grid.workspacePadding; setPadding(padding.left, padding.top, padding.right, padding.bottom); mInsets.set(insets); // Increase our bottom insets so we don't overlap with the taskbar. mInsets.bottom += grid.nonOverlappingTaskbarInset; if (mWorkspaceFadeInAdjacentScreens) { // In landscape mode the page spacing is set to the default. Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +2 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) { if (Utilities.ATLEAST_Q) { mNavBarScrimHeight = insets.getTappableElementInsets().bottom; mNavBarScrimHeight = insets.getTappableElementInsets().bottom - mLauncher.getDeviceProfile().nonOverlappingTaskbarInset; } else { mNavBarScrimHeight = insets.getStableInsetBottom(); } Loading
src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java +1 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ public class WorkspacePageIndicator extends View implements Insettable, PageIndi lp.leftMargin = lp.rightMargin = 0; lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM; lp.bottomMargin = grid.isTaskbarPresent ? grid.workspacePadding.bottom + insets.bottom ? grid.workspacePadding.bottom + grid.taskbarSize : grid.hotseatBarSizePx + insets.bottom; } setLayoutParams(lp); Loading