Merge "Only use grid layout for power menu when wallet is visible" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-23 21:48:58 +00:00
committed by Android (Google) Code Review

View File

@@ -1631,8 +1631,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
} }
private int getGlobalActionsLayoutId(Context context) { private int getGlobalActionsLayoutId(Context context) {
boolean useGridLayout = isForceGridEnabled(context) || shouldUsePanel(); int rotation = RotationUtils.getRotation(context);
if (RotationUtils.getRotation(context) == RotationUtils.ROTATION_SEASCAPE) { boolean useGridLayout = isForceGridEnabled(context)
|| (shouldUsePanel() && rotation == RotationUtils.ROTATION_NONE);
if (rotation == RotationUtils.ROTATION_SEASCAPE) {
if (useGridLayout) { if (useGridLayout) {
return com.android.systemui.R.layout.global_actions_grid_seascape; return com.android.systemui.R.layout.global_actions_grid_seascape;
} else { } else {