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

Commit d987a828 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Initial commit of new split screen work.

TODO:
* Extract out common elements in TaskShortcutFactory.MultiWindowFactory
for commonalities between new and old way of
invoking split screen
* Integrate with WM APIs (b/182002789)
* Write tests for SplitSelectStateController

Bug: 181704764

Change-Id: Ice35adb4ea82897f5e2433dc9b93a549f3d511b5
parent 510fc67c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,14 @@
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <com.android.quickstep.views.SplitPlaceholderView
        android:id="@+id/split_placeholder"
        android:layout_width="match_parent"
        android:layout_height="@dimen/split_placeholder_size"
        android:background="@android:color/white"
        android:alpha=".8"
        android:visibility="gone" />

    <com.android.quickstep.fallback.RecentsDragLayer
        android:id="@+id/drag_layer"
        android:layout_width="match_parent"
+8 −0
Original line number Diff line number Diff line
@@ -15,6 +15,14 @@
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">

    <com.android.quickstep.views.SplitPlaceholderView
        android:id="@+id/split_placeholder"
        android:layout_width="match_parent"
        android:layout_height="@dimen/split_placeholder_size"
        android:background="@android:color/white"
        android:alpha=".8"
        android:visibility="gone" />

    <com.android.quickstep.views.LauncherRecentsView
        android:id="@+id/overview_panel"
        android:layout_width="match_parent"
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
    <dimen name="overview_grid_bottom_margin">90dp</dimen>
    <dimen name="overview_grid_side_margin">54dp</dimen>
    <dimen name="overview_grid_row_spacing">42dp</dimen>
    <dimen name="split_placeholder_size">110dp</dimen>

    <dimen name="recents_page_spacing">16dp</dimen>
    <dimen name="recents_clear_all_deadzone_vertical_margin">70dp</dimen>
+0 −2
Original line number Diff line number Diff line
@@ -22,8 +22,6 @@
    <string name="derived_app_name" translatable="false">Quickstep</string>

    <!-- Options for recent tasks -->
    <!-- Title for an option to enter split screen mode for a given app -->
    <string name="recent_task_option_split_screen">Split screen</string>
    <!-- Title for an option to keep an app pinned to the screen until it is unpinned -->
    <string name="recent_task_option_pin">Pin</string>
    <!-- Title for an option to enter freeform mode for a given app -->
+8 −1
Original line number Diff line number Diff line
@@ -58,8 +58,10 @@ import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskUtils;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.quickstep.util.SplitSelectStateController;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.SplitPlaceholderView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -215,7 +217,12 @@ public abstract class BaseQuickstepLauncher extends Launcher

        SysUINavigationMode.INSTANCE.get(this).updateMode();
        mActionsView = findViewById(R.id.overview_actions_view);
        ((RecentsView) getOverviewPanel()).init(mActionsView);
        SplitPlaceholderView splitPlaceholderView = findViewById(R.id.split_placeholder);
        RecentsView overviewPanel = (RecentsView) getOverviewPanel();
        splitPlaceholderView.init(
                new SplitSelectStateController(SystemUiProxy.INSTANCE.get(this))
        );
        overviewPanel.init(mActionsView, splitPlaceholderView);
        mActionsView.updateVerticalMargin(SysUINavigationMode.getMode(this));

        addTaskbarIfNecessary();
Loading