diff --git a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java index dafa16819d8..381466f0031 100644 --- a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java +++ b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java @@ -26,6 +26,7 @@ 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; @@ -110,6 +111,7 @@ public static void registerTwoPanePairRule(Context context, .setClearTop(clearTop) .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp()) .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp()) + .setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow()) .setDefaultSplitAttributes(attributes) .build(); RuleController.getInstance(context).addRule(splitPairRule); @@ -230,6 +232,7 @@ private void registerHomepagePlaceholderRule() { activityFilters, intent) .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp()) .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp()) + .setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow()) .setSticky(false) .setFinishPrimaryWithPlaceholder(SplitRule.FinishBehavior.ADJACENT) .setDefaultSplitAttributes(attributes)