From 62d5648700e53496bf3f9ec7916034bb57283989 Mon Sep 17 00:00:00 2001 From: Maryam Dehaini Date: Tue, 19 Sep 2023 13:51:32 -0700 Subject: Change fullscreen caption height to 36dp Change the fullscreen caption height so that it matches the status bar height. Bug: 297559120 Test: Open fullscreen task. Status bar icons should be vertically centered in the caption. Change-Id: Ia2208514b85680405989cb8034cf293f96bd660b --- .../res/layout/desktop_mode_focused_window_decor.xml | 4 ++-- libs/WindowManager/Shell/res/values/dimen.xml | 6 ++++++ .../shell/windowdecor/CaptionWindowDecoration.java | 5 +++-- .../windowdecor/DesktopModeWindowDecoration.java | 20 ++++++++++++-------- .../wm/shell/windowdecor/WindowDecoration.java | 5 +++-- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml index d93e9ba32105..7638132d6562 100644 --- a/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml +++ b/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml @@ -26,8 +26,8 @@ 42dp + + 42dp + + + 36dp + 287dp diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java index c18973132364..82fc0f49c143 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java @@ -18,6 +18,7 @@ package com.android.wm.shell.windowdecor; import android.app.ActivityManager.RunningTaskInfo; import android.app.WindowConfiguration; +import android.app.WindowConfiguration.WindowingMode; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Color; @@ -114,7 +115,7 @@ public class CaptionWindowDecoration extends WindowDecoration } } - int getCaptionHeightId() { + int getCaptionHeightId(@WindowingMode int windowingMode) { return Resources.ID_NULL; } @@ -458,7 +459,7 @@ public abstract class WindowDecoration * Adds caption inset source to a WCT */ public void addCaptionInset(WindowContainerTransaction wct) { - final int captionHeightId = getCaptionHeightId(); + final int captionHeightId = getCaptionHeightId(mTaskInfo.getWindowingMode()); if (!ViewRootImpl.CAPTION_ON_SHELL || captionHeightId == Resources.ID_NULL) { return; } -- cgit v1.2.3-59-g8ed1b