Merge "Make Settings show in two-pane on portrait tablet" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2023-02-17 14:47:37 +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.ActivityFilter;
import androidx.window.embedding.ActivityRule; import androidx.window.embedding.ActivityRule;
import androidx.window.embedding.EmbeddingAspectRatio;
import androidx.window.embedding.RuleController; import androidx.window.embedding.RuleController;
import androidx.window.embedding.SplitAttributes; import androidx.window.embedding.SplitAttributes;
import androidx.window.embedding.SplitPairFilter; import androidx.window.embedding.SplitPairFilter;
@@ -110,6 +111,7 @@ public class ActivityEmbeddingRulesController {
.setClearTop(clearTop) .setClearTop(clearTop)
.setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp()) .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
.setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp()) .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
.setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
.setDefaultSplitAttributes(attributes) .setDefaultSplitAttributes(attributes)
.build(); .build();
RuleController.getInstance(context).addRule(splitPairRule); RuleController.getInstance(context).addRule(splitPairRule);
@@ -230,6 +232,7 @@ public class ActivityEmbeddingRulesController {
activityFilters, intent) activityFilters, intent)
.setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp()) .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
.setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp()) .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
.setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
.setSticky(false) .setSticky(false)
.setFinishPrimaryWithPlaceholder(SplitRule.FinishBehavior.ADJACENT) .setFinishPrimaryWithPlaceholder(SplitRule.FinishBehavior.ADJACENT)
.setDefaultSplitAttributes(attributes) .setDefaultSplitAttributes(attributes)