Remove insets due to Taskbar, except on workspace elements
Test: go to all apps, ensure no bottom insets/limited nav bar protection; go to overview, ensure no extra bottom padding Bug: 171917176 Change-Id: I09dc589e1cb8d3b673bf2b38e42284557413e011
This commit is contained in:
1 parent
462384dbed
commit
145b7fd68c
5 files changed
+17
-5
No files matched your search
@@ -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,
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user