Updating launcher settings so that they become split-screen
Following this guide:
https://developer.android.com/guide/topics/large-screens/activity-embedding#extract_an_activity_from_a_split_to_full_window
Bug: 204463748
Test: Open the settings app and open multiple settings, for now
only the options inside of the launcher3 package work
Flag: ACONFIG com.android.launcher3.Flags.enableTwoPaneLauncherSettings DEVELOPMENT
Change-Id: Ie6a9eb3760171da92d94cf06376127b02afff8df
diff --git a/res/values/config.xml b/res/values/config.xml
index 2a8ec28..5bdd7ebb 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -252,6 +252,9 @@
<!-- Used for custom widgets -->
<array name="custom_widget_providers"/>
+ <!-- Embed parameters -->
+ <dimen name="activity_split_ratio" format="float">0.5</dimen>
+ <integer name="min_width_split">720</integer>
<!-- Skip "Install to private" long-press shortcut packages name -->
<string-array name="skip_private_profile_shortcut_packages" translatable="false">
diff --git a/res/xml/split_configuration.xml b/res/xml/split_configuration.xml
new file mode 100644
index 0000000..531fef8
--- /dev/null
+++ b/res/xml/split_configuration.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources
+ xmlns:window="http://schemas.android.com/apk/res-auto">
+ <!-- Automatically split the following activity pairs. -->
+ <SplitPairRule
+ window:splitRatio="@dimen/activity_split_ratio"
+ window:splitLayoutDirection="locale"
+ window:splitMinWidthDp="@integer/min_width_split"
+ window:splitMaxAspectRatioInPortrait="alwaysAllow"
+ window:finishPrimaryWithSecondary="never"
+ window:finishSecondaryWithPrimary="always"
+ window:clearTop="false">
+ <SplitPairFilter
+ window:primaryActivityName="com.android.launcher3.settings.SettingsActivity"
+ window:secondaryActivityName="com.android.launcher3.settings.SettingsActivity"/>
+
+ </SplitPairRule>
+</resources>
\ No newline at end of file