Merge "Clean up the legacy split screen (8/n)" into tm-dev
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.wm.shell.pip;
|
||||
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
|
||||
import static android.util.RotationUtils.deltaRotation;
|
||||
import static android.util.RotationUtils.rotateBounds;
|
||||
@@ -450,11 +449,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
tx.setWindowCrop(mLeash, destinationBounds.width(), destinationBounds.height());
|
||||
// We set to fullscreen here for now, but later it will be set to UNDEFINED for
|
||||
// the proper windowing mode to take place. See #applyWindowingModeChangeOnExit.
|
||||
wct.setActivityWindowingMode(mToken,
|
||||
direction == TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN
|
||||
&& !requestEnterSplit
|
||||
? WINDOWING_MODE_SPLIT_SCREEN_SECONDARY
|
||||
: WINDOWING_MODE_FULLSCREEN);
|
||||
wct.setActivityWindowingMode(mToken, WINDOWING_MODE_FULLSCREEN);
|
||||
wct.setBounds(mToken, destinationBounds);
|
||||
wct.setBoundsChangeTransaction(mToken, tx);
|
||||
}
|
||||
|
||||
@@ -17,36 +17,22 @@
|
||||
package com.android.systemui.shared.system;
|
||||
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
|
||||
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
|
||||
/**
|
||||
* Wrapper around internal ActivityOptions creation.
|
||||
*/
|
||||
public abstract class ActivityOptionsCompat {
|
||||
|
||||
/**
|
||||
* @Deprecated
|
||||
* @return ActivityOptions for starting a task in split screen as the primary window.
|
||||
*/
|
||||
public static ActivityOptions makeSplitScreenOptions(boolean dockTopLeft) {
|
||||
return makeSplitScreenOptions(dockTopLeft, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ActivityOptions for starting a task in split screen.
|
||||
*/
|
||||
public static ActivityOptions makeSplitScreenOptions(boolean dockTopLeft, boolean isPrimary) {
|
||||
final ActivityOptions options = ActivityOptions.makeBasic();
|
||||
options.setLaunchWindowingMode(isPrimary
|
||||
? WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
|
||||
: WINDOWING_MODE_SPLIT_SCREEN_SECONDARY);
|
||||
return options;
|
||||
return ActivityOptions.makeBasic();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,10 +78,6 @@ public class WindowManagerWrapper {
|
||||
public static final int WINDOWING_MODE_MULTI_WINDOW =
|
||||
WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
|
||||
|
||||
public static final int WINDOWING_MODE_SPLIT_SCREEN_PRIMARY =
|
||||
WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
|
||||
public static final int WINDOWING_MODE_SPLIT_SCREEN_SECONDARY =
|
||||
WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
|
||||
public static final int WINDOWING_MODE_FREEFORM = WindowConfiguration.WINDOWING_MODE_FREEFORM;
|
||||
|
||||
public static final int ITYPE_EXTRA_NAVIGATION_BAR = InsetsState.ITYPE_EXTRA_NAVIGATION_BAR;
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
|
||||
package com.android.systemui.statusbar.notification;
|
||||
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
@@ -181,25 +179,6 @@ public class InstantAppNotifier extends CoreStartable
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts an instant app notification if the top activity of the primary container in the
|
||||
* splitted screen is an instant app and the corresponding instant app notification is not
|
||||
* posted yet. If the notification already exists, this method removes it from {@code
|
||||
* notifs} in the arguments.
|
||||
*/
|
||||
private void checkAndPostForPrimaryScreen(
|
||||
@NonNull ArraySet<Pair<String, Integer>> notifs,
|
||||
@NonNull NotificationManager noMan,
|
||||
@NonNull IPackageManager pm) {
|
||||
try {
|
||||
final RootTaskInfo info = ActivityTaskManager.getService().getRootTaskInfo(
|
||||
WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_UNDEFINED);
|
||||
checkAndPostForStack(info, notifs, noMan, pm);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts an instant app notification if the top activity of the given stack is an instant app
|
||||
* and the corresponding instant app notification is not posted yet. If the notification already
|
||||
|
||||
Reference in New Issue
Block a user