Vertically center SCM restart dialog
Only update margins based on taskbar insets since app bounds include
status bar insets.
Fix: 269102159
Test: Manual using `adb shell dumpsys activity service
SystemUIService WMShell compatui restartDialogEnabled 1`
Change-Id: I1e5648849277a94ddb8abf99d5a23b49a7b2a37c
This commit is contained in:
@@ -170,10 +170,10 @@ class RestartDialogWindowManager extends CompatUIWindowManagerAbstract {
|
||||
|
||||
final Rect taskBounds = getTaskBounds();
|
||||
final Rect taskStableBounds = getTaskStableBounds();
|
||||
|
||||
marginParams.topMargin = taskStableBounds.top - taskBounds.top + mDialogVerticalMargin;
|
||||
marginParams.bottomMargin =
|
||||
taskBounds.bottom - taskStableBounds.bottom + mDialogVerticalMargin;
|
||||
// only update margins based on taskbar insets
|
||||
marginParams.topMargin = mDialogVerticalMargin;
|
||||
marginParams.bottomMargin = taskBounds.bottom - taskStableBounds.bottom
|
||||
+ mDialogVerticalMargin;
|
||||
dialogContainer.setLayoutParams(marginParams);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user