From 7b54b078eb5933747331db1b5b36dfef71284ca6 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 8 Mar 2018 12:52:22 +0100 Subject: [PATCH] Cutout: Fix status bar layout Fixes an issue where the status bar would not lay out under the cutout if it was the IME target. Change-Id: Ib5d1bbbf6311a0bcd1694a5dc69076f24b88b5e8 Fixes: 74369579 Test: Receive notification with Direct Reply, open direct reply, verify status bar stays under cutout. --- .../systemui/statusbar/phone/StatusBarWindowManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java index 948f524bb1887..defb46ce27b2a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.phone; +import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; + import static com.android.systemui.statusbar.NotificationRemoteInputManager.ENABLE_REMOTE_INPUT; import android.app.ActivityManager; @@ -108,6 +110,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D mLp.setTitle("StatusBar"); mLp.accessibilityTitle = mContext.getString(R.string.status_bar); mLp.packageName = mContext.getPackageName(); + mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; mStatusBarView = statusBarView; mBarHeight = barHeight; mWindowManager.addView(mStatusBarView, mLp);