Merge "Sends the correct content insets to status bar"

This commit is contained in:
Tiger Huang
2019-10-30 06:59:36 +00:00
committed by Android (Google) Code Review

View File

@@ -1920,10 +1920,18 @@ public class DisplayPolicy {
vf.set(displayFrames.mStable);
if (adjust == SOFT_INPUT_ADJUST_RESIZE) {
cf.bottom = displayFrames.mContent.bottom;
// cf.bottom should not be below the stable bottom, or the content might be obscured
// by the navigation bar.
if (cf.bottom > displayFrames.mContent.bottom) {
cf.bottom = displayFrames.mContent.bottom;
}
} else {
cf.bottom = displayFrames.mDock.bottom;
vf.bottom = displayFrames.mContent.bottom;
if (cf.bottom > displayFrames.mDock.bottom) {
cf.bottom = displayFrames.mDock.bottom;
}
if (vf.bottom > displayFrames.mContent.bottom) {
vf.bottom = displayFrames.mContent.bottom;
}
}
} else {
dcf.set(displayFrames.mSystem);