Merge "Rename splitscreen package to legacysplitscreen"
This commit is contained in:
committed by
Android (Google) Code Review
commit
6facc82fe8
@@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.wm.shell.splitscreen.DividerView
|
||||
<com.android.wm.shell.legacysplitscreen.DividerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
@@ -24,15 +24,15 @@
|
||||
android:id="@+id/docked_divider_background"
|
||||
android:background="@color/docked_divider_background"/>
|
||||
|
||||
<com.android.wm.shell.splitscreen.MinimizedDockShadow
|
||||
<com.android.wm.shell.legacysplitscreen.MinimizedDockShadow
|
||||
style="@style/DockedDividerMinimizedShadow"
|
||||
android:id="@+id/minimized_dock_shadow"
|
||||
android:alpha="0"/>">
|
||||
|
||||
<com.android.wm.shell.splitscreen.DividerHandleView
|
||||
<com.android.wm.shell.legacysplitscreen.DividerHandleView
|
||||
style="@style/DockedDividerHandle"
|
||||
android:id="@+id/docked_divider_handle"
|
||||
android:contentDescription="@string/accessibility_divider"
|
||||
android:background="@null"/>
|
||||
|
||||
</com.android.wm.shell.splitscreen.DividerView>
|
||||
</com.android.wm.shell.legacysplitscreen.DividerView>
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"messages": {
|
||||
"-1993693214": {
|
||||
"message": "Letterbox Task Changed: #%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/letterbox\/LetterboxTaskListener.java"
|
||||
},
|
||||
"-1683614271": {
|
||||
"message": "Existing task: id=%d component=%s",
|
||||
"level": "VERBOSE",
|
||||
@@ -37,6 +31,12 @@
|
||||
"group": "WM_SHELL_DRAG_AND_DROP",
|
||||
"at": "com\/android\/wm\/shell\/draganddrop\/DragAndDropController.java"
|
||||
},
|
||||
"-1362429294": {
|
||||
"message": "%s onTaskAppeared Primary taskId=%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/legacysplitscreen\/LegacySplitScreenTaskListener.java"
|
||||
},
|
||||
"-1340279385": {
|
||||
"message": "Remove listener=%s",
|
||||
"level": "VERBOSE",
|
||||
@@ -73,12 +73,6 @@
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
|
||||
},
|
||||
"-842742255": {
|
||||
"message": "%s onTaskAppeared unknown taskId=%d winMode=%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/splitscreen\/SplitScreenTaskListener.java"
|
||||
},
|
||||
"-742394458": {
|
||||
"message": "pair task1=%d task2=%d in AppPair=%s",
|
||||
"level": "VERBOSE",
|
||||
@@ -91,17 +85,11 @@
|
||||
"group": "WM_SHELL_DRAG_AND_DROP",
|
||||
"at": "com\/android\/wm\/shell\/draganddrop\/DragLayout.java"
|
||||
},
|
||||
"-679492476": {
|
||||
"message": "%s onTaskAppeared Primary taskId=%d",
|
||||
"-298656957": {
|
||||
"message": "%s onTaskAppeared unknown taskId=%d winMode=%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/splitscreen\/SplitScreenTaskListener.java"
|
||||
},
|
||||
"-342975160": {
|
||||
"message": "Letterbox Task Vanished: #%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/letterbox\/LetterboxTaskListener.java"
|
||||
"at": "com\/android\/wm\/shell\/legacysplitscreen\/LegacySplitScreenTaskListener.java"
|
||||
},
|
||||
"-234284913": {
|
||||
"message": "unpair taskId=%d pair=%s",
|
||||
@@ -115,12 +103,6 @@
|
||||
"group": "WM_SHELL_TRANSITIONS",
|
||||
"at": "com\/android\/wm\/shell\/Transitions.java"
|
||||
},
|
||||
"154313206": {
|
||||
"message": "%s onTaskAppeared Secondary taskId=%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/splitscreen\/SplitScreenTaskListener.java"
|
||||
},
|
||||
"157713005": {
|
||||
"message": "Task info changed taskId=%d",
|
||||
"level": "VERBOSE",
|
||||
@@ -139,6 +121,12 @@
|
||||
"group": "WM_SHELL_DRAG_AND_DROP",
|
||||
"at": "com\/android\/wm\/shell\/draganddrop\/DragAndDropController.java"
|
||||
},
|
||||
"473543554": {
|
||||
"message": "%s onTaskAppeared Supported",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/legacysplitscreen\/LegacySplitScreenTaskListener.java"
|
||||
},
|
||||
"481673835": {
|
||||
"message": "addListenerForTaskId taskId=%s",
|
||||
"level": "VERBOSE",
|
||||
@@ -175,6 +163,12 @@
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
|
||||
},
|
||||
"982027396": {
|
||||
"message": "%s onTaskAppeared Secondary taskId=%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/legacysplitscreen\/LegacySplitScreenTaskListener.java"
|
||||
},
|
||||
"1079041527": {
|
||||
"message": "incrementPool size=%d",
|
||||
"level": "VERBOSE",
|
||||
@@ -199,12 +193,6 @@
|
||||
"group": "WM_SHELL_DRAG_AND_DROP",
|
||||
"at": "com\/android\/wm\/shell\/draganddrop\/DragAndDropController.java"
|
||||
},
|
||||
"1885882094": {
|
||||
"message": "Letterbox Task Appeared: #%d",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/letterbox\/LetterboxTaskListener.java"
|
||||
},
|
||||
"1891981945": {
|
||||
"message": "release entry.taskId=%s listener=%s size=%d",
|
||||
"level": "VERBOSE",
|
||||
@@ -228,12 +216,6 @@
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_DRAG_AND_DROP",
|
||||
"at": "com\/android\/wm\/shell\/draganddrop\/DragAndDropController.java"
|
||||
},
|
||||
"2135461748": {
|
||||
"message": "%s onTaskAppeared Supported",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_SHELL_TASK_ORG",
|
||||
"at": "com\/android\/wm\/shell\/splitscreen\/SplitScreenTaskListener.java"
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.android.wm.shell.common.annotations.ExternalThread;
|
||||
import com.android.wm.shell.hidedisplaycutout.HideDisplayCutout;
|
||||
import com.android.wm.shell.onehanded.OneHanded;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Optional;
|
||||
@@ -33,7 +33,7 @@ import java.util.Optional;
|
||||
*/
|
||||
public final class ShellCommandHandler {
|
||||
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mLegacySplitScreenOptional;
|
||||
private final Optional<Pip> mPipOptional;
|
||||
private final Optional<OneHanded> mOneHandedOptional;
|
||||
private final Optional<HideDisplayCutout> mHideDisplayCutout;
|
||||
@@ -42,13 +42,13 @@ public final class ShellCommandHandler {
|
||||
|
||||
public ShellCommandHandler(
|
||||
ShellTaskOrganizer shellTaskOrganizer,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> legacySplitScreenOptional,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<OneHanded> oneHandedOptional,
|
||||
Optional<HideDisplayCutout> hideDisplayCutout,
|
||||
Optional<AppPairs> appPairsOptional) {
|
||||
mShellTaskOrganizer = shellTaskOrganizer;
|
||||
mSplitScreenOptional = splitScreenOptional;
|
||||
mLegacySplitScreenOptional = legacySplitScreenOptional;
|
||||
mPipOptional = pipOptional;
|
||||
mOneHandedOptional = oneHandedOptional;
|
||||
mHideDisplayCutout = hideDisplayCutout;
|
||||
@@ -62,7 +62,7 @@ public final class ShellCommandHandler {
|
||||
pw.println();
|
||||
pw.println();
|
||||
mPipOptional.ifPresent(pip -> pip.dump(pw));
|
||||
mSplitScreenOptional.ifPresent(splitScreen -> splitScreen.dump(pw));
|
||||
mLegacySplitScreenOptional.ifPresent(splitScreen -> splitScreen.dump(pw));
|
||||
mOneHandedOptional.ifPresent(oneHanded -> oneHanded.dump(pw));
|
||||
mHideDisplayCutout.ifPresent(hideDisplayCutout -> hideDisplayCutout.dump(pw));
|
||||
pw.println();
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.android.wm.shell.apppairs.AppPairs;
|
||||
import com.android.wm.shell.common.DisplayImeController;
|
||||
import com.android.wm.shell.common.annotations.ExternalThread;
|
||||
import com.android.wm.shell.draganddrop.DragAndDropController;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ShellInit {
|
||||
private final DisplayImeController mDisplayImeController;
|
||||
private final DragAndDropController mDragAndDropController;
|
||||
private final ShellTaskOrganizer mShellTaskOrganizer;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mLegacySplitScreenOptional;
|
||||
private final Optional<AppPairs> mAppPairsOptional;
|
||||
private final FullscreenTaskListener mFullscreenTaskListener;
|
||||
private final Transitions mTransitions;
|
||||
@@ -42,14 +42,14 @@ public class ShellInit {
|
||||
public ShellInit(DisplayImeController displayImeController,
|
||||
DragAndDropController dragAndDropController,
|
||||
ShellTaskOrganizer shellTaskOrganizer,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> legacySplitScreenOptional,
|
||||
Optional<AppPairs> appPairsOptional,
|
||||
FullscreenTaskListener fullscreenTaskListener,
|
||||
Transitions transitions) {
|
||||
mDisplayImeController = displayImeController;
|
||||
mDragAndDropController = dragAndDropController;
|
||||
mShellTaskOrganizer = shellTaskOrganizer;
|
||||
mSplitScreenOptional = splitScreenOptional;
|
||||
mLegacySplitScreenOptional = legacySplitScreenOptional;
|
||||
mAppPairsOptional = appPairsOptional;
|
||||
mFullscreenTaskListener = fullscreenTaskListener;
|
||||
mTransitions = transitions;
|
||||
@@ -67,7 +67,7 @@ public class ShellInit {
|
||||
|
||||
mAppPairsOptional.ifPresent(AppPairs::onOrganizerRegistered);
|
||||
// Bind the splitscreen impl to the drag drop controller
|
||||
mDragAndDropController.setSplitScreenController(mSplitScreenOptional);
|
||||
mDragAndDropController.setSplitScreenController(mLegacySplitScreenOptional);
|
||||
|
||||
if (Transitions.ENABLE_SHELL_TRANSITIONS) {
|
||||
mTransitions.register(mShellTaskOrganizer);
|
||||
|
||||
@@ -52,7 +52,7 @@ import com.android.internal.protolog.common.ProtoLog;
|
||||
import com.android.wm.shell.R;
|
||||
import com.android.wm.shell.common.DisplayController;
|
||||
import com.android.wm.shell.protolog.ShellProtoLogGroup;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
|
||||
|
||||
private final Context mContext;
|
||||
private final DisplayController mDisplayController;
|
||||
private SplitScreen mSplitScreen;
|
||||
private LegacySplitScreen mLegacySplitScreen;
|
||||
|
||||
private final SparseArray<PerDisplay> mDisplayDropTargets = new SparseArray<>();
|
||||
private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction();
|
||||
@@ -77,8 +77,8 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
|
||||
mDisplayController.addDisplayWindowListener(this);
|
||||
}
|
||||
|
||||
public void setSplitScreenController(Optional<SplitScreen> splitscreen) {
|
||||
mSplitScreen = splitscreen.orElse(null);
|
||||
public void setSplitScreenController(Optional<LegacySplitScreen> splitscreen) {
|
||||
mLegacySplitScreen = splitscreen.orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,7 +104,7 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
|
||||
R.layout.global_drop_target, null);
|
||||
rootView.setOnDragListener(this);
|
||||
rootView.setVisibility(View.INVISIBLE);
|
||||
DragLayout dragLayout = new DragLayout(context, mSplitScreen);
|
||||
DragLayout dragLayout = new DragLayout(context, mLegacySplitScreen);
|
||||
rootView.addView(dragLayout,
|
||||
new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
|
||||
try {
|
||||
|
||||
@@ -37,7 +37,6 @@ import static com.android.wm.shell.draganddrop.DragAndDropPolicy.Target.TYPE_SPL
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityTaskManager;
|
||||
import android.app.IActivityTaskManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.WindowConfiguration;
|
||||
import android.content.ActivityNotFoundException;
|
||||
@@ -60,7 +59,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.wm.shell.common.DisplayLayout;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -78,22 +77,22 @@ public class DragAndDropPolicy {
|
||||
private final Context mContext;
|
||||
private final ActivityTaskManager mActivityTaskManager;
|
||||
private final Starter mStarter;
|
||||
private final SplitScreen mSplitScreen;
|
||||
private final LegacySplitScreen mLegacySplitScreen;
|
||||
private final ArrayList<DragAndDropPolicy.Target> mTargets = new ArrayList<>();
|
||||
|
||||
private DragSession mSession;
|
||||
|
||||
public DragAndDropPolicy(Context context, SplitScreen splitScreen) {
|
||||
this(context, ActivityTaskManager.getInstance(), splitScreen,
|
||||
new DefaultStarter(context, splitScreen));
|
||||
public DragAndDropPolicy(Context context, LegacySplitScreen legacySplitScreen) {
|
||||
this(context, ActivityTaskManager.getInstance(), legacySplitScreen,
|
||||
new DefaultStarter(context, legacySplitScreen));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
DragAndDropPolicy(Context context, ActivityTaskManager activityTaskManager,
|
||||
SplitScreen splitScreen, Starter starter) {
|
||||
LegacySplitScreen legacySplitScreen, Starter starter) {
|
||||
mContext = context;
|
||||
mActivityTaskManager = activityTaskManager;
|
||||
mSplitScreen = splitScreen;
|
||||
mLegacySplitScreen = legacySplitScreen;
|
||||
mStarter = starter;
|
||||
}
|
||||
|
||||
@@ -151,13 +150,13 @@ public class DragAndDropPolicy {
|
||||
new Rect(w / 2, 0, w, h)));
|
||||
}
|
||||
} else if (mSession.dragItemSupportsSplitscreen
|
||||
&& mSplitScreen != null
|
||||
&& mSplitScreen.isDividerVisible()) {
|
||||
&& mLegacySplitScreen != null
|
||||
&& mLegacySplitScreen.isDividerVisible()) {
|
||||
// Already split, allow replacing existing split task
|
||||
// TODO(b/169894807): For now, only allow replacing the non-primary task until we have
|
||||
// split pairs
|
||||
final Rect secondarySplitRawBounds =
|
||||
mSplitScreen.getDividerView().getNonMinimizedSplitScreenSecondaryBounds();
|
||||
mLegacySplitScreen.getDividerView().getNonMinimizedSplitScreenSecondaryBounds();
|
||||
final Rect secondarySplitBounds = new Rect(secondarySplitRawBounds);
|
||||
secondarySplitBounds.intersect(new Rect(l, t, l + iw, t + ih));
|
||||
if (isVerticalSplit) {
|
||||
@@ -212,14 +211,14 @@ public class DragAndDropPolicy {
|
||||
|
||||
boolean deferAppLaunchUntilSplit = false;
|
||||
if (target.type == TYPE_FULLSCREEN) {
|
||||
if (mSplitScreen != null && mSplitScreen.isDividerVisible()) {
|
||||
if (mLegacySplitScreen != null && mLegacySplitScreen.isDividerVisible()) {
|
||||
// If in split, remove split and launch fullscreen
|
||||
mStarter.exitSplitScreen(mSession.runningTaskId);
|
||||
} else {
|
||||
// Not in split, fall through to launch
|
||||
}
|
||||
} else {
|
||||
if (mSplitScreen != null && mSplitScreen.isDividerVisible()) {
|
||||
if (mLegacySplitScreen != null && mLegacySplitScreen.isDividerVisible()) {
|
||||
// Split is already visible, just replace the task
|
||||
// TODO(b/169894807): Since we only allow replacing the non-primary target above
|
||||
// just fall through and start the activity
|
||||
@@ -250,12 +249,12 @@ public class DragAndDropPolicy {
|
||||
// into split, and we should wait for home and other tasks to be moved to
|
||||
// split-secondary before trying to launch the new secondary task. This can be removed
|
||||
// once we have app-pairs.
|
||||
mSplitScreen.registerInSplitScreenListener(new Consumer<Boolean>() {
|
||||
mLegacySplitScreen.registerInSplitScreenListener(new Consumer<Boolean>() {
|
||||
@Override
|
||||
public void accept(Boolean inSplit) {
|
||||
if (inSplit) {
|
||||
startAppRunnable.run();
|
||||
mSplitScreen.unregisterInSplitScreenListener(this);
|
||||
mLegacySplitScreen.unregisterInSplitScreenListener(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -333,11 +332,11 @@ public class DragAndDropPolicy {
|
||||
*/
|
||||
private static class DefaultStarter implements Starter {
|
||||
private final Context mContext;
|
||||
private final SplitScreen mSplitScreen;
|
||||
private final LegacySplitScreen mLegacySplitScreen;
|
||||
|
||||
public DefaultStarter(Context context, SplitScreen splitScreen) {
|
||||
public DefaultStarter(Context context, LegacySplitScreen legacySplitScreen) {
|
||||
mContext = context;
|
||||
mSplitScreen = splitScreen;
|
||||
mLegacySplitScreen = legacySplitScreen;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -373,12 +372,12 @@ public class DragAndDropPolicy {
|
||||
|
||||
@Override
|
||||
public void enterSplitScreen(int taskId, boolean leftOrTop) {
|
||||
mSplitScreen.splitPrimaryTask();
|
||||
mLegacySplitScreen.splitPrimaryTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitSplitScreen(int taskId) {
|
||||
mSplitScreen.dismissSplitToPrimaryTask();
|
||||
mLegacySplitScreen.dismissSplitToPrimaryTask();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import android.view.SurfaceControl;
|
||||
import android.view.View;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowInsets.Type;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -43,10 +42,9 @@ import com.android.internal.protolog.common.ProtoLog;
|
||||
import com.android.wm.shell.R;
|
||||
import com.android.wm.shell.common.DisplayLayout;
|
||||
import com.android.wm.shell.protolog.ShellProtoLogGroup;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Coordinates the visible drop targets for the current drag.
|
||||
@@ -63,7 +61,7 @@ public class DragLayout extends View {
|
||||
private boolean mIsShowing;
|
||||
private boolean mHasDropped;
|
||||
|
||||
public DragLayout(Context context, SplitScreen splitscreen) {
|
||||
public DragLayout(Context context, LegacySplitScreen splitscreen) {
|
||||
super(context);
|
||||
mPolicy = new DragAndDropPolicy(context, splitscreen);
|
||||
mDisplayMargin = context.getResources().getDimensionPixelSize(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED;
|
||||
import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED;
|
||||
@@ -37,11 +37,11 @@ import com.android.wm.shell.common.TransactionPool;
|
||||
|
||||
class DividerImeController implements DisplayImeController.ImePositionProcessor {
|
||||
private static final String TAG = "DividerImeController";
|
||||
private static final boolean DEBUG = SplitScreenController.DEBUG;
|
||||
private static final boolean DEBUG = LegacySplitScreenController.DEBUG;
|
||||
|
||||
private static final float ADJUSTED_NONFOCUS_DIM = 0.3f;
|
||||
|
||||
private final SplitScreenTaskListener mSplits;
|
||||
private final LegacySplitScreenTaskListener mSplits;
|
||||
private final TransactionPool mTransactionPool;
|
||||
private final Handler mHandler;
|
||||
private final TaskOrganizer mTaskOrganizer;
|
||||
@@ -93,8 +93,8 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
||||
private boolean mPausedTargetAdjusted = false;
|
||||
private boolean mAdjustedWhileHidden = false;
|
||||
|
||||
DividerImeController(SplitScreenTaskListener splits, TransactionPool pool, Handler handler,
|
||||
TaskOrganizer taskOrganizer) {
|
||||
DividerImeController(LegacySplitScreenTaskListener splits, TransactionPool pool,
|
||||
Handler handler, TaskOrganizer taskOrganizer) {
|
||||
mSplits = splits;
|
||||
mTransactionPool = pool;
|
||||
mHandler = handler;
|
||||
@@ -105,7 +105,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
||||
return mSplits.mSplitScreenController.getDividerView();
|
||||
}
|
||||
|
||||
private SplitDisplayLayout getLayout() {
|
||||
private LegacySplitDisplayLayout getLayout() {
|
||||
return mSplits.mSplitScreenController.getSplitLayout();
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
||||
// Reposition the server's secondary split position so that it evaluates
|
||||
// insets properly.
|
||||
WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
final SplitDisplayLayout splitLayout = getLayout();
|
||||
final LegacySplitDisplayLayout splitLayout = getLayout();
|
||||
if (mTargetAdjusted) {
|
||||
splitLayout.updateAdjustedBounds(mShownTop, mHiddenTop, mShownTop);
|
||||
wct.setBounds(mSplits.mSecondary.token, splitLayout.mAdjustedSecondary);
|
||||
@@ -285,7 +285,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
||||
private void onProgress(float progress, SurfaceControl.Transaction t) {
|
||||
final DividerView view = getView();
|
||||
if (mTargetAdjusted != mAdjusted && !mPaused) {
|
||||
final SplitDisplayLayout splitLayout = getLayout();
|
||||
final LegacySplitDisplayLayout splitLayout = getLayout();
|
||||
final float fraction = mTargetAdjusted ? progress : 1.f - progress;
|
||||
mLastAdjustTop = (int) (fraction * mShownTop + (1.f - fraction) * mHiddenTop);
|
||||
splitLayout.updateAdjustedBounds(mLastAdjustTop, mHiddenTop, mShownTop);
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
/**
|
||||
* Class to hold state of divider that needs to persist across configuration changes.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
|
||||
import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
|
||||
@@ -75,7 +75,7 @@ import java.util.function.Consumer;
|
||||
public class DividerView extends FrameLayout implements OnTouchListener,
|
||||
OnComputeInternalInsetsListener {
|
||||
private static final String TAG = "DividerView";
|
||||
private static final boolean DEBUG = SplitScreenController.DEBUG;
|
||||
private static final boolean DEBUG = LegacySplitScreenController.DEBUG;
|
||||
|
||||
interface DividerCallbacks {
|
||||
void onDraggingStart();
|
||||
@@ -137,12 +137,12 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
||||
private final Rect mOtherInsetRect = new Rect();
|
||||
private final Rect mLastResizeRect = new Rect();
|
||||
private final Rect mTmpRect = new Rect();
|
||||
private SplitScreenController mSplitScreenController;
|
||||
private LegacySplitScreenController mSplitScreenController;
|
||||
private WindowManagerProxy mWindowManagerProxy;
|
||||
private DividerWindowManager mWindowManager;
|
||||
private VelocityTracker mVelocityTracker;
|
||||
private FlingAnimationUtils mFlingAnimationUtils;
|
||||
private SplitDisplayLayout mSplitLayout;
|
||||
private LegacySplitDisplayLayout mSplitLayout;
|
||||
private DividerImeController mImeController;
|
||||
private DividerCallbacks mCallback;
|
||||
private final AnimationHandler mAnimationHandler = new AnimationHandler();
|
||||
@@ -156,7 +156,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
||||
private boolean mAdjustedForIme;
|
||||
private DividerState mState;
|
||||
|
||||
private SplitScreenTaskListener mTiles;
|
||||
private LegacySplitScreenTaskListener mTiles;
|
||||
boolean mFirstLayout = true;
|
||||
int mDividerPositionX;
|
||||
int mDividerPositionY;
|
||||
@@ -353,10 +353,11 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
||||
}
|
||||
}
|
||||
|
||||
void injectDependencies(SplitScreenController splitScreenController,
|
||||
void injectDependencies(LegacySplitScreenController splitScreenController,
|
||||
DividerWindowManager windowManager, DividerState dividerState,
|
||||
DividerCallbacks callback, SplitScreenTaskListener tiles, SplitDisplayLayout sdl,
|
||||
DividerImeController imeController, WindowManagerProxy wmProxy) {
|
||||
DividerCallbacks callback, LegacySplitScreenTaskListener tiles,
|
||||
LegacySplitDisplayLayout sdl, DividerImeController imeController,
|
||||
WindowManagerProxy wmProxy) {
|
||||
mSplitScreenController = splitScreenController;
|
||||
mWindowManager = windowManager;
|
||||
mState = dividerState;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY;
|
||||
import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SPLIT_SCREEN;
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
|
||||
import static com.android.wm.shell.splitscreen.ForcedResizableInfoActivity.EXTRA_FORCED_RESIZEABLE_REASON;
|
||||
import static com.android.wm.shell.legacysplitscreen.ForcedResizableInfoActivity.EXTRA_FORCED_RESIZEABLE_REASON;
|
||||
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
@@ -69,7 +69,7 @@ final class ForcedResizableInfoActivityController implements DividerView.Divider
|
||||
}
|
||||
|
||||
ForcedResizableInfoActivityController(Context context,
|
||||
SplitScreenController splitScreenController) {
|
||||
LegacySplitScreenController splitScreenController) {
|
||||
mContext = context;
|
||||
splitScreenController.registerInSplitScreenListener(mDockedStackExistsListener);
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
||||
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
|
||||
@@ -40,14 +40,14 @@ import com.android.wm.shell.common.DisplayLayout;
|
||||
* Handles split-screen related internal display layout. In general, this represents the
|
||||
* WM-facing understanding of the splits.
|
||||
*/
|
||||
public class SplitDisplayLayout {
|
||||
public class LegacySplitDisplayLayout {
|
||||
/** Minimum size of an adjusted stack bounds relative to original stack bounds. Used to
|
||||
* restrict IME adjustment so that a min portion of top stack remains visible.*/
|
||||
private static final float ADJUSTED_STACK_FRACTION_MIN = 0.3f;
|
||||
|
||||
private static final int DIVIDER_WIDTH_INACTIVE_DP = 4;
|
||||
|
||||
SplitScreenTaskListener mTiles;
|
||||
LegacySplitScreenTaskListener mTiles;
|
||||
DisplayLayout mDisplayLayout;
|
||||
Context mContext;
|
||||
|
||||
@@ -62,7 +62,8 @@ public class SplitDisplayLayout {
|
||||
Rect mAdjustedPrimary = null;
|
||||
Rect mAdjustedSecondary = null;
|
||||
|
||||
public SplitDisplayLayout(Context ctx, DisplayLayout dl, SplitScreenTaskListener taskTiles) {
|
||||
public LegacySplitDisplayLayout(Context ctx, DisplayLayout dl,
|
||||
LegacySplitScreenTaskListener taskTiles) {
|
||||
mTiles = taskTiles;
|
||||
mDisplayLayout = dl;
|
||||
mContext = ctx;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.window.WindowContainerToken;
|
||||
@@ -29,7 +29,7 @@ import java.util.function.Consumer;
|
||||
* Interface to engage split screen feature.
|
||||
*/
|
||||
@ExternalThread
|
||||
public interface SplitScreen {
|
||||
public interface LegacySplitScreen {
|
||||
/** Called when keyguard showing state changed. */
|
||||
void onKeyguardVisibilityChanged(boolean isShowing);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
|
||||
@@ -65,7 +65,7 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* Controls split screen feature.
|
||||
*/
|
||||
public class SplitScreenController implements SplitScreen,
|
||||
public class LegacySplitScreenController implements LegacySplitScreen,
|
||||
DisplayController.OnDisplaysChangedListener {
|
||||
static final boolean DEBUG = false;
|
||||
|
||||
@@ -80,7 +80,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
private final DividerState mDividerState = new DividerState();
|
||||
private final ForcedResizableInfoActivityController mForcedResizableController;
|
||||
private final Handler mHandler;
|
||||
private final SplitScreenTaskListener mSplits;
|
||||
private final LegacySplitScreenTaskListener mSplits;
|
||||
private final SystemWindows mSystemWindows;
|
||||
final TransactionPool mTransactionPool;
|
||||
private final WindowManagerProxy mWindowManagerProxy;
|
||||
@@ -96,12 +96,12 @@ public class SplitScreenController implements SplitScreen,
|
||||
private DividerView mView;
|
||||
|
||||
// Keeps track of real-time split geometry including snap positions and ime adjustments
|
||||
private SplitDisplayLayout mSplitLayout;
|
||||
private LegacySplitDisplayLayout mSplitLayout;
|
||||
|
||||
// Transient: this contains the layout calculated for a new rotation requested by WM. This is
|
||||
// kept around so that we can wait for a matching configuration change and then use the exact
|
||||
// layout that we sent back to WM.
|
||||
private SplitDisplayLayout mRotateSplitLayout;
|
||||
private LegacySplitDisplayLayout mRotateSplitLayout;
|
||||
|
||||
private boolean mIsKeyguardShowing;
|
||||
private boolean mVisible = false;
|
||||
@@ -109,7 +109,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
private boolean mAdjustedForIme = false;
|
||||
private boolean mHomeStackResizable = false;
|
||||
|
||||
public SplitScreenController(Context context,
|
||||
public LegacySplitScreenController(Context context,
|
||||
DisplayController displayController, SystemWindows systemWindows,
|
||||
DisplayImeController imeController, Handler handler, TransactionPool transactionPool,
|
||||
ShellTaskOrganizer shellTaskOrganizer, SyncTransactionQueue syncQueue,
|
||||
@@ -123,7 +123,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
mTransactionPool = transactionPool;
|
||||
mWindowManagerProxy = new WindowManagerProxy(syncQueue, shellTaskOrganizer);
|
||||
mTaskOrganizer = shellTaskOrganizer;
|
||||
mSplits = new SplitScreenTaskListener(this, shellTaskOrganizer, syncQueue);
|
||||
mSplits = new LegacySplitScreenTaskListener(this, shellTaskOrganizer, syncQueue);
|
||||
mImePositionProcessor = new DividerImeController(mSplits, mTransactionPool, mHandler,
|
||||
shellTaskOrganizer);
|
||||
mRotationController =
|
||||
@@ -134,8 +134,8 @@ public class SplitScreenController implements SplitScreen,
|
||||
WindowContainerTransaction t = new WindowContainerTransaction();
|
||||
DisplayLayout displayLayout =
|
||||
new DisplayLayout(mDisplayController.getDisplayLayout(display));
|
||||
SplitDisplayLayout sdl =
|
||||
new SplitDisplayLayout(mContext, displayLayout, mSplits);
|
||||
LegacySplitDisplayLayout sdl =
|
||||
new LegacySplitDisplayLayout(mContext, displayLayout, mSplits);
|
||||
sdl.rotateTo(toRotation);
|
||||
mRotateSplitLayout = sdl;
|
||||
final int position = isDividerVisible()
|
||||
@@ -229,7 +229,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
if (displayId != DEFAULT_DISPLAY) {
|
||||
return;
|
||||
}
|
||||
mSplitLayout = new SplitDisplayLayout(mDisplayController.getDisplayContext(displayId),
|
||||
mSplitLayout = new LegacySplitDisplayLayout(mDisplayController.getDisplayContext(displayId),
|
||||
mDisplayController.getDisplayLayout(displayId), mSplits);
|
||||
mImeController.addPositionProcessor(mImePositionProcessor);
|
||||
mDisplayController.addDisplayChangingController(mRotationController);
|
||||
@@ -251,7 +251,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
if (displayId != DEFAULT_DISPLAY || !mSplits.isSplitScreenSupported()) {
|
||||
return;
|
||||
}
|
||||
mSplitLayout = new SplitDisplayLayout(mDisplayController.getDisplayContext(displayId),
|
||||
mSplitLayout = new LegacySplitDisplayLayout(mDisplayController.getDisplayContext(displayId),
|
||||
mDisplayController.getDisplayLayout(displayId), mSplits);
|
||||
if (mRotateSplitLayout == null) {
|
||||
int midPos = mSplitLayout.getSnapAlgorithm().getMiddleTarget().position;
|
||||
@@ -586,7 +586,7 @@ public class SplitScreenController implements SplitScreen,
|
||||
}
|
||||
}
|
||||
|
||||
SplitDisplayLayout getSplitLayout() {
|
||||
LegacySplitDisplayLayout getSplitLayout() {
|
||||
return mSplitLayout;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
|
||||
@@ -43,9 +43,9 @@ import com.android.wm.shell.common.SyncTransactionQueue;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class SplitScreenTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
private static final String TAG = "SplitScreenTaskListener";
|
||||
private static final boolean DEBUG = SplitScreenController.DEBUG;
|
||||
class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
private static final String TAG = LegacySplitScreenTaskListener.class.getSimpleName();
|
||||
private static final boolean DEBUG = LegacySplitScreenController.DEBUG;
|
||||
|
||||
private final ShellTaskOrganizer mTaskOrganizer;
|
||||
private final SyncTransactionQueue mSyncQueue;
|
||||
@@ -58,12 +58,12 @@ class SplitScreenTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
SurfaceControl mPrimaryDim;
|
||||
SurfaceControl mSecondaryDim;
|
||||
Rect mHomeBounds = new Rect();
|
||||
final SplitScreenController mSplitScreenController;
|
||||
final LegacySplitScreenController mSplitScreenController;
|
||||
private boolean mSplitScreenSupported = false;
|
||||
|
||||
final SurfaceSession mSurfaceSession = new SurfaceSession();
|
||||
|
||||
SplitScreenTaskListener(SplitScreenController splitScreenController,
|
||||
LegacySplitScreenTaskListener(LegacySplitScreenController splitScreenController,
|
||||
ShellTaskOrganizer shellTaskOrganizer,
|
||||
SyncTransactionQueue syncQueue) {
|
||||
mSplitScreenController = splitScreenController;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.splitscreen;
|
||||
package com.android.wm.shell.legacysplitscreen;
|
||||
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
|
||||
@@ -88,8 +88,8 @@ class WindowManagerProxy {
|
||||
mTaskOrganizer = taskOrganizer;
|
||||
}
|
||||
|
||||
void dismissOrMaximizeDocked(final SplitScreenTaskListener tiles, SplitDisplayLayout layout,
|
||||
final boolean dismissOrMaximize) {
|
||||
void dismissOrMaximizeDocked(final LegacySplitScreenTaskListener tiles,
|
||||
LegacySplitDisplayLayout layout, final boolean dismissOrMaximize) {
|
||||
mExecutor.execute(() -> applyDismissSplit(tiles, layout, dismissOrMaximize));
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class WindowManagerProxy {
|
||||
mExecutor.execute(mSetTouchableRegionRunnable);
|
||||
}
|
||||
|
||||
void applyResizeSplits(int position, SplitDisplayLayout splitLayout) {
|
||||
void applyResizeSplits(int position, LegacySplitDisplayLayout splitLayout) {
|
||||
WindowContainerTransaction t = new WindowContainerTransaction();
|
||||
splitLayout.resizeSplits(position, t);
|
||||
new WindowOrganizer().applyTransaction(t);
|
||||
@@ -141,7 +141,7 @@ class WindowManagerProxy {
|
||||
* split is minimized. This actually "sticks out" of the secondary split area, but when in
|
||||
* minimized mode, the secondary split gets a 'negative' crop to expose it.
|
||||
*/
|
||||
boolean applyHomeTasksMinimized(SplitDisplayLayout layout, WindowContainerToken parent,
|
||||
boolean applyHomeTasksMinimized(LegacySplitDisplayLayout layout, WindowContainerToken parent,
|
||||
@NonNull WindowContainerTransaction wct) {
|
||||
// Resize the home/recents stacks to the larger minimized-state size
|
||||
final Rect homeBounds;
|
||||
@@ -189,7 +189,7 @@ class WindowManagerProxy {
|
||||
*
|
||||
* @return whether the home stack is resizable
|
||||
*/
|
||||
boolean applyEnterSplit(SplitScreenTaskListener tiles, SplitDisplayLayout layout) {
|
||||
boolean applyEnterSplit(LegacySplitScreenTaskListener tiles, LegacySplitDisplayLayout layout) {
|
||||
// Set launchtile first so that any stack created after
|
||||
// getAllRootTaskInfos and before reparent (even if unlikely) are placed
|
||||
// correctly.
|
||||
@@ -241,7 +241,7 @@ class WindowManagerProxy {
|
||||
* split (thus resulting in the top of the secondary split becoming
|
||||
* fullscreen. {@code false} resolves the other way.
|
||||
*/
|
||||
void applyDismissSplit(SplitScreenTaskListener tiles, SplitDisplayLayout layout,
|
||||
void applyDismissSplit(LegacySplitScreenTaskListener tiles, LegacySplitDisplayLayout layout,
|
||||
boolean dismissOrMaximize) {
|
||||
// Set launch root first so that any task created after getChildContainers and
|
||||
// before reparent (pretty unlikely) are put into fullscreen.
|
||||
@@ -66,7 +66,7 @@ import com.android.wm.shell.ShellTaskOrganizer;
|
||||
import com.android.wm.shell.common.DisplayController;
|
||||
import com.android.wm.shell.pip.phone.PipMotionHelper;
|
||||
import com.android.wm.shell.pip.phone.PipUpdateThread;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
@@ -142,7 +142,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
private final int mEnterExitAnimationDuration;
|
||||
private final PipSurfaceTransactionHelper mSurfaceTransactionHelper;
|
||||
private final Map<IBinder, Configuration> mInitialState = new HashMap<>();
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
protected final ShellTaskOrganizer mTaskOrganizer;
|
||||
|
||||
// These callbacks are called on the update thread
|
||||
@@ -265,7 +265,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
@NonNull PipBoundsAlgorithm boundsHandler,
|
||||
@NonNull PipMenuController pipMenuController,
|
||||
@NonNull PipSurfaceTransactionHelper surfaceTransactionHelper,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
@NonNull DisplayController displayController,
|
||||
@NonNull PipUiEventLogger pipUiEventLogger,
|
||||
@NonNull ShellTaskOrganizer shellTaskOrganizer) {
|
||||
@@ -1118,7 +1118,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
}
|
||||
|
||||
/**
|
||||
* Sync with {@link SplitScreen} on destination bounds if PiP is going to split screen.
|
||||
* Sync with {@link LegacySplitScreen} on destination bounds if PiP is going to split screen.
|
||||
*
|
||||
* @param destinationBoundsOut contain the updated destination bounds if applicable
|
||||
* @return {@code true} if destinationBounds is altered for split screen
|
||||
@@ -1128,15 +1128,15 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
return false;
|
||||
}
|
||||
|
||||
SplitScreen splitScreen = mSplitScreenOptional.get();
|
||||
if (!splitScreen.isDividerVisible()) {
|
||||
LegacySplitScreen legacySplitScreen = mSplitScreenOptional.get();
|
||||
if (!legacySplitScreen.isDividerVisible()) {
|
||||
// fail early if system is not in split screen mode
|
||||
return false;
|
||||
}
|
||||
|
||||
// PiP window will go to split-secondary mode instead of fullscreen, populates the
|
||||
// split screen bounds here.
|
||||
destinationBoundsOut.set(splitScreen.getDividerView()
|
||||
destinationBoundsOut.set(legacySplitScreen.getDividerView()
|
||||
.getNonMinimizedSplitScreenSecondaryBounds());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.view.Surface
|
||||
@@ -52,7 +52,7 @@ import org.junit.runners.Parameterized
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class EnterSplitScreenTest(
|
||||
class EnterLegacySplitScreenTest(
|
||||
rotationName: String,
|
||||
rotation: Int
|
||||
) : SplitScreenTestBase(rotationName, rotation) {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.util.Rational
|
||||
@@ -45,7 +45,7 @@ import org.junit.runners.Parameterized
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class ExitSplitScreenTest(
|
||||
class ExitLegacySplitScreenTest(
|
||||
rotationName: String,
|
||||
rotation: Int
|
||||
) : SplitScreenTestBase(rotationName, rotation) {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.view.Surface
|
||||
@@ -54,7 +54,7 @@ import org.junit.runners.Parameterized
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class SplitScreenToLauncherTest(
|
||||
class LegacySplitScreenToLauncherTest(
|
||||
testName: String,
|
||||
flickerSpec: Flicker
|
||||
) : FlickerTestRunner(testName, flickerSpec) {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.view.Surface
|
||||
@@ -54,7 +54,7 @@ import org.junit.runners.Parameterized
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenAppToSplitScreenTest(
|
||||
class OpenAppToLegacySplitScreenTest(
|
||||
testName: String,
|
||||
flickerSpec: Flicker
|
||||
) : FlickerTestRunner(testName, flickerSpec) {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.graphics.Region
|
||||
import android.util.Rational
|
||||
@@ -63,7 +63,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@FlakyTest(bugId = 159096424)
|
||||
class ResizeSplitScreenTest(
|
||||
class ResizeLegacySplitScreenTest(
|
||||
testName: String,
|
||||
flickerSpec: Flicker
|
||||
) : FlickerTestRunner(testName, flickerSpec) {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.view.Surface
|
||||
import androidx.test.filters.RequiresDevice
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import android.view.Surface
|
||||
import androidx.test.filters.RequiresDevice
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.splitscreen
|
||||
package com.android.wm.shell.flicker.legacysplitscreen
|
||||
|
||||
import com.android.wm.shell.flicker.NonRotationTestBase
|
||||
import com.android.wm.shell.flicker.TEST_APP_NONRESIZEABLE_LABEL
|
||||
@@ -47,7 +47,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@FlakyTest(bugId = 161435597)
|
||||
class PipSplitScreenTest(
|
||||
class PipLegacySplitScreenTest(
|
||||
rotationName: String,
|
||||
rotation: Int
|
||||
) : AppTestBase(rotationName, rotation) {
|
||||
@@ -61,8 +61,8 @@ import androidx.test.filters.SmallTest;
|
||||
|
||||
import com.android.wm.shell.common.DisplayLayout;
|
||||
import com.android.wm.shell.draganddrop.DragAndDropPolicy.Target;
|
||||
import com.android.wm.shell.splitscreen.DividerView;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.DividerView;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -90,7 +90,7 @@ public class DragAndDropPolicyTest {
|
||||
private ActivityTaskManager mActivityTaskManager;
|
||||
|
||||
@Mock
|
||||
private SplitScreen mSplitScreen;
|
||||
private LegacySplitScreen mLegacySplitScreen;
|
||||
|
||||
@Mock
|
||||
private DragAndDropPolicy.Starter mStarter;
|
||||
@@ -123,7 +123,7 @@ public class DragAndDropPolicyTest {
|
||||
mInsets = Insets.of(0, 0, 0, 0);
|
||||
|
||||
DividerView divider = mock(DividerView.class);
|
||||
doReturn(divider).when(mSplitScreen).getDividerView();
|
||||
doReturn(divider).when(mLegacySplitScreen).getDividerView();
|
||||
doReturn(new Rect(50, 0, 100, 100)).when(divider)
|
||||
.getNonMinimizedSplitScreenSecondaryBounds();
|
||||
|
||||
@@ -131,9 +131,10 @@ public class DragAndDropPolicyTest {
|
||||
Consumer<Boolean> callback = invocation.getArgument(0);
|
||||
callback.accept(true);
|
||||
return null;
|
||||
}).when(mSplitScreen).registerInSplitScreenListener(any());
|
||||
}).when(mLegacySplitScreen).registerInSplitScreenListener(any());
|
||||
|
||||
mPolicy = new DragAndDropPolicy(mContext, mActivityTaskManager, mSplitScreen, mStarter);
|
||||
mPolicy = new DragAndDropPolicy(
|
||||
mContext, mActivityTaskManager, mLegacySplitScreen, mStarter);
|
||||
mActivityClipData = createClipData(MIMETYPE_APPLICATION_ACTIVITY);
|
||||
mNonResizeableActivityClipData = createClipData(MIMETYPE_APPLICATION_ACTIVITY);
|
||||
setClipDataResizeable(mNonResizeableActivityClipData, false);
|
||||
@@ -207,7 +208,7 @@ public class DragAndDropPolicyTest {
|
||||
}
|
||||
|
||||
private void setInSplitScreen(boolean inSplitscreen) {
|
||||
doReturn(inSplitscreen).when(mSplitScreen).isDividerVisible();
|
||||
doReturn(inSplitscreen).when(mLegacySplitScreen).isDividerVisible();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.android.wm.shell.ShellTaskOrganizer;
|
||||
import com.android.wm.shell.ShellTestCase;
|
||||
import com.android.wm.shell.common.DisplayController;
|
||||
import com.android.wm.shell.pip.phone.PhonePipMenuController;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -69,7 +69,7 @@ public class PipTaskOrganizerTest extends ShellTestCase {
|
||||
@Mock private PhonePipMenuController mMockPhonePipMenuController;
|
||||
@Mock private PipSurfaceTransactionHelper mMockPipSurfaceTransactionHelper;
|
||||
@Mock private PipUiEventLogger mMockPipUiEventLogger;
|
||||
@Mock private Optional<SplitScreen> mMockOptionalSplitScreen;
|
||||
@Mock private Optional<LegacySplitScreen> mMockOptionalSplitScreen;
|
||||
@Mock private ShellTaskOrganizer mMockShellTaskOrganizer;
|
||||
private PipBoundsState mPipBoundsState;
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
</activity-alias>
|
||||
|
||||
<activity
|
||||
android:name="com.android.wm.shell.splitscreen.ForcedResizableInfoActivity"
|
||||
android:name="com.android.wm.shell.legacysplitscreen.ForcedResizableInfoActivity"
|
||||
android:theme="@style/ForcedResizableTheme"
|
||||
android:excludeFromRecents="true"
|
||||
android:stateNotNeeded="true"
|
||||
|
||||
@@ -106,7 +106,7 @@ public class SystemUIFactory {
|
||||
// components that shouldn't be run in the test environment
|
||||
builder = prepareSysUIComponentBuilder(builder, mWMComponent)
|
||||
.setPip(mWMComponent.getPip())
|
||||
.setSplitScreen(mWMComponent.getSplitScreen())
|
||||
.setLegacySplitScreen(mWMComponent.getLegacySplitScreen())
|
||||
.setOneHanded(mWMComponent.getOneHanded())
|
||||
.setBubbles(mWMComponent.getBubbles())
|
||||
.setHideDisplayCutout(mWMComponent.getHideDisplayCutout())
|
||||
@@ -117,7 +117,7 @@ public class SystemUIFactory {
|
||||
// is separating this logic into newly creating SystemUITestsFactory.
|
||||
builder = prepareSysUIComponentBuilder(builder, mWMComponent)
|
||||
.setPip(Optional.ofNullable(null))
|
||||
.setSplitScreen(Optional.ofNullable(null))
|
||||
.setLegacySplitScreen(Optional.ofNullable(null))
|
||||
.setOneHanded(Optional.ofNullable(null))
|
||||
.setBubbles(Optional.ofNullable(null))
|
||||
.setHideDisplayCutout(Optional.ofNullable(null))
|
||||
|
||||
@@ -82,7 +82,7 @@ import com.android.systemui.statusbar.policy.NetworkController;
|
||||
import com.android.systemui.theme.ThemeOverlayApplier;
|
||||
import com.android.systemui.util.leak.LeakDetector;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -213,7 +213,7 @@ public class DependencyProvider {
|
||||
BroadcastDispatcher broadcastDispatcher,
|
||||
CommandQueue commandQueue,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
Optional<Recents> recentsOptional,
|
||||
Lazy<StatusBar> statusBarLazy,
|
||||
ShadeController shadeController,
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.android.wm.shell.bubbles.Bubbles;
|
||||
import com.android.wm.shell.hidedisplaycutout.HideDisplayCutout;
|
||||
import com.android.wm.shell.onehanded.OneHanded;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface SysUIComponent {
|
||||
Builder setPip(Optional<Pip> p);
|
||||
|
||||
@BindsInstance
|
||||
Builder setSplitScreen(Optional<SplitScreen> s);
|
||||
Builder setLegacySplitScreen(Optional<LegacySplitScreen> s);
|
||||
|
||||
@BindsInstance
|
||||
Builder setAppPairs(Optional<AppPairs> s);
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.android.wm.shell.bubbles.Bubbles;
|
||||
import com.android.wm.shell.hidedisplaycutout.HideDisplayCutout;
|
||||
import com.android.wm.shell.onehanded.OneHanded;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface WMComponent {
|
||||
Optional<Pip> getPip();
|
||||
|
||||
@WMSingleton
|
||||
Optional<SplitScreen> getSplitScreen();
|
||||
Optional<LegacySplitScreen> getLegacySplitScreen();
|
||||
|
||||
@WMSingleton
|
||||
Optional<AppPairs> getAppPairs();
|
||||
|
||||
@@ -137,7 +137,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
|
||||
import com.android.systemui.statusbar.policy.BatteryController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
@@ -181,7 +181,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
|
||||
private final BroadcastDispatcher mBroadcastDispatcher;
|
||||
private final CommandQueue mCommandQueue;
|
||||
private final Optional<Pip> mPipOptional;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
private final Optional<Recents> mRecentsOptional;
|
||||
private final SystemActions mSystemActions;
|
||||
private final Handler mHandler;
|
||||
@@ -409,7 +409,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
|
||||
BroadcastDispatcher broadcastDispatcher,
|
||||
CommandQueue commandQueue,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
Optional<Recents> recentsOptional, Lazy<StatusBar> statusBarLazy,
|
||||
ShadeController shadeController,
|
||||
NotificationRemoteInputManager notificationRemoteInputManager,
|
||||
@@ -697,7 +697,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
|
||||
}
|
||||
|
||||
if (mStartingQuickSwitchRotation == -1 || mSplitScreenOptional
|
||||
.map(SplitScreen::isDividerVisible).orElse(false)) {
|
||||
.map(LegacySplitScreen::isDividerVisible).orElse(false)) {
|
||||
// Hide the secondary home handle if we are in multiwindow since apps in multiwindow
|
||||
// aren't allowed to set the display orientation
|
||||
resetSecondaryHandle();
|
||||
|
||||
@@ -65,7 +65,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
@@ -98,7 +98,7 @@ public class NavigationBarController implements Callbacks,
|
||||
private final BroadcastDispatcher mBroadcastDispatcher;
|
||||
private final CommandQueue mCommandQueue;
|
||||
private final Optional<Pip> mPipOptional;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
private final Optional<Recents> mRecentsOptional;
|
||||
private final Lazy<StatusBar> mStatusBarLazy;
|
||||
private final ShadeController mShadeController;
|
||||
@@ -133,7 +133,7 @@ public class NavigationBarController implements Callbacks,
|
||||
BroadcastDispatcher broadcastDispatcher,
|
||||
CommandQueue commandQueue,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
Optional<Recents> recentsOptional,
|
||||
Lazy<StatusBar> statusBarLazy,
|
||||
ShadeController shadeController,
|
||||
|
||||
@@ -93,7 +93,7 @@ import com.android.systemui.statusbar.phone.LightBarTransitionsController;
|
||||
import com.android.systemui.statusbar.phone.NotificationPanelViewController;
|
||||
import com.android.systemui.statusbar.phone.StatusBar;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.function.Consumer;
|
||||
@@ -1289,8 +1289,8 @@ public class NavigationBarView extends FrameLayout implements
|
||||
return super.onApplyWindowInsets(insets);
|
||||
}
|
||||
|
||||
void registerDockedListener(SplitScreen splitScreen) {
|
||||
splitScreen.registerInSplitScreenListener(mDockedListener);
|
||||
void registerDockedListener(LegacySplitScreen legacySplitScreen) {
|
||||
legacySplitScreen.registerInSplitScreenListener(mDockedListener);
|
||||
}
|
||||
|
||||
void registerPipExclusionBoundsChangeListener(Pip pip) {
|
||||
|
||||
@@ -95,7 +95,7 @@ import com.android.wm.shell.onehanded.OneHanded;
|
||||
import com.android.wm.shell.onehanded.OneHandedEvents;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.pip.PipAnimationController;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
@@ -130,7 +130,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
|
||||
private final Context mContext;
|
||||
private final Optional<Pip> mPipOptional;
|
||||
private final Optional<Lazy<StatusBar>> mStatusBarOptionalLazy;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
private SysUiState mSysUiState;
|
||||
private final Handler mHandler;
|
||||
private final Lazy<NavigationBarController> mNavBarControllerLazy;
|
||||
@@ -636,7 +636,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
|
||||
NavigationModeController navModeController,
|
||||
NotificationShadeWindowController statusBarWinController, SysUiState sysUiState,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
Optional<Lazy<StatusBar>> statusBarOptionalLazy,
|
||||
Optional<OneHanded> oneHandedOptional,
|
||||
BroadcastDispatcher broadcastDispatcher) {
|
||||
|
||||
@@ -26,8 +26,8 @@ import android.view.WindowManagerGlobal;
|
||||
import com.android.internal.policy.DividerSnapAlgorithm;
|
||||
import com.android.systemui.SystemUI;
|
||||
import com.android.systemui.dagger.SysUISingleton;
|
||||
import com.android.wm.shell.splitscreen.DividerView;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.DividerView;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ShortcutKeyDispatcher extends SystemUI
|
||||
implements ShortcutKeyServiceProxy.Callbacks {
|
||||
|
||||
private static final String TAG = "ShortcutKeyDispatcher";
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
|
||||
private ShortcutKeyServiceProxy mShortcutKeyServiceProxy = new ShortcutKeyServiceProxy(this);
|
||||
private IWindowManager mWindowManagerService = WindowManagerGlobal.getWindowManagerService();
|
||||
@@ -55,7 +55,7 @@ public class ShortcutKeyDispatcher extends SystemUI
|
||||
protected final long SC_DOCK_RIGHT = META_MASK | KeyEvent.KEYCODE_RIGHT_BRACKET;
|
||||
|
||||
@Inject
|
||||
public ShortcutKeyDispatcher(Context context, Optional<SplitScreen> splitScreenOptional) {
|
||||
public ShortcutKeyDispatcher(Context context, Optional<LegacySplitScreen> splitScreenOptional) {
|
||||
super(context);
|
||||
mSplitScreenOptional = splitScreenOptional;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ import com.android.systemui.dagger.qualifiers.UiBackground;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
import com.android.systemui.util.NotificationChannels;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -82,11 +82,11 @@ public class InstantAppNotifier extends SystemUI
|
||||
private final CommandQueue mCommandQueue;
|
||||
private boolean mDockedStackExists;
|
||||
private KeyguardStateController mKeyguardStateController;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
|
||||
@Inject
|
||||
public InstantAppNotifier(Context context, CommandQueue commandQueue,
|
||||
@UiBackground Executor uiBgExecutor, Optional<SplitScreen> splitScreenOptional) {
|
||||
@UiBackground Executor uiBgExecutor, Optional<LegacySplitScreen> splitScreenOptional) {
|
||||
super(context);
|
||||
mSplitScreenOptional = splitScreenOptional;
|
||||
mCommandQueue = commandQueue;
|
||||
|
||||
@@ -234,7 +234,7 @@ import com.android.systemui.statusbar.policy.UserSwitcherController;
|
||||
import com.android.systemui.volume.VolumeComponent;
|
||||
import com.android.systemui.wmshell.BubblesManager;
|
||||
import com.android.wm.shell.bubbles.Bubbles;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
@@ -394,7 +394,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy;
|
||||
private final Provider<StatusBarComponent.Builder> mStatusBarComponentBuilder;
|
||||
private final PluginManager mPluginManager;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
private final StatusBarNotificationActivityStarter.Builder
|
||||
mStatusBarNotificationActivityStarterBuilder;
|
||||
private final ShadeController mShadeController;
|
||||
@@ -738,7 +738,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
CommandQueue commandQueue,
|
||||
Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
|
||||
PluginManager pluginManager,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
LightsOutNotifController lightsOutNotifController,
|
||||
StatusBarNotificationActivityStarter.Builder
|
||||
statusBarNotificationActivityStarterBuilder,
|
||||
@@ -1568,14 +1568,14 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
return false;
|
||||
}
|
||||
|
||||
final SplitScreen splitScreen = mSplitScreenOptional.get();
|
||||
if (splitScreen.isDividerVisible()) {
|
||||
if (splitScreen.isMinimized() && !splitScreen.isHomeStackResizable()) {
|
||||
final LegacySplitScreen legacySplitScreen = mSplitScreenOptional.get();
|
||||
if (legacySplitScreen.isDividerVisible()) {
|
||||
if (legacySplitScreen.isMinimized() && !legacySplitScreen.isHomeStackResizable()) {
|
||||
// Undocking from the minimized state is not supported
|
||||
return false;
|
||||
}
|
||||
|
||||
splitScreen.onUndockingTask();
|
||||
legacySplitScreen.onUndockingTask();
|
||||
if (metricsUndockAction != -1) {
|
||||
mMetricsLogger.action(metricsUndockAction);
|
||||
}
|
||||
@@ -1587,7 +1587,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (splitScreen.splitPrimaryTask()) {
|
||||
if (legacySplitScreen.splitPrimaryTask()) {
|
||||
if (metricsDockAction != -1) {
|
||||
mMetricsLogger.action(metricsDockAction);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ import com.android.systemui.statusbar.policy.UserSwitcherController;
|
||||
import com.android.systemui.volume.VolumeComponent;
|
||||
import com.android.systemui.wmshell.BubblesManager;
|
||||
import com.android.wm.shell.bubbles.Bubbles;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -181,7 +181,7 @@ public interface StatusBarPhoneModule {
|
||||
CommandQueue commandQueue,
|
||||
Provider<StatusBarComponent.Builder> statusBarComponentBuilder,
|
||||
PluginManager pluginManager,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
LightsOutNotifController lightsOutNotifController,
|
||||
StatusBarNotificationActivityStarter.Builder
|
||||
statusBarNotificationActivityStarterBuilder,
|
||||
|
||||
@@ -36,7 +36,7 @@ import com.android.wm.shell.pip.tv.PipControlsView;
|
||||
import com.android.wm.shell.pip.tv.PipControlsViewController;
|
||||
import com.android.wm.shell.pip.tv.PipNotification;
|
||||
import com.android.wm.shell.pip.tv.TvPipMenuController;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -120,7 +120,7 @@ public abstract class TvPipModule {
|
||||
PipBoundsState pipBoundsState,
|
||||
PipBoundsAlgorithm pipBoundsAlgorithm,
|
||||
PipSurfaceTransactionHelper pipSurfaceTransactionHelper,
|
||||
Optional<SplitScreen> splitScreenOptional, DisplayController displayController,
|
||||
Optional<LegacySplitScreen> splitScreenOptional, DisplayController displayController,
|
||||
PipUiEventLogger pipUiEventLogger, ShellTaskOrganizer shellTaskOrganizer) {
|
||||
return new PipTaskOrganizer(context, pipBoundsState, pipBoundsAlgorithm,
|
||||
tvMenuController, pipSurfaceTransactionHelper, splitScreenOptional,
|
||||
|
||||
@@ -29,8 +29,8 @@ import com.android.wm.shell.common.SyncTransactionQueue;
|
||||
import com.android.wm.shell.common.SystemWindows;
|
||||
import com.android.wm.shell.common.TaskStackListenerImpl;
|
||||
import com.android.wm.shell.common.TransactionPool;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.splitscreen.SplitScreenController;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreenController;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@@ -54,12 +54,12 @@ public class TvWMShellModule {
|
||||
|
||||
@WMSingleton
|
||||
@Provides
|
||||
static SplitScreen provideSplitScreen(Context context,
|
||||
static LegacySplitScreen provideSplitScreen(Context context,
|
||||
DisplayController displayController, SystemWindows systemWindows,
|
||||
DisplayImeController displayImeController, @Main Handler handler,
|
||||
TransactionPool transactionPool, ShellTaskOrganizer shellTaskOrganizer,
|
||||
SyncTransactionQueue syncQueue, TaskStackListenerImpl taskStackListener) {
|
||||
return new SplitScreenController(context, displayController, systemWindows,
|
||||
return new LegacySplitScreenController(context, displayController, systemWindows,
|
||||
displayImeController, handler, transactionPool, shellTaskOrganizer, syncQueue,
|
||||
taskStackListener);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ import com.android.wm.shell.onehanded.OneHandedGestureHandler.OneHandedGestureEv
|
||||
import com.android.wm.shell.onehanded.OneHandedTransitionCallback;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.protolog.ShellProtoLogImpl;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
@@ -93,7 +93,7 @@ public final class WMShell extends SystemUI
|
||||
private final ScreenLifecycle mScreenLifecycle;
|
||||
private final SysUiState mSysUiState;
|
||||
private final Optional<Pip> mPipOptional;
|
||||
private final Optional<SplitScreen> mSplitScreenOptional;
|
||||
private final Optional<LegacySplitScreen> mSplitScreenOptional;
|
||||
private final Optional<OneHanded> mOneHandedOptional;
|
||||
private final Optional<HideDisplayCutout> mHideDisplayCutoutOptional;
|
||||
private final ProtoTracer mProtoTracer;
|
||||
@@ -112,7 +112,7 @@ public final class WMShell extends SystemUI
|
||||
ScreenLifecycle screenLifecycle,
|
||||
SysUiState sysUiState,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> splitScreenOptional,
|
||||
Optional<OneHanded> oneHandedOptional,
|
||||
Optional<HideDisplayCutout> hideDisplayCutoutOptional,
|
||||
ProtoTracer protoTracer,
|
||||
@@ -190,7 +190,7 @@ public final class WMShell extends SystemUI
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void initSplitScreen(SplitScreen splitScreen) {
|
||||
void initSplitScreen(LegacySplitScreen legacySplitScreen) {
|
||||
mSplitScreenKeyguardCallback = new KeyguardUpdateMonitorCallback() {
|
||||
@Override
|
||||
public void onKeyguardVisibilityChanged(boolean showing) {
|
||||
@@ -198,7 +198,7 @@ public final class WMShell extends SystemUI
|
||||
// above everything, it is actually transparent except for notifications, so
|
||||
// we still need to hide any surfaces that are below it.
|
||||
// TODO(b/148906453): Figure out keyguard dismiss animation for divider view.
|
||||
splitScreen.onKeyguardVisibilityChanged(showing);
|
||||
legacySplitScreen.onKeyguardVisibilityChanged(showing);
|
||||
}
|
||||
};
|
||||
mKeyguardUpdateMonitor.registerCallback(mSplitScreenKeyguardCallback);
|
||||
|
||||
@@ -65,7 +65,7 @@ import com.android.wm.shell.pip.PipSurfaceTransactionHelper;
|
||||
import com.android.wm.shell.pip.PipUiEventLogger;
|
||||
import com.android.wm.shell.pip.phone.PipAppOpsListener;
|
||||
import com.android.wm.shell.pip.phone.PipTouchHandler;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -169,14 +169,14 @@ public abstract class WMShellBaseModule {
|
||||
static ShellInit provideShellInit(DisplayImeController displayImeController,
|
||||
DragAndDropController dragAndDropController,
|
||||
ShellTaskOrganizer shellTaskOrganizer,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> legacySplitScreenOptional,
|
||||
Optional<AppPairs> appPairsOptional,
|
||||
FullscreenTaskListener fullscreenTaskListener,
|
||||
Transitions transitions) {
|
||||
return new ShellInit(displayImeController,
|
||||
dragAndDropController,
|
||||
shellTaskOrganizer,
|
||||
splitScreenOptional,
|
||||
legacySplitScreenOptional,
|
||||
appPairsOptional,
|
||||
fullscreenTaskListener,
|
||||
transitions);
|
||||
@@ -190,12 +190,12 @@ public abstract class WMShellBaseModule {
|
||||
@Provides
|
||||
static Optional<ShellCommandHandler> provideShellCommandHandler(
|
||||
ShellTaskOrganizer shellTaskOrganizer,
|
||||
Optional<SplitScreen> splitScreenOptional,
|
||||
Optional<LegacySplitScreen> legacySplitScreenOptional,
|
||||
Optional<Pip> pipOptional,
|
||||
Optional<OneHanded> oneHandedOptional,
|
||||
Optional<HideDisplayCutout> hideDisplayCutout,
|
||||
Optional<AppPairs> appPairsOptional) {
|
||||
return Optional.of(new ShellCommandHandler(shellTaskOrganizer, splitScreenOptional,
|
||||
return Optional.of(new ShellCommandHandler(shellTaskOrganizer, legacySplitScreenOptional,
|
||||
pipOptional, oneHandedOptional, hideDisplayCutout, appPairsOptional));
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public abstract class WMShellBaseModule {
|
||||
}
|
||||
|
||||
@BindsOptionalOf
|
||||
abstract SplitScreen optionalSplitScreen();
|
||||
abstract LegacySplitScreen optionalLegacySplitScreen();
|
||||
|
||||
@BindsOptionalOf
|
||||
abstract AppPairs optionalAppPairs();
|
||||
|
||||
@@ -46,8 +46,8 @@ import com.android.wm.shell.pip.phone.PhonePipMenuController;
|
||||
import com.android.wm.shell.pip.phone.PipAppOpsListener;
|
||||
import com.android.wm.shell.pip.phone.PipController;
|
||||
import com.android.wm.shell.pip.phone.PipTouchHandler;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.splitscreen.SplitScreenController;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreenController;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -72,12 +72,12 @@ public class WMShellModule {
|
||||
|
||||
@WMSingleton
|
||||
@Provides
|
||||
static SplitScreen provideSplitScreen(Context context,
|
||||
static LegacySplitScreen provideLegacySplitScreen(Context context,
|
||||
DisplayController displayController, SystemWindows systemWindows,
|
||||
DisplayImeController displayImeController, @Main Handler handler,
|
||||
TransactionPool transactionPool, ShellTaskOrganizer shellTaskOrganizer,
|
||||
SyncTransactionQueue syncQueue, TaskStackListenerImpl taskStackListener) {
|
||||
return new SplitScreenController(context, displayController, systemWindows,
|
||||
return new LegacySplitScreenController(context, displayController, systemWindows,
|
||||
displayImeController, handler, transactionPool, shellTaskOrganizer, syncQueue,
|
||||
taskStackListener);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class WMShellModule {
|
||||
PipBoundsAlgorithm pipBoundsAlgorithm,
|
||||
PhonePipMenuController menuPhoneController,
|
||||
PipSurfaceTransactionHelper pipSurfaceTransactionHelper,
|
||||
Optional<SplitScreen> splitScreenOptional, DisplayController displayController,
|
||||
Optional<LegacySplitScreen> splitScreenOptional, DisplayController displayController,
|
||||
PipUiEventLogger pipUiEventLogger, ShellTaskOrganizer shellTaskOrganizer) {
|
||||
return new PipTaskOrganizer(context, pipBoundsState, pipBoundsAlgorithm,
|
||||
menuPhoneController, pipSurfaceTransactionHelper, splitScreenOptional,
|
||||
|
||||
@@ -60,7 +60,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -98,7 +98,7 @@ public class NavigationBarControllerTest extends SysuiTestCase {
|
||||
mock(BroadcastDispatcher.class),
|
||||
mock(CommandQueue.class),
|
||||
Optional.of(mock(Pip.class)),
|
||||
Optional.of(mock(SplitScreen.class)),
|
||||
Optional.of(mock(LegacySplitScreen.class)),
|
||||
Optional.of(mock(Recents.class)),
|
||||
() -> mock(StatusBar.class),
|
||||
mock(ShadeController.class),
|
||||
|
||||
@@ -77,7 +77,7 @@ import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
import com.android.systemui.utils.leaks.LeakCheckedTest;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -225,7 +225,7 @@ public class NavigationBarTest extends SysuiTestCase {
|
||||
mBroadcastDispatcher,
|
||||
mCommandQueue,
|
||||
Optional.of(mock(Pip.class)),
|
||||
Optional.of(mock(SplitScreen.class)),
|
||||
Optional.of(mock(LegacySplitScreen.class)),
|
||||
Optional.of(mock(Recents.class)),
|
||||
() -> mock(StatusBar.class),
|
||||
mock(ShadeController.class),
|
||||
|
||||
@@ -41,7 +41,7 @@ import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.NotificationShadeWindowController;
|
||||
import com.android.systemui.statusbar.phone.StatusBar;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -70,7 +70,7 @@ public class OverviewProxyServiceTest extends SysuiTestCase {
|
||||
@Mock private NavigationModeController mMockNavModeController;
|
||||
@Mock private NotificationShadeWindowController mMockStatusBarWinController;
|
||||
@Mock private Optional<Pip> mMockPipOptional;
|
||||
@Mock private Optional<SplitScreen> mMockSplitScreenOptional;
|
||||
@Mock private Optional<LegacySplitScreen> mMockSplitScreenOptional;
|
||||
@Mock private Optional<Lazy<StatusBar>> mMockStatusBarOptionalLazy;
|
||||
@Mock private Optional<com.android.wm.shell.onehanded.OneHanded> mMockOneHandedOptional;
|
||||
@Mock private PackageManager mPackageManager;
|
||||
|
||||
@@ -148,7 +148,7 @@ import com.android.systemui.util.time.FakeSystemClock;
|
||||
import com.android.systemui.volume.VolumeComponent;
|
||||
import com.android.systemui.wmshell.BubblesManager;
|
||||
import com.android.wm.shell.bubbles.Bubbles;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
@@ -245,7 +245,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
@Mock private StatusBarComponent.Builder mStatusBarComponentBuilder;
|
||||
@Mock private StatusBarComponent mStatusBarComponent;
|
||||
@Mock private PluginManager mPluginManager;
|
||||
@Mock private SplitScreen mSplitScreen;
|
||||
@Mock private LegacySplitScreen mLegacySplitScreen;
|
||||
@Mock private SuperStatusBarViewFactory mSuperStatusBarViewFactory;
|
||||
@Mock private LightsOutNotifController mLightsOutNotifController;
|
||||
@Mock private ViewMediatorCallback mViewMediatorCallback;
|
||||
@@ -405,7 +405,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
mCommandQueue,
|
||||
mStatusBarComponentBuilderProvider,
|
||||
mPluginManager,
|
||||
Optional.of(mSplitScreen),
|
||||
Optional.of(mLegacySplitScreen),
|
||||
mLightsOutNotifController,
|
||||
mStatusBarNotificationActivityStarterBuilder,
|
||||
mShadeController,
|
||||
|
||||
@@ -40,7 +40,7 @@ import com.android.wm.shell.onehanded.OneHandedGestureHandler;
|
||||
import com.android.wm.shell.onehanded.OneHandedTransitionCallback;
|
||||
import com.android.wm.shell.pip.Pip;
|
||||
import com.android.wm.shell.pip.phone.PipTouchHandler;
|
||||
import com.android.wm.shell.splitscreen.SplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -63,7 +63,8 @@ public class WMShellTest extends SysuiTestCase {
|
||||
@Mock SysUiState mSysUiState;
|
||||
@Mock Pip mPip;
|
||||
@Mock PipTouchHandler mPipTouchHandler;
|
||||
@Mock SplitScreen mSplitScreen;
|
||||
@Mock
|
||||
LegacySplitScreen mLegacySplitScreen;
|
||||
@Mock OneHanded mOneHanded;
|
||||
@Mock HideDisplayCutout mHideDisplayCutout;
|
||||
@Mock ProtoTracer mProtoTracer;
|
||||
@@ -75,7 +76,7 @@ public class WMShellTest extends SysuiTestCase {
|
||||
|
||||
mWMShell = new WMShell(mContext, mCommandQueue, mConfigurationController,
|
||||
mKeyguardUpdateMonitor, mNavigationModeController,
|
||||
mScreenLifecycle, mSysUiState, Optional.of(mPip), Optional.of(mSplitScreen),
|
||||
mScreenLifecycle, mSysUiState, Optional.of(mPip), Optional.of(mLegacySplitScreen),
|
||||
Optional.of(mOneHanded), Optional.of(mHideDisplayCutout), mProtoTracer,
|
||||
Optional.of(mShellCommandHandler));
|
||||
|
||||
@@ -91,7 +92,7 @@ public class WMShellTest extends SysuiTestCase {
|
||||
|
||||
@Test
|
||||
public void initSplitScreen_registersCallbacks() {
|
||||
mWMShell.initSplitScreen(mSplitScreen);
|
||||
mWMShell.initSplitScreen(mLegacySplitScreen);
|
||||
|
||||
verify(mKeyguardUpdateMonitor).registerCallback(any(KeyguardUpdateMonitorCallback.class));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user