Merge "Shows "App isn't installed" while tapping on Home" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ce6fe0e50f
@@ -285,14 +285,17 @@ final class LetterboxUiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float getSplitScreenAspectRatio() {
|
float getSplitScreenAspectRatio() {
|
||||||
|
// Getting the same aspect ratio that apps get in split screen.
|
||||||
|
final DisplayContent displayContent = mActivityRecord.getDisplayContent();
|
||||||
|
if (displayContent == null) {
|
||||||
|
return getDefaultMinAspectRatioForUnresizableApps();
|
||||||
|
}
|
||||||
int dividerWindowWidth =
|
int dividerWindowWidth =
|
||||||
getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_thickness);
|
getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_thickness);
|
||||||
int dividerInsets =
|
int dividerInsets =
|
||||||
getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_insets);
|
getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_insets);
|
||||||
int dividerSize = dividerWindowWidth - dividerInsets * 2;
|
int dividerSize = dividerWindowWidth - dividerInsets * 2;
|
||||||
|
final Rect bounds = new Rect(displayContent.getBounds());
|
||||||
// Getting the same aspect ratio that apps get in split screen.
|
|
||||||
Rect bounds = new Rect(mActivityRecord.getDisplayContent().getBounds());
|
|
||||||
if (bounds.width() >= bounds.height()) {
|
if (bounds.width() >= bounds.height()) {
|
||||||
bounds.inset(/* dx */ dividerSize / 2, /* dy */ 0);
|
bounds.inset(/* dx */ dividerSize / 2, /* dy */ 0);
|
||||||
bounds.right = bounds.centerX();
|
bounds.right = bounds.centerX();
|
||||||
|
|||||||
Reference in New Issue
Block a user