From 9a5275e07366c82bcd5000f9a373e58197f3fb75 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Thu, 3 Mar 2022 18:59:15 +0000 Subject: [PATCH] Fixing top notifications cut off on the lockscreen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main issue was split_shade_header_height referencing quick_qs_offset_height - I changed that relation for sw720dp-land, I can’t think of any good reason that should be still needed. Also simplifying getSplitShadeStatusBarHeight - it was assuming that split_shade_header_height would be always referencing quick_qs_offset_height. Fixes: 216919842 Test: Split shade lockscreen with notificaations - swipe up and see if top notification is clipped weirdly Change-Id: Iabedab351d88d732f9e4aeebb5ad3bacad35d677 --- packages/SystemUI/res/values-sw720dp-land/dimens.xml | 2 ++ packages/SystemUI/src/com/android/systemui/util/Utils.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values-sw720dp-land/dimens.xml b/packages/SystemUI/res/values-sw720dp-land/dimens.xml index 71c1958960515..139146181a479 100644 --- a/packages/SystemUI/res/values-sw720dp-land/dimens.xml +++ b/packages/SystemUI/res/values-sw720dp-land/dimens.xml @@ -24,4 +24,6 @@ 72dp 24dp + + 56dp diff --git a/packages/SystemUI/src/com/android/systemui/util/Utils.java b/packages/SystemUI/src/com/android/systemui/util/Utils.java index 71d8e33449377..7e3bce589f7e0 100644 --- a/packages/SystemUI/src/com/android/systemui/util/Utils.java +++ b/packages/SystemUI/src/com/android/systemui/util/Utils.java @@ -199,10 +199,13 @@ public class Utils { /** * Gets the {@link R.dimen#split_shade_header_height}. * - * Currently, it's the same as {@link com.android.internal.R.dimen#quick_qs_offset_height}. + * It should be fine to not ignore cutouts as split shade might not want to react to them: + * for split shade header, which is only on bigger screens, either cutout won't be a problem + * (it's usually centered and in split shade that's likely empty area) or we probably want to + * handle it differently. */ public static int getSplitShadeStatusBarHeight(Context context) { - return SystemBarUtils.getQuickQsOffsetHeight(context); + return context.getResources().getDimensionPixelSize(R.dimen.split_shade_header_height); } /**