Merge "Make Settings show in two-pane on portrait tablet"

This commit is contained in:
Charles Chen
2023-02-09 01:39:40 +00:00
committed by Android (Google) Code Review

View File

@@ -26,6 +26,7 @@ import android.util.Log;
import androidx.window.embedding.ActivityFilter;
import androidx.window.embedding.ActivityRule;
import androidx.window.embedding.EmbeddingAspectRatio;
import androidx.window.embedding.RuleController;
import androidx.window.embedding.SplitAttributes;
import androidx.window.embedding.SplitPairFilter;
@@ -111,6 +112,7 @@ public class ActivityEmbeddingRulesController {
.setClearTop(clearTop)
.setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
.setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
.setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
.setDefaultSplitAttributes(attributes)
.build();
RuleController.getInstance(context).addRule(splitPairRule);
@@ -231,6 +233,7 @@ public class ActivityEmbeddingRulesController {
activityFilters, intent)
.setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
.setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
.setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
.setSticky(false)
.setFinishPrimaryWithPlaceholder(SplitRule.FinishBehavior.ADJACENT)
.setDefaultSplitAttributes(attributes)