Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 159b42a2 authored by Charles Chen's avatar Charles Chen Committed by Chris Li
Browse files

Make Settings show in two-pane on portrait tablet

Test: manual - Change Display size and observe
Bug: 211562623
Change-Id: I0c26a7443882cc28edb5500f8d135c5f00dee515
Merged-In: I0c26a7443882cc28edb5500f8d135c5f00dee515
parent 3b08c0d9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
@@ -107,6 +108,7 @@ public class ActivityEmbeddingRulesController {
                .setClearTop(clearTop)
                .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
                .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
                .setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
                .setDefaultSplitAttributes(attributes)
                .build();
        RuleController.getInstance(context).addRule(splitPairRule);
@@ -227,6 +229,7 @@ public class ActivityEmbeddingRulesController {
                activityFilters, intent)
                .setMinWidthDp(ActivityEmbeddingUtils.getMinCurrentScreenSplitWidthDp())
                .setMinSmallestWidthDp(ActivityEmbeddingUtils.getMinSmallestScreenSplitWidthDp())
                .setMaxAspectRatioInPortrait(EmbeddingAspectRatio.alwaysAllow())
                .setSticky(false)
                .setFinishPrimaryWithPlaceholder(SplitRule.FinishBehavior.ADJACENT)
                .setDefaultSplitAttributes(attributes)