Sends the correct content insets to status bar
This CL ensures the content and visible frames of status bar won't be overlapped with the stable insets. So that it can prevent the content of status bar from being obscured by navigation bar. Fix: 141661670 Test: manually test with the immersive show-when-locked app Change-Id: I91e7c694fb21371e3513a9e61159f488e0aa783e
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user