From 10ec24ca9e502623e5e39ca55f660da5da758559 Mon Sep 17 00:00:00 2001 From: MrSluffy Date: Sat, 1 Feb 2025 12:15:35 +0800 Subject: [PATCH] enh : restore split configuration - only tested in pixel fold emulator --- build.gradle | 2 + .../android/launcher3/FeatureFlagsImpl.java | 2 +- lawnchair/res/values-sw400dp-land/styles.xml | 18 ++ lawnchair/res/values-sw400dp/styles.xml | 38 +++ lawnchair/res/values-sw480dp-land/styles.xml | 18 ++ lawnchair/res/values-sw480dp/styles.xml | 18 ++ lawnchair/res/values-sw600dp-land/dimens.xml | 17 ++ lawnchair/res/values-sw600dp-land/styles.xml | 51 ++++ lawnchair/res/values-sw600dp/dimens.xml | 33 +++ lawnchair/res/values-sw600dp/integers.xml | 10 + lawnchair/res/values-sw600dp/styles.xml | 62 +++++ lawnchair/res/values-sw640dp-land/styles.xml | 25 ++ lawnchair/res/values-sw640dp/styles.xml | 25 ++ lawnchair/res/values-sw700dp-land/styles.xml | 36 +++ lawnchair/res/values-sw700dp/styles.xml | 56 +++++ lawnchair/res/values-sw720dp-land/dimens.xml | 13 + lawnchair/res/values-sw720dp/dimens.xml | 24 ++ lawnchair/res/values-sw800dp-land/styles.xml | 24 ++ lawnchair/res/values-sw800dp/styles.xml | 24 ++ lawnchair/res/values-sw900dp/dimens.xml | 5 + lawnchair/res/values/config.xml | 2 + lawnchair/res/values/dimens.xml | 4 + lawnchair/res/values/styles.xml | 13 + .../xml-sw600dp-land/paddings_split_4_col.xml | 47 ++++ .../xml-sw600dp-land/paddings_split_4x4.xml | 61 +++++ .../xml-sw600dp-land/paddings_split_4x5.xml | 47 ++++ .../xml-sw600dp-land/paddings_split_5_col.xml | 47 ++++ .../xml-sw600dp-land/paddings_split_5x5.xml | 47 ++++ .../res/xml-sw600dp/paddings_split_4_col.xml | 47 ++++ .../res/xml-sw600dp/paddings_split_4x4.xml | 49 ++++ .../res/xml-sw600dp/paddings_split_4x5.xml | 47 ++++ .../res/xml-sw600dp/paddings_split_5_col.xml | 47 ++++ .../res/xml-sw600dp/paddings_split_5x5.xml | 47 ++++ .../default_workspace_splitdisplay_4x5.xml | 75 ++++++ lawnchair/res/xml/device_profiles.xml | 234 ++++++++++++++++++ lawnchair/res/xml/paddings_split_4x5.xml | 47 ++++ .../spec_all_apps_cell_match_workspace.xml | 12 + .../spec_foldable_all_apps_4x5_unfolded.xml | 39 +++ .../xml/spec_foldable_folder_4x5_unfolded.xml | 57 +++++ .../spec_foldable_hotseat_4x5_unfolded.xml | 25 ++ .../spec_foldable_workspace_4x5_unfolded.xml | 71 ++++++ ...c_foldable_workspace_cell_4x5_unfolded.xml | 35 +++ lawnchair/res/xml/spec_handheld_all_apps.xml | 39 +++ .../res/xml/spec_handheld_folder_4x5.xml | 51 ++++ .../res/xml/spec_handheld_hotseat_4x5.xml | 31 +++ .../res/xml/spec_handheld_workspace_4x5.xml | 127 ++++++++++ .../xml/spec_handheld_workspace_cell_4x5.xml | 21 ++ src/com/android/launcher3/Launcher.java | 11 +- 48 files changed, 1875 insertions(+), 6 deletions(-) create mode 100644 lawnchair/res/values-sw400dp-land/styles.xml create mode 100644 lawnchair/res/values-sw400dp/styles.xml create mode 100644 lawnchair/res/values-sw480dp-land/styles.xml create mode 100644 lawnchair/res/values-sw480dp/styles.xml create mode 100644 lawnchair/res/values-sw600dp-land/dimens.xml create mode 100644 lawnchair/res/values-sw600dp-land/styles.xml create mode 100644 lawnchair/res/values-sw600dp/dimens.xml create mode 100644 lawnchair/res/values-sw600dp/integers.xml create mode 100644 lawnchair/res/values-sw600dp/styles.xml create mode 100644 lawnchair/res/values-sw640dp-land/styles.xml create mode 100644 lawnchair/res/values-sw640dp/styles.xml create mode 100644 lawnchair/res/values-sw700dp-land/styles.xml create mode 100644 lawnchair/res/values-sw700dp/styles.xml create mode 100644 lawnchair/res/values-sw720dp-land/dimens.xml create mode 100644 lawnchair/res/values-sw720dp/dimens.xml create mode 100644 lawnchair/res/values-sw800dp-land/styles.xml create mode 100644 lawnchair/res/values-sw800dp/styles.xml create mode 100644 lawnchair/res/values-sw900dp/dimens.xml create mode 100644 lawnchair/res/xml-sw600dp-land/paddings_split_4_col.xml create mode 100644 lawnchair/res/xml-sw600dp-land/paddings_split_4x4.xml create mode 100644 lawnchair/res/xml-sw600dp-land/paddings_split_4x5.xml create mode 100644 lawnchair/res/xml-sw600dp-land/paddings_split_5_col.xml create mode 100644 lawnchair/res/xml-sw600dp-land/paddings_split_5x5.xml create mode 100644 lawnchair/res/xml-sw600dp/paddings_split_4_col.xml create mode 100644 lawnchair/res/xml-sw600dp/paddings_split_4x4.xml create mode 100644 lawnchair/res/xml-sw600dp/paddings_split_4x5.xml create mode 100644 lawnchair/res/xml-sw600dp/paddings_split_5_col.xml create mode 100644 lawnchair/res/xml-sw600dp/paddings_split_5x5.xml create mode 100644 lawnchair/res/xml/default_workspace_splitdisplay_4x5.xml create mode 100644 lawnchair/res/xml/paddings_split_4x5.xml create mode 100644 lawnchair/res/xml/spec_all_apps_cell_match_workspace.xml create mode 100644 lawnchair/res/xml/spec_foldable_all_apps_4x5_unfolded.xml create mode 100644 lawnchair/res/xml/spec_foldable_folder_4x5_unfolded.xml create mode 100644 lawnchair/res/xml/spec_foldable_hotseat_4x5_unfolded.xml create mode 100644 lawnchair/res/xml/spec_foldable_workspace_4x5_unfolded.xml create mode 100644 lawnchair/res/xml/spec_foldable_workspace_cell_4x5_unfolded.xml create mode 100644 lawnchair/res/xml/spec_handheld_all_apps.xml create mode 100644 lawnchair/res/xml/spec_handheld_folder_4x5.xml create mode 100644 lawnchair/res/xml/spec_handheld_hotseat_4x5.xml create mode 100644 lawnchair/res/xml/spec_handheld_workspace_4x5.xml create mode 100644 lawnchair/res/xml/spec_handheld_workspace_cell_4x5.xml diff --git a/build.gradle b/build.gradle index a627ada2cc..16438c6b09 100644 --- a/build.gradle +++ b/build.gradle @@ -448,6 +448,8 @@ dependencies { } implementation 'io.github.hokofly:hoko-blur:1.5.3' + + implementation "androidx.window:window:1.3.0" } ksp { diff --git a/flags/src/com/android/launcher3/FeatureFlagsImpl.java b/flags/src/com/android/launcher3/FeatureFlagsImpl.java index b8cfae5e3a..d0aad19aaa 100644 --- a/flags/src/com/android/launcher3/FeatureFlagsImpl.java +++ b/flags/src/com/android/launcher3/FeatureFlagsImpl.java @@ -121,7 +121,7 @@ public final class FeatureFlagsImpl implements FeatureFlags { enableTaskbarPinning = properties.getBoolean(Flags.FLAG_ENABLE_TASKBAR_PINNING, true); enableTwoPaneLauncherSettings = - properties.getBoolean(Flags.FLAG_ENABLE_TWO_PANE_LAUNCHER_SETTINGS, false); + properties.getBoolean(Flags.FLAG_ENABLE_TWO_PANE_LAUNCHER_SETTINGS, true); enableTwolineAllapps = properties.getBoolean(Flags.FLAG_ENABLE_TWOLINE_ALLAPPS, false); enableTwolineToggle = diff --git a/lawnchair/res/values-sw400dp-land/styles.xml b/lawnchair/res/values-sw400dp-land/styles.xml new file mode 100644 index 0000000000..438c4fae83 --- /dev/null +++ b/lawnchair/res/values-sw400dp-land/styles.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw400dp/styles.xml b/lawnchair/res/values-sw400dp/styles.xml new file mode 100644 index 0000000000..5fd65ee1d0 --- /dev/null +++ b/lawnchair/res/values-sw400dp/styles.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw480dp-land/styles.xml b/lawnchair/res/values-sw480dp-land/styles.xml new file mode 100644 index 0000000000..438c4fae83 --- /dev/null +++ b/lawnchair/res/values-sw480dp-land/styles.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw480dp/styles.xml b/lawnchair/res/values-sw480dp/styles.xml new file mode 100644 index 0000000000..fb6429298a --- /dev/null +++ b/lawnchair/res/values-sw480dp/styles.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw600dp-land/dimens.xml b/lawnchair/res/values-sw600dp-land/dimens.xml new file mode 100644 index 0000000000..adb0ac5bc2 --- /dev/null +++ b/lawnchair/res/values-sw600dp-land/dimens.xml @@ -0,0 +1,17 @@ + + + 48dp + 11.33dp + 16dp + 0dp + 11.33dp + 49dp + 491dp + 24dp + 16dp + 48dp + 32dp + 3600dp + 44dp + 24dp + \ No newline at end of file diff --git a/lawnchair/res/values-sw600dp-land/styles.xml b/lawnchair/res/values-sw600dp-land/styles.xml new file mode 100644 index 0000000000..1bd7c5a89a --- /dev/null +++ b/lawnchair/res/values-sw600dp-land/styles.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw600dp/dimens.xml b/lawnchair/res/values-sw600dp/dimens.xml new file mode 100644 index 0000000000..1472dc7804 --- /dev/null +++ b/lawnchair/res/values-sw600dp/dimens.xml @@ -0,0 +1,33 @@ + + + 0dp + 38sp + 120dp + 15sp + 9dp + -1000dp + 16dp + 16dp + 64dp + 56dp + 9dp + 0dp + 62dp + 13dp + 32dp + 75dp + 6dp + 17dp + 3000dp + 25dp + 24dp + 28dp + 64dp + 36dp + 12dp + 300dp + 65dp + 44dp + 132dp + 32dp + \ No newline at end of file diff --git a/lawnchair/res/values-sw600dp/integers.xml b/lawnchair/res/values-sw600dp/integers.xml new file mode 100644 index 0000000000..51005e8b64 --- /dev/null +++ b/lawnchair/res/values-sw600dp/integers.xml @@ -0,0 +1,10 @@ + + + @integer/config_bottomSheetCloseDuration + @integer/config_bottomSheetOpenDuration + 500 + 500 + 400 + 550 + 8 + \ No newline at end of file diff --git a/lawnchair/res/values-sw600dp/styles.xml b/lawnchair/res/values-sw600dp/styles.xml new file mode 100644 index 0000000000..b355fc91c2 --- /dev/null +++ b/lawnchair/res/values-sw600dp/styles.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw640dp-land/styles.xml b/lawnchair/res/values-sw640dp-land/styles.xml new file mode 100644 index 0000000000..05b3c3854b --- /dev/null +++ b/lawnchair/res/values-sw640dp-land/styles.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw640dp/styles.xml b/lawnchair/res/values-sw640dp/styles.xml new file mode 100644 index 0000000000..a8ef78797c --- /dev/null +++ b/lawnchair/res/values-sw640dp/styles.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw700dp-land/styles.xml b/lawnchair/res/values-sw700dp-land/styles.xml new file mode 100644 index 0000000000..1addb3fa83 --- /dev/null +++ b/lawnchair/res/values-sw700dp-land/styles.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw700dp/styles.xml b/lawnchair/res/values-sw700dp/styles.xml new file mode 100644 index 0000000000..b373d47903 --- /dev/null +++ b/lawnchair/res/values-sw700dp/styles.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw720dp-land/dimens.xml b/lawnchair/res/values-sw720dp-land/dimens.xml new file mode 100644 index 0000000000..6e86df95b9 --- /dev/null +++ b/lawnchair/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,13 @@ + + + 29.33dp + 32dp + 0dp + 21.93dp + 21dp + 580dp + 49dp + 5300dp + 64dp + 49dp + \ No newline at end of file diff --git a/lawnchair/res/values-sw720dp/dimens.xml b/lawnchair/res/values-sw720dp/dimens.xml new file mode 100644 index 0000000000..efec09e223 --- /dev/null +++ b/lawnchair/res/values-sw720dp/dimens.xml @@ -0,0 +1,24 @@ + + + 42sp + 16sp + 36dp + 48dp + 24dp + 8dp + 32dp + 32dp + 20sp + 110dp + 72dp + 27.59dp + 24dp + 3400dp + 36dp + 44dp + 16dp + 108dp + 3 + 16dp + 30dp + \ No newline at end of file diff --git a/lawnchair/res/values-sw800dp-land/styles.xml b/lawnchair/res/values-sw800dp-land/styles.xml new file mode 100644 index 0000000000..e0ea739772 --- /dev/null +++ b/lawnchair/res/values-sw800dp-land/styles.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw800dp/styles.xml b/lawnchair/res/values-sw800dp/styles.xml new file mode 100644 index 0000000000..57bdb624bb --- /dev/null +++ b/lawnchair/res/values-sw800dp/styles.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/values-sw900dp/dimens.xml b/lawnchair/res/values-sw900dp/dimens.xml new file mode 100644 index 0000000000..43830549d9 --- /dev/null +++ b/lawnchair/res/values-sw900dp/dimens.xml @@ -0,0 +1,5 @@ + + + 76dp + 0dp + \ No newline at end of file diff --git a/lawnchair/res/values/config.xml b/lawnchair/res/values/config.xml index ae76b57676..ac0261ce4b 100644 --- a/lawnchair/res/values/config.xml +++ b/lawnchair/res/values/config.xml @@ -161,4 +161,6 @@ 1.10 + + diff --git a/lawnchair/res/values/dimens.xml b/lawnchair/res/values/dimens.xml index a12ca82633..338f3407f8 100644 --- a/lawnchair/res/values/dimens.xml +++ b/lawnchair/res/values/dimens.xml @@ -109,4 +109,8 @@ 120dp + 10 + 1 + 1.05 + diff --git a/lawnchair/res/values/styles.xml b/lawnchair/res/values/styles.xml index f3453325b5..bfef8a2586 100644 --- a/lawnchair/res/values/styles.xml +++ b/lawnchair/res/values/styles.xml @@ -210,4 +210,17 @@ @dimen/key_text_shadow_dx @dimen/key_text_shadow_dy + + + + + + diff --git a/lawnchair/res/xml-sw600dp-land/paddings_split_4_col.xml b/lawnchair/res/xml-sw600dp-land/paddings_split_4_col.xml new file mode 100644 index 0000000000..fcdc96fbae --- /dev/null +++ b/lawnchair/res/xml-sw600dp-land/paddings_split_4_col.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp-land/paddings_split_4x4.xml b/lawnchair/res/xml-sw600dp-land/paddings_split_4x4.xml new file mode 100644 index 0000000000..b35fefaba5 --- /dev/null +++ b/lawnchair/res/xml-sw600dp-land/paddings_split_4x4.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp-land/paddings_split_4x5.xml b/lawnchair/res/xml-sw600dp-land/paddings_split_4x5.xml new file mode 100644 index 0000000000..fcdc96fbae --- /dev/null +++ b/lawnchair/res/xml-sw600dp-land/paddings_split_4x5.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp-land/paddings_split_5_col.xml b/lawnchair/res/xml-sw600dp-land/paddings_split_5_col.xml new file mode 100644 index 0000000000..d6ce7f4d85 --- /dev/null +++ b/lawnchair/res/xml-sw600dp-land/paddings_split_5_col.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp-land/paddings_split_5x5.xml b/lawnchair/res/xml-sw600dp-land/paddings_split_5x5.xml new file mode 100644 index 0000000000..d6ce7f4d85 --- /dev/null +++ b/lawnchair/res/xml-sw600dp-land/paddings_split_5x5.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp/paddings_split_4_col.xml b/lawnchair/res/xml-sw600dp/paddings_split_4_col.xml new file mode 100644 index 0000000000..22c1cea904 --- /dev/null +++ b/lawnchair/res/xml-sw600dp/paddings_split_4_col.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp/paddings_split_4x4.xml b/lawnchair/res/xml-sw600dp/paddings_split_4x4.xml new file mode 100644 index 0000000000..c5f13d1ac1 --- /dev/null +++ b/lawnchair/res/xml-sw600dp/paddings_split_4x4.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp/paddings_split_4x5.xml b/lawnchair/res/xml-sw600dp/paddings_split_4x5.xml new file mode 100644 index 0000000000..22c1cea904 --- /dev/null +++ b/lawnchair/res/xml-sw600dp/paddings_split_4x5.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp/paddings_split_5_col.xml b/lawnchair/res/xml-sw600dp/paddings_split_5_col.xml new file mode 100644 index 0000000000..837865e7e5 --- /dev/null +++ b/lawnchair/res/xml-sw600dp/paddings_split_5_col.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml-sw600dp/paddings_split_5x5.xml b/lawnchair/res/xml-sw600dp/paddings_split_5x5.xml new file mode 100644 index 0000000000..837865e7e5 --- /dev/null +++ b/lawnchair/res/xml-sw600dp/paddings_split_5x5.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/default_workspace_splitdisplay_4x5.xml b/lawnchair/res/xml/default_workspace_splitdisplay_4x5.xml new file mode 100644 index 0000000000..36c1ce7137 --- /dev/null +++ b/lawnchair/res/xml/default_workspace_splitdisplay_4x5.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/device_profiles.xml b/lawnchair/res/xml/device_profiles.xml index 54f66c26f7..4e15c83c21 100644 --- a/lawnchair/res/xml/device_profiles.xml +++ b/lawnchair/res/xml/device_profiles.xml @@ -207,4 +207,238 @@ + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/paddings_split_4x5.xml b/lawnchair/res/xml/paddings_split_4x5.xml new file mode 100644 index 0000000000..aaf00e7d3d --- /dev/null +++ b/lawnchair/res/xml/paddings_split_4x5.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_all_apps_cell_match_workspace.xml b/lawnchair/res/xml/spec_all_apps_cell_match_workspace.xml new file mode 100644 index 0000000000..65ec082deb --- /dev/null +++ b/lawnchair/res/xml/spec_all_apps_cell_match_workspace.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_foldable_all_apps_4x5_unfolded.xml b/lawnchair/res/xml/spec_foldable_all_apps_4x5_unfolded.xml new file mode 100644 index 0000000000..8fe5be8eb0 --- /dev/null +++ b/lawnchair/res/xml/spec_foldable_all_apps_4x5_unfolded.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_foldable_folder_4x5_unfolded.xml b/lawnchair/res/xml/spec_foldable_folder_4x5_unfolded.xml new file mode 100644 index 0000000000..f3387566e9 --- /dev/null +++ b/lawnchair/res/xml/spec_foldable_folder_4x5_unfolded.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_foldable_hotseat_4x5_unfolded.xml b/lawnchair/res/xml/spec_foldable_hotseat_4x5_unfolded.xml new file mode 100644 index 0000000000..8a6cc2ccf2 --- /dev/null +++ b/lawnchair/res/xml/spec_foldable_hotseat_4x5_unfolded.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_foldable_workspace_4x5_unfolded.xml b/lawnchair/res/xml/spec_foldable_workspace_4x5_unfolded.xml new file mode 100644 index 0000000000..e240ac6952 --- /dev/null +++ b/lawnchair/res/xml/spec_foldable_workspace_4x5_unfolded.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_foldable_workspace_cell_4x5_unfolded.xml b/lawnchair/res/xml/spec_foldable_workspace_cell_4x5_unfolded.xml new file mode 100644 index 0000000000..d26c4479ad --- /dev/null +++ b/lawnchair/res/xml/spec_foldable_workspace_cell_4x5_unfolded.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_handheld_all_apps.xml b/lawnchair/res/xml/spec_handheld_all_apps.xml new file mode 100644 index 0000000000..ce700eb5cd --- /dev/null +++ b/lawnchair/res/xml/spec_handheld_all_apps.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_handheld_folder_4x5.xml b/lawnchair/res/xml/spec_handheld_folder_4x5.xml new file mode 100644 index 0000000000..52c1b2ecb9 --- /dev/null +++ b/lawnchair/res/xml/spec_handheld_folder_4x5.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_handheld_hotseat_4x5.xml b/lawnchair/res/xml/spec_handheld_hotseat_4x5.xml new file mode 100644 index 0000000000..f9c55a6cc5 --- /dev/null +++ b/lawnchair/res/xml/spec_handheld_hotseat_4x5.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_handheld_workspace_4x5.xml b/lawnchair/res/xml/spec_handheld_workspace_4x5.xml new file mode 100644 index 0000000000..74b3349914 --- /dev/null +++ b/lawnchair/res/xml/spec_handheld_workspace_4x5.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lawnchair/res/xml/spec_handheld_workspace_cell_4x5.xml b/lawnchair/res/xml/spec_handheld_workspace_cell_4x5.xml new file mode 100644 index 0000000000..3dc494318a --- /dev/null +++ b/lawnchair/res/xml/spec_handheld_workspace_cell_4x5.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 03da536167..51a91fd740 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -166,6 +166,7 @@ import androidx.annotation.StringRes; import androidx.annotation.UiThread; import androidx.annotation.VisibleForTesting; import androidx.core.os.BuildCompat; +import androidx.window.embedding.RuleController; import com.android.launcher3.DropTarget.DragObject; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; @@ -605,11 +606,11 @@ public class Launcher extends StatefulActivity setTitle(R.string.home_screen); mStartupLatencyLogger.logEnd(LAUNCHER_LATENCY_STARTUP_ACTIVITY_ON_CREATE); -// if (BuildCompat.isAtLeastV() -// && com.android.launcher3.Flags.enableTwoPaneLauncherSettings()) { -// RuleController.getInstance(this).setRules( -// RuleController.parseRules(this, R.xml.split_configuration)); -// } + if (BuildCompat.isAtLeastV() + && com.android.launcher3.Flags.enableTwoPaneLauncherSettings()) { + RuleController.getInstance(this).setRules( + RuleController.parseRules(this, R.xml.split_configuration)); + } } protected ModelCallbacks createModelCallbacks() {