Loading core/java/android/view/ViewRootImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FIT_INSETS_CO import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; Loading Loading @@ -2766,7 +2767,7 @@ public final class ViewRootImpl implements ViewParent, * TODO(b/260382739): Apply this to all windows. */ private static boolean shouldOptimizeMeasure(final WindowManager.LayoutParams lp) { return lp.type == TYPE_NOTIFICATION_SHADE; return (lp.privateFlags & PRIVATE_FLAG_OPTIMIZE_MEASURE) != 0; } private Rect getWindowBoundsInsetSystemBars() { Loading core/java/android/view/WindowManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -2579,6 +2579,15 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; /** * Flag to indicate that the view hierarchy of the window can only be measured when * necessary. If a window size can be known by the LayoutParams, we can use the size to * relayout window, and we don't have to measure the view hierarchy before laying out the * views. This reduces the chances to perform measure. * {@hide} */ public static final int PRIVATE_FLAG_OPTIMIZE_MEASURE = 0x00000200; /** * Flag that prevents the wallpaper behind the current window from receiving touch events. * Loading Loading @@ -2781,6 +2790,7 @@ public interface WindowManager extends ViewManager { PRIVATE_FLAG_NO_MOVE_ANIMATION, PRIVATE_FLAG_COMPATIBLE_WINDOW, PRIVATE_FLAG_SYSTEM_ERROR, PRIVATE_FLAG_OPTIMIZE_MEASURE, PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT, Loading Loading @@ -2840,6 +2850,10 @@ public interface WindowManager extends ViewManager { mask = PRIVATE_FLAG_SYSTEM_ERROR, equals = PRIVATE_FLAG_SYSTEM_ERROR, name = "SYSTEM_ERROR"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_OPTIMIZE_MEASURE, equals = PRIVATE_FLAG_OPTIMIZE_MEASURE, name = "OPTIMIZE_MEASURE"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, equals = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static com.android.systemui.DejankUtils.whitelistIpcs; import static com.android.systemui.statusbar.NotificationRemoteInputManager.ENABLE_REMOTE_INPUT; Loading Loading @@ -251,6 +252,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW mLp.setTitle("NotificationShade"); mLp.packageName = mContext.getPackageName(); mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; mLp.privateFlags |= PRIVATE_FLAG_OPTIMIZE_MEASURE; // We use BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE here, however, there is special logic in // window manager which disables the transient show behavior. Loading Loading
core/java/android/view/ViewRootImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FIT_INSETS_CO import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; Loading Loading @@ -2766,7 +2767,7 @@ public final class ViewRootImpl implements ViewParent, * TODO(b/260382739): Apply this to all windows. */ private static boolean shouldOptimizeMeasure(final WindowManager.LayoutParams lp) { return lp.type == TYPE_NOTIFICATION_SHADE; return (lp.privateFlags & PRIVATE_FLAG_OPTIMIZE_MEASURE) != 0; } private Rect getWindowBoundsInsetSystemBars() { Loading
core/java/android/view/WindowManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -2579,6 +2579,15 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; /** * Flag to indicate that the view hierarchy of the window can only be measured when * necessary. If a window size can be known by the LayoutParams, we can use the size to * relayout window, and we don't have to measure the view hierarchy before laying out the * views. This reduces the chances to perform measure. * {@hide} */ public static final int PRIVATE_FLAG_OPTIMIZE_MEASURE = 0x00000200; /** * Flag that prevents the wallpaper behind the current window from receiving touch events. * Loading Loading @@ -2781,6 +2790,7 @@ public interface WindowManager extends ViewManager { PRIVATE_FLAG_NO_MOVE_ANIMATION, PRIVATE_FLAG_COMPATIBLE_WINDOW, PRIVATE_FLAG_SYSTEM_ERROR, PRIVATE_FLAG_OPTIMIZE_MEASURE, PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT, Loading Loading @@ -2840,6 +2850,10 @@ public interface WindowManager extends ViewManager { mask = PRIVATE_FLAG_SYSTEM_ERROR, equals = PRIVATE_FLAG_SYSTEM_ERROR, name = "SYSTEM_ERROR"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_OPTIMIZE_MEASURE, equals = PRIVATE_FLAG_OPTIMIZE_MEASURE, name = "OPTIMIZE_MEASURE"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, equals = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static com.android.systemui.DejankUtils.whitelistIpcs; import static com.android.systemui.statusbar.NotificationRemoteInputManager.ENABLE_REMOTE_INPUT; Loading Loading @@ -251,6 +252,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW mLp.setTitle("NotificationShade"); mLp.packageName = mContext.getPackageName(); mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; mLp.privateFlags |= PRIVATE_FLAG_OPTIMIZE_MEASURE; // We use BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE here, however, there is special logic in // window manager which disables the transient show behavior. Loading