Loading core/java/android/view/WindowManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -3530,6 +3530,14 @@ public interface WindowManager extends ViewManager { */ public Insets providedInternalInsets = Insets.NONE; /** * If specified, the insets provided by this window for the IME will be our window frame * minus the insets specified by providedInternalImeInsets. * * @hide */ public Insets providedInternalImeInsets = Insets.NONE; /** * {@link LayoutParams} to be applied to the window when layout with a assigned rotation. * This will make layout during rotation change smoothly. Loading Loading @@ -3904,6 +3912,7 @@ public interface WindowManager extends ViewManager { out.writeInt(0); } providedInternalInsets.writeToParcel(out, 0 /* parcelableFlags */); providedInternalImeInsets.writeToParcel(out, 0 /* parcelableFlags */); if (paramsForRotation != null) { checkNonRecursiveParams(); out.writeInt(paramsForRotation.length); Loading Loading @@ -3983,6 +3992,7 @@ public interface WindowManager extends ViewManager { in.readIntArray(providesInsetsTypes); } providedInternalInsets = Insets.CREATOR.createFromParcel(in); providedInternalImeInsets = Insets.CREATOR.createFromParcel(in); int paramsForRotationLength = in.readInt(); if (paramsForRotationLength > 0) { paramsForRotation = new LayoutParams[paramsForRotationLength]; Loading Loading @@ -4289,6 +4299,11 @@ public interface WindowManager extends ViewManager { changes |= LAYOUT_CHANGED; } if (!providedInternalImeInsets.equals(o.providedInternalImeInsets)) { providedInternalImeInsets = o.providedInternalImeInsets; changes |= LAYOUT_CHANGED; } if (!Arrays.equals(paramsForRotation, o.paramsForRotation)) { paramsForRotation = o.paramsForRotation; checkNonRecursiveParams(); Loading Loading @@ -4494,6 +4509,10 @@ public interface WindowManager extends ViewManager { sb.append(" providedInternalInsets="); sb.append(providedInternalInsets); } if (!providedInternalImeInsets.equals(Insets.NONE)) { sb.append(" providedInternalImeInsets="); sb.append(providedInternalImeInsets); } if (paramsForRotation != null && paramsForRotation.length != 0) { sb.append(System.lineSeparator()); sb.append(prefix).append(" paramsForRotation="); Loading core/res/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ <dimen name="navigation_bar_height_landscape">48dp</dimen> <!-- Width of the navigation bar when it is placed vertically on the screen --> <dimen name="navigation_bar_width">48dp</dimen> <!-- Height of the bottom taskbar not including decorations like rounded corners. --> <dimen name="taskbar_frame_height">60dp</dimen> <!-- How much we expand the touchable region of the status bar below the notch to catch touches that just start below the notch. --> <dimen name="display_cutout_touchable_region_size">12dp</dimen> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1741,6 +1741,7 @@ <java-symbol type="dimen" name="navigation_bar_height_car_mode" /> <java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" /> <java-symbol type="dimen" name="navigation_bar_width_car_mode" /> <java-symbol type="dimen" name="taskbar_frame_height" /> <java-symbol type="dimen" name="status_bar_height" /> <java-symbol type="dimen" name="display_cutout_touchable_region_size" /> <java-symbol type="dimen" name="quick_qs_offset_height" /> Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java +3 −9 Original line number Diff line number Diff line Loading @@ -58,16 +58,8 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { // TODO(b/191269755): use the value defined in InsetsController. private static final int ANIMATION_DURATION_RESIZE = 300; /** * The task bar height defined in launcher. Used to determine whether to insets divider bounds * or not. */ private static final int EXPANDED_TASK_BAR_HEIGHT_IN_DP = 60; /** The task bar expanded height. Used to determine whether to insets divider bounds or not. */ private final float mExpandedTaskBarHeight = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, EXPANDED_TASK_BAR_HEIGHT_IN_DP, getResources().getDisplayMetrics()); private float mExpandedTaskBarHeight; private final int mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); Loading Loading @@ -167,6 +159,8 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { mDividerBar = findViewById(R.id.divider_bar); mHandle = findViewById(R.id.docked_divider_handle); mBackground = findViewById(R.id.docked_divider_background); mExpandedTaskBarHeight = getResources().getDimensionPixelSize( com.android.internal.R.dimen.taskbar_frame_height); mTouchElevation = getResources().getDimensionPixelSize( R.dimen.docked_stack_divider_lift_elevation); mDoubleTapDetector = new GestureDetector(getContext(), new DoubleTapListener()); Loading services/core/java/com/android/server/wm/DisplayPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -1190,6 +1190,12 @@ public class DisplayPolicy { default: if (attrs.providesInsetsTypes != null) { for (@InternalInsetsType int insetsType : attrs.providesInsetsTypes) { final TriConsumer<DisplayFrames, WindowState, Rect> imeFrameProvider = !attrs.providedInternalImeInsets.equals(Insets.NONE) ? (displayFrames, windowState, inOutFrame) -> inOutFrame.inset(windowState.getLayoutingAttrs( displayFrames.mRotation).providedInternalImeInsets) : null; switch (insetsType) { case ITYPE_STATUS_BAR: mStatusBarAlt = win; Loading @@ -1209,12 +1215,13 @@ public class DisplayPolicy { break; } if (!INSETS_LAYOUT_GENERALIZATION) { mDisplayContent.setInsetProvider(insetsType, win, null); mDisplayContent.setInsetProvider(insetsType, win, null, imeFrameProvider); } else { mDisplayContent.setInsetProvider(insetsType, win, (displayFrames, windowState, inOutFrame) -> inOutFrame.inset( windowState.getLayoutingAttrs(displayFrames.mRotation) .providedInternalInsets)); .providedInternalInsets), imeFrameProvider); } } } Loading Loading
core/java/android/view/WindowManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -3530,6 +3530,14 @@ public interface WindowManager extends ViewManager { */ public Insets providedInternalInsets = Insets.NONE; /** * If specified, the insets provided by this window for the IME will be our window frame * minus the insets specified by providedInternalImeInsets. * * @hide */ public Insets providedInternalImeInsets = Insets.NONE; /** * {@link LayoutParams} to be applied to the window when layout with a assigned rotation. * This will make layout during rotation change smoothly. Loading Loading @@ -3904,6 +3912,7 @@ public interface WindowManager extends ViewManager { out.writeInt(0); } providedInternalInsets.writeToParcel(out, 0 /* parcelableFlags */); providedInternalImeInsets.writeToParcel(out, 0 /* parcelableFlags */); if (paramsForRotation != null) { checkNonRecursiveParams(); out.writeInt(paramsForRotation.length); Loading Loading @@ -3983,6 +3992,7 @@ public interface WindowManager extends ViewManager { in.readIntArray(providesInsetsTypes); } providedInternalInsets = Insets.CREATOR.createFromParcel(in); providedInternalImeInsets = Insets.CREATOR.createFromParcel(in); int paramsForRotationLength = in.readInt(); if (paramsForRotationLength > 0) { paramsForRotation = new LayoutParams[paramsForRotationLength]; Loading Loading @@ -4289,6 +4299,11 @@ public interface WindowManager extends ViewManager { changes |= LAYOUT_CHANGED; } if (!providedInternalImeInsets.equals(o.providedInternalImeInsets)) { providedInternalImeInsets = o.providedInternalImeInsets; changes |= LAYOUT_CHANGED; } if (!Arrays.equals(paramsForRotation, o.paramsForRotation)) { paramsForRotation = o.paramsForRotation; checkNonRecursiveParams(); Loading Loading @@ -4494,6 +4509,10 @@ public interface WindowManager extends ViewManager { sb.append(" providedInternalInsets="); sb.append(providedInternalInsets); } if (!providedInternalImeInsets.equals(Insets.NONE)) { sb.append(" providedInternalImeInsets="); sb.append(providedInternalImeInsets); } if (paramsForRotation != null && paramsForRotation.length != 0) { sb.append(System.lineSeparator()); sb.append(prefix).append(" paramsForRotation="); Loading
core/res/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ <dimen name="navigation_bar_height_landscape">48dp</dimen> <!-- Width of the navigation bar when it is placed vertically on the screen --> <dimen name="navigation_bar_width">48dp</dimen> <!-- Height of the bottom taskbar not including decorations like rounded corners. --> <dimen name="taskbar_frame_height">60dp</dimen> <!-- How much we expand the touchable region of the status bar below the notch to catch touches that just start below the notch. --> <dimen name="display_cutout_touchable_region_size">12dp</dimen> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1741,6 +1741,7 @@ <java-symbol type="dimen" name="navigation_bar_height_car_mode" /> <java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" /> <java-symbol type="dimen" name="navigation_bar_width_car_mode" /> <java-symbol type="dimen" name="taskbar_frame_height" /> <java-symbol type="dimen" name="status_bar_height" /> <java-symbol type="dimen" name="display_cutout_touchable_region_size" /> <java-symbol type="dimen" name="quick_qs_offset_height" /> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java +3 −9 Original line number Diff line number Diff line Loading @@ -58,16 +58,8 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { // TODO(b/191269755): use the value defined in InsetsController. private static final int ANIMATION_DURATION_RESIZE = 300; /** * The task bar height defined in launcher. Used to determine whether to insets divider bounds * or not. */ private static final int EXPANDED_TASK_BAR_HEIGHT_IN_DP = 60; /** The task bar expanded height. Used to determine whether to insets divider bounds or not. */ private final float mExpandedTaskBarHeight = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, EXPANDED_TASK_BAR_HEIGHT_IN_DP, getResources().getDisplayMetrics()); private float mExpandedTaskBarHeight; private final int mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); Loading Loading @@ -167,6 +159,8 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { mDividerBar = findViewById(R.id.divider_bar); mHandle = findViewById(R.id.docked_divider_handle); mBackground = findViewById(R.id.docked_divider_background); mExpandedTaskBarHeight = getResources().getDimensionPixelSize( com.android.internal.R.dimen.taskbar_frame_height); mTouchElevation = getResources().getDimensionPixelSize( R.dimen.docked_stack_divider_lift_elevation); mDoubleTapDetector = new GestureDetector(getContext(), new DoubleTapListener()); Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -1190,6 +1190,12 @@ public class DisplayPolicy { default: if (attrs.providesInsetsTypes != null) { for (@InternalInsetsType int insetsType : attrs.providesInsetsTypes) { final TriConsumer<DisplayFrames, WindowState, Rect> imeFrameProvider = !attrs.providedInternalImeInsets.equals(Insets.NONE) ? (displayFrames, windowState, inOutFrame) -> inOutFrame.inset(windowState.getLayoutingAttrs( displayFrames.mRotation).providedInternalImeInsets) : null; switch (insetsType) { case ITYPE_STATUS_BAR: mStatusBarAlt = win; Loading @@ -1209,12 +1215,13 @@ public class DisplayPolicy { break; } if (!INSETS_LAYOUT_GENERALIZATION) { mDisplayContent.setInsetProvider(insetsType, win, null); mDisplayContent.setInsetProvider(insetsType, win, null, imeFrameProvider); } else { mDisplayContent.setInsetProvider(insetsType, win, (displayFrames, windowState, inOutFrame) -> inOutFrame.inset( windowState.getLayoutingAttrs(displayFrames.mRotation) .providedInternalInsets)); .providedInternalInsets), imeFrameProvider); } } } Loading