Misc fixes for IME adjust
- Use thinner divider when IME adjusted
- Dim non-focused stack
- Restrict IME adjustment so that top pane is shrunk to 30% at most
- Move top stack up together with IME adjust
- Move bottom stack up even when not focused for thinner divider
bug: 28175599
Change-Id: I83556535e5a171f0ec28d88429186fa1315b910c
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 3bd7a96..0638a0e 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -84,9 +84,12 @@
private static final long IME_ADJUST_DRAWN_TIMEOUT = 200;
+ private static final int DIVIDER_WIDTH_INACTIVE_DP = 4;
+
private final WindowManagerService mService;
private final DisplayContent mDisplayContent;
private int mDividerWindowWidth;
+ private int mDividerWindowWidthInactive;
private int mDividerInsets;
private boolean mResizing;
private WindowState mWindow;
@@ -130,6 +133,8 @@
com.android.internal.R.dimen.docked_stack_divider_thickness);
mDividerInsets = context.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.docked_stack_divider_insets);
+ mDividerWindowWidthInactive = WindowManagerService.dipToPixel(
+ DIVIDER_WIDTH_INACTIVE_DP, mDisplayContent.getDisplayMetrics());
}
void onConfigurationChanged() {
@@ -148,6 +153,10 @@
return mDividerInsets;
}
+ int getContentWidthInactive() {
+ return mDividerWindowWidthInactive;
+ }
+
void setResizing(boolean resizing) {
if (mResizing != resizing) {
mResizing = resizing;