From e7ada365ce12ee511e6fa10a713a8d9295fd95f8 Mon Sep 17 00:00:00 2001 From: ryanlwlin Date: Thu, 2 Dec 2021 15:40:50 +0800 Subject: [PATCH] Fix magnification cutout while performing back gesture The window type of edge panel is nagivation bar panel, which is not magniiable so wouldn't be included in the magnification region. To fix it, we exculde this window while computing magnification region Bug: 208720902 Test: manual test Change-Id: I2209cc307f2177c55175b35b71b28d6b4e28a05b --- .../navigationbar/gestural/EdgeBackGestureHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java index 4d4962e7d4c20..621075cba785f 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java @@ -15,6 +15,8 @@ */ package com.android.systemui.navigationbar.gestural; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION; + import static com.android.systemui.classifier.Classifier.BACK_GESTURE; import android.app.ActivityManager; @@ -548,7 +550,8 @@ public class EdgeBackGestureHandler extends CurrentUserTracker layoutParams.accessibilityTitle = mContext.getString(R.string.nav_bar_edge_panel); layoutParams.windowAnimations = 0; layoutParams.privateFlags |= - WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; + (WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS + | PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION); layoutParams.setTitle(TAG + mContext.getDisplayId()); layoutParams.setFitInsetsTypes(0 /* types */); layoutParams.setTrustedOverlay();