Loading quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +4 −2 Original line number Diff line number Diff line Loading @@ -244,7 +244,8 @@ public class TaskbarUIController { taskAttributes.getIconView().getDrawable(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView().getThumbnail(), null /* intent */); null /* intent */, null /* user */); return; } } Loading @@ -256,7 +257,8 @@ public class TaskbarUIController { new BitmapDrawable(info.bitmap.icon), startingView, null /* thumbnail */, intent); intent, info.user); } ); } Loading quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +55 −39 Original line number Diff line number Diff line Loading @@ -89,11 +89,17 @@ public class SplitSelectStateController { private final StateManager mStateManager; @Nullable private DepthController mDepthController; private @StagePosition int mStagePosition; private @StagePosition int mInitialStagePosition; private ItemInfo mItemInfo; /** {@link #mInitialTaskIntent} and {@link #mInitialUser} (the user of the Intent) are set * together when split is initiated from an Intent. */ private Intent mInitialTaskIntent; private UserHandle mInitialUser; private int mInitialTaskId = INVALID_TASK_ID; /** {@link #mSecondTaskIntent} and {@link #mSecondUser} (the user of the Intent) are set * together when split is confirmed with an Intent. */ private Intent mSecondTaskIntent; private UserHandle mSecondUser; private int mSecondTaskId = INVALID_TASK_ID; private boolean mRecentsAnimationRunning; /** If {@code true}, animates the existing task view split placeholder view */ Loading @@ -103,8 +109,6 @@ public class SplitSelectStateController { * split pair task view without wanting to animate current task dismissal overall */ private boolean mDismissingFromSplitPair; @Nullable private UserHandle mUser; /** If not null, this is the TaskView we want to launch from */ @Nullable private GroupedTaskView mLaunchingTaskView; Loading Loading @@ -138,7 +142,7 @@ public class SplitSelectStateController { mInitialTaskId = alreadyRunningTask; } else { mInitialTaskIntent = intent; mUser = itemInfo.user; mInitialUser = itemInfo.user; } setInitialData(stagePosition, splitEvent, itemInfo); Loading @@ -158,7 +162,7 @@ public class SplitSelectStateController { private void setInitialData(@StagePosition int stagePosition, StatsLogManager.EventEnum splitEvent, ItemInfo itemInfo) { mItemInfo = itemInfo; mStagePosition = stagePosition; mInitialStagePosition = stagePosition; mSplitEvent = splitEvent; } Loading Loading @@ -215,7 +219,7 @@ public class SplitSelectStateController { Pair<InstanceId, com.android.launcher3.logging.InstanceId> instanceIds = LogUtils.getShellShareableInstanceId(); launchTasks(mInitialTaskId, mInitialTaskIntent, mSecondTaskId, mSecondTaskIntent, mStagePosition, callback, false /* freezeTaskList */, DEFAULT_SPLIT_RATIO, mInitialStagePosition, callback, false /* freezeTaskList */, DEFAULT_SPLIT_RATIO, instanceIds.first); mStatsLogManager.logger() Loading @@ -232,8 +236,14 @@ public class SplitSelectStateController { mSecondTaskId = task.key.id; } public void setSecondTask(Intent intent) { /** * To be called as soon as user selects the second app (even if animations aren't complete) * @param intent The second intent that will be launched. * @param user The user of that intent. */ public void setSecondTask(Intent intent, UserHandle user) { mSecondTaskIntent = intent; mSecondUser = user; } /** Loading Loading @@ -291,16 +301,17 @@ public class SplitSelectStateController { null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else if (intent2 == null) { launchIntentOrShortcut(intent1, options1, taskId2, stagePosition, splitRatio, remoteTransition, shellInstanceId); launchIntentOrShortcut(intent1, mInitialUser, options1, taskId2, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else if (intent1 == null) { launchIntentOrShortcut(intent2, options1, taskId1, launchIntentOrShortcut(intent2, mSecondUser, options1, taskId1, getOppositeStagePosition(stagePosition), splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntents(getPendingIntent(intent1), options1.toBundle(), getPendingIntent(intent2), null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); mSystemUiProxy.startIntents(getPendingIntent(intent1, mInitialUser), options1.toBundle(), getPendingIntent(intent2, mSecondUser), null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } else { final RemoteSplitLaunchAnimationRunner animationRunner = Loading @@ -314,61 +325,64 @@ public class SplitSelectStateController { taskId2, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } else if (intent2 == null) { launchIntentOrShortcutLegacy(intent1, options1, taskId2, stagePosition, splitRatio, adapter, shellInstanceId); launchIntentOrShortcutLegacy(intent1, mInitialUser, options1, taskId2, stagePosition, splitRatio, adapter, shellInstanceId); } else if (intent1 == null) { launchIntentOrShortcutLegacy(intent2, options1, taskId1, launchIntentOrShortcutLegacy(intent2, mSecondUser, options1, taskId1, getOppositeStagePosition(stagePosition), splitRatio, adapter, shellInstanceId); } else { mSystemUiProxy.startIntentsWithLegacyTransition( getPendingIntent(intent1), getShortcutInfo(intent1), options1.toBundle(), getPendingIntent(intent2), getShortcutInfo(intent2), null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); getPendingIntent(intent1, mInitialUser), getShortcutInfo(intent1, mInitialUser), options1.toBundle(), getPendingIntent(intent2, mSecondUser), getShortcutInfo(intent2, mSecondUser), null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } } } private void launchIntentOrShortcut(Intent intent, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteTransition remoteTransition, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent); private void launchIntentOrShortcut(Intent intent, UserHandle user, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteTransition remoteTransition, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTask(shortcutInfo, options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntentAndTask(getPendingIntent(intent), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); mSystemUiProxy.startIntentAndTask(getPendingIntent(intent, user), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } private void launchIntentOrShortcutLegacy(Intent intent, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteAnimationAdapter adapter, private void launchIntentOrShortcutLegacy(Intent intent, UserHandle user, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteAnimationAdapter adapter, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent); final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo, options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } else { mSystemUiProxy.startIntentAndTaskWithLegacyTransition(getPendingIntent(intent), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); mSystemUiProxy.startIntentAndTaskWithLegacyTransition( getPendingIntent(intent, user), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } } private PendingIntent getPendingIntent(Intent intent) { return intent == null ? null : (mUser != null private PendingIntent getPendingIntent(Intent intent, UserHandle user) { return intent == null ? null : (user != null ? PendingIntent.getActivityAsUser(mContext, 0, intent, FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT, null /* options */, mUser) FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT, null /* options */, user) : PendingIntent.getActivity(mContext, 0, intent, FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT)); } public @StagePosition int getActiveSplitStagePosition() { return mStagePosition; return mInitialStagePosition; } public StatsLogManager.EventEnum getSplitEvent() { Loading @@ -380,7 +394,7 @@ public class SplitSelectStateController { } @Nullable private ShortcutInfo getShortcutInfo(Intent intent) { private ShortcutInfo getShortcutInfo(Intent intent, UserHandle user) { if (intent == null || intent.getPackage() == null) { return null; } Loading @@ -392,7 +406,7 @@ public class SplitSelectStateController { try { final Context context = mContext.createPackageContextAsUser( intent.getPackage(), 0 /* flags */, mUser); intent.getPackage(), 0 /* flags */, user); return new ShortcutInfo.Builder(context, shortcutId).build(); } catch (PackageManager.NameNotFoundException e) { Log.w(TAG, "Failed to create a ShortcutInfo for " + intent.getPackage()); Loading Loading @@ -522,7 +536,9 @@ public class SplitSelectStateController { mInitialTaskIntent = null; mSecondTaskId = INVALID_TASK_ID; mSecondTaskIntent = null; mStagePosition = SplitConfigurationOptions.STAGE_POSITION_UNDEFINED; mInitialUser = null; mSecondUser = null; mInitialStagePosition = SplitConfigurationOptions.STAGE_POSITION_UNDEFINED; mRecentsAnimationRunning = false; mLaunchingTaskView = null; mItemInfo = null; Loading quickstep/src/com/android/quickstep/util/SplitToWorkspaceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.AnimatorListenerAdapter; import android.content.Intent; import android.graphics.Rect; import android.graphics.RectF; import android.os.UserHandle; import android.view.View; import com.android.launcher3.DeviceProfile; Loading Loading @@ -66,21 +67,24 @@ public class SplitToWorkspaceController { } Object tag = view.getTag(); Intent intent; UserHandle user; BitmapInfo bitmapInfo; if (tag instanceof WorkspaceItemInfo) { final WorkspaceItemInfo workspaceItemInfo = (WorkspaceItemInfo) tag; intent = workspaceItemInfo.intent; user = workspaceItemInfo.user; bitmapInfo = workspaceItemInfo.bitmap; } else if (tag instanceof com.android.launcher3.model.data.AppInfo) { final com.android.launcher3.model.data.AppInfo appInfo = (com.android.launcher3.model.data.AppInfo) tag; intent = appInfo.intent; user = appInfo.user; bitmapInfo = appInfo.bitmap; } else { return false; } mController.setSecondTask(intent); mController.setSecondTask(intent, user); boolean isTablet = mLauncher.getDeviceProfile().isTablet; SplitAnimationTimings timings = AnimUtils.getDeviceSplitToConfirmTimings(isTablet); Loading quickstep/src/com/android/quickstep/views/RecentsView.java +4 −2 Original line number Diff line number Diff line Loading @@ -4589,11 +4589,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T * is (either the ThumbnailView or the tapped icon). * @param intent If we are launching a fresh instance of the app, this is the Intent for it. If * the second app is already running in Recents, this will be null. * @param user If we are launching a fresh instance of the app, this is the UserHandle for it. * If the second app is already running in Recents, this will be null. * @return true if waiting for confirmation of second app or if split animations are running, * false otherwise */ public boolean confirmSplitSelect(TaskView containerTaskView, Task task, Drawable drawable, View secondView, @Nullable Bitmap thumbnail, Intent intent) { View secondView, @Nullable Bitmap thumbnail, Intent intent, UserHandle user) { if (canLaunchFullscreenTask()) { return false; } Loading @@ -4609,7 +4611,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } mSplitSelectStateController.setSecondTask(task); } else { mSplitSelectStateController.setSecondTask(intent); mSplitSelectStateController.setSecondTask(intent, user); } RectF secondTaskStartingBounds = new RectF(); Loading quickstep/src/com/android/quickstep/views/TaskView.java +2 −1 Original line number Diff line number Diff line Loading @@ -761,7 +761,8 @@ public class TaskView extends FrameLayout implements Reusable { if (container != null) { return getRecentsView().confirmSplitSelect(this, container.getTask(), container.getIconView().getDrawable(), container.getThumbnailView(), container.getThumbnailView().getThumbnail(), /* intent */ null); container.getThumbnailView().getThumbnail(), /* intent */ null, /* user */ null); } return false; } Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +4 −2 Original line number Diff line number Diff line Loading @@ -244,7 +244,8 @@ public class TaskbarUIController { taskAttributes.getIconView().getDrawable(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView().getThumbnail(), null /* intent */); null /* intent */, null /* user */); return; } } Loading @@ -256,7 +257,8 @@ public class TaskbarUIController { new BitmapDrawable(info.bitmap.icon), startingView, null /* thumbnail */, intent); intent, info.user); } ); } Loading
quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +55 −39 Original line number Diff line number Diff line Loading @@ -89,11 +89,17 @@ public class SplitSelectStateController { private final StateManager mStateManager; @Nullable private DepthController mDepthController; private @StagePosition int mStagePosition; private @StagePosition int mInitialStagePosition; private ItemInfo mItemInfo; /** {@link #mInitialTaskIntent} and {@link #mInitialUser} (the user of the Intent) are set * together when split is initiated from an Intent. */ private Intent mInitialTaskIntent; private UserHandle mInitialUser; private int mInitialTaskId = INVALID_TASK_ID; /** {@link #mSecondTaskIntent} and {@link #mSecondUser} (the user of the Intent) are set * together when split is confirmed with an Intent. */ private Intent mSecondTaskIntent; private UserHandle mSecondUser; private int mSecondTaskId = INVALID_TASK_ID; private boolean mRecentsAnimationRunning; /** If {@code true}, animates the existing task view split placeholder view */ Loading @@ -103,8 +109,6 @@ public class SplitSelectStateController { * split pair task view without wanting to animate current task dismissal overall */ private boolean mDismissingFromSplitPair; @Nullable private UserHandle mUser; /** If not null, this is the TaskView we want to launch from */ @Nullable private GroupedTaskView mLaunchingTaskView; Loading Loading @@ -138,7 +142,7 @@ public class SplitSelectStateController { mInitialTaskId = alreadyRunningTask; } else { mInitialTaskIntent = intent; mUser = itemInfo.user; mInitialUser = itemInfo.user; } setInitialData(stagePosition, splitEvent, itemInfo); Loading @@ -158,7 +162,7 @@ public class SplitSelectStateController { private void setInitialData(@StagePosition int stagePosition, StatsLogManager.EventEnum splitEvent, ItemInfo itemInfo) { mItemInfo = itemInfo; mStagePosition = stagePosition; mInitialStagePosition = stagePosition; mSplitEvent = splitEvent; } Loading Loading @@ -215,7 +219,7 @@ public class SplitSelectStateController { Pair<InstanceId, com.android.launcher3.logging.InstanceId> instanceIds = LogUtils.getShellShareableInstanceId(); launchTasks(mInitialTaskId, mInitialTaskIntent, mSecondTaskId, mSecondTaskIntent, mStagePosition, callback, false /* freezeTaskList */, DEFAULT_SPLIT_RATIO, mInitialStagePosition, callback, false /* freezeTaskList */, DEFAULT_SPLIT_RATIO, instanceIds.first); mStatsLogManager.logger() Loading @@ -232,8 +236,14 @@ public class SplitSelectStateController { mSecondTaskId = task.key.id; } public void setSecondTask(Intent intent) { /** * To be called as soon as user selects the second app (even if animations aren't complete) * @param intent The second intent that will be launched. * @param user The user of that intent. */ public void setSecondTask(Intent intent, UserHandle user) { mSecondTaskIntent = intent; mSecondUser = user; } /** Loading Loading @@ -291,16 +301,17 @@ public class SplitSelectStateController { null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else if (intent2 == null) { launchIntentOrShortcut(intent1, options1, taskId2, stagePosition, splitRatio, remoteTransition, shellInstanceId); launchIntentOrShortcut(intent1, mInitialUser, options1, taskId2, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else if (intent1 == null) { launchIntentOrShortcut(intent2, options1, taskId1, launchIntentOrShortcut(intent2, mSecondUser, options1, taskId1, getOppositeStagePosition(stagePosition), splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntents(getPendingIntent(intent1), options1.toBundle(), getPendingIntent(intent2), null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); mSystemUiProxy.startIntents(getPendingIntent(intent1, mInitialUser), options1.toBundle(), getPendingIntent(intent2, mSecondUser), null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } else { final RemoteSplitLaunchAnimationRunner animationRunner = Loading @@ -314,61 +325,64 @@ public class SplitSelectStateController { taskId2, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } else if (intent2 == null) { launchIntentOrShortcutLegacy(intent1, options1, taskId2, stagePosition, splitRatio, adapter, shellInstanceId); launchIntentOrShortcutLegacy(intent1, mInitialUser, options1, taskId2, stagePosition, splitRatio, adapter, shellInstanceId); } else if (intent1 == null) { launchIntentOrShortcutLegacy(intent2, options1, taskId1, launchIntentOrShortcutLegacy(intent2, mSecondUser, options1, taskId1, getOppositeStagePosition(stagePosition), splitRatio, adapter, shellInstanceId); } else { mSystemUiProxy.startIntentsWithLegacyTransition( getPendingIntent(intent1), getShortcutInfo(intent1), options1.toBundle(), getPendingIntent(intent2), getShortcutInfo(intent2), null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); getPendingIntent(intent1, mInitialUser), getShortcutInfo(intent1, mInitialUser), options1.toBundle(), getPendingIntent(intent2, mSecondUser), getShortcutInfo(intent2, mSecondUser), null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } } } private void launchIntentOrShortcut(Intent intent, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteTransition remoteTransition, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent); private void launchIntentOrShortcut(Intent intent, UserHandle user, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteTransition remoteTransition, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTask(shortcutInfo, options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } else { mSystemUiProxy.startIntentAndTask(getPendingIntent(intent), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); mSystemUiProxy.startIntentAndTask(getPendingIntent(intent, user), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, remoteTransition, shellInstanceId); } } private void launchIntentOrShortcutLegacy(Intent intent, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteAnimationAdapter adapter, private void launchIntentOrShortcutLegacy(Intent intent, UserHandle user, ActivityOptions options1, int taskId, @StagePosition int stagePosition, float splitRatio, RemoteAnimationAdapter adapter, @Nullable InstanceId shellInstanceId) { final ShortcutInfo shortcutInfo = getShortcutInfo(intent); final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); if (shortcutInfo != null) { mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo, options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } else { mSystemUiProxy.startIntentAndTaskWithLegacyTransition(getPendingIntent(intent), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); mSystemUiProxy.startIntentAndTaskWithLegacyTransition( getPendingIntent(intent, user), options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio, adapter, shellInstanceId); } } private PendingIntent getPendingIntent(Intent intent) { return intent == null ? null : (mUser != null private PendingIntent getPendingIntent(Intent intent, UserHandle user) { return intent == null ? null : (user != null ? PendingIntent.getActivityAsUser(mContext, 0, intent, FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT, null /* options */, mUser) FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT, null /* options */, user) : PendingIntent.getActivity(mContext, 0, intent, FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT)); } public @StagePosition int getActiveSplitStagePosition() { return mStagePosition; return mInitialStagePosition; } public StatsLogManager.EventEnum getSplitEvent() { Loading @@ -380,7 +394,7 @@ public class SplitSelectStateController { } @Nullable private ShortcutInfo getShortcutInfo(Intent intent) { private ShortcutInfo getShortcutInfo(Intent intent, UserHandle user) { if (intent == null || intent.getPackage() == null) { return null; } Loading @@ -392,7 +406,7 @@ public class SplitSelectStateController { try { final Context context = mContext.createPackageContextAsUser( intent.getPackage(), 0 /* flags */, mUser); intent.getPackage(), 0 /* flags */, user); return new ShortcutInfo.Builder(context, shortcutId).build(); } catch (PackageManager.NameNotFoundException e) { Log.w(TAG, "Failed to create a ShortcutInfo for " + intent.getPackage()); Loading Loading @@ -522,7 +536,9 @@ public class SplitSelectStateController { mInitialTaskIntent = null; mSecondTaskId = INVALID_TASK_ID; mSecondTaskIntent = null; mStagePosition = SplitConfigurationOptions.STAGE_POSITION_UNDEFINED; mInitialUser = null; mSecondUser = null; mInitialStagePosition = SplitConfigurationOptions.STAGE_POSITION_UNDEFINED; mRecentsAnimationRunning = false; mLaunchingTaskView = null; mItemInfo = null; Loading
quickstep/src/com/android/quickstep/util/SplitToWorkspaceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.AnimatorListenerAdapter; import android.content.Intent; import android.graphics.Rect; import android.graphics.RectF; import android.os.UserHandle; import android.view.View; import com.android.launcher3.DeviceProfile; Loading Loading @@ -66,21 +67,24 @@ public class SplitToWorkspaceController { } Object tag = view.getTag(); Intent intent; UserHandle user; BitmapInfo bitmapInfo; if (tag instanceof WorkspaceItemInfo) { final WorkspaceItemInfo workspaceItemInfo = (WorkspaceItemInfo) tag; intent = workspaceItemInfo.intent; user = workspaceItemInfo.user; bitmapInfo = workspaceItemInfo.bitmap; } else if (tag instanceof com.android.launcher3.model.data.AppInfo) { final com.android.launcher3.model.data.AppInfo appInfo = (com.android.launcher3.model.data.AppInfo) tag; intent = appInfo.intent; user = appInfo.user; bitmapInfo = appInfo.bitmap; } else { return false; } mController.setSecondTask(intent); mController.setSecondTask(intent, user); boolean isTablet = mLauncher.getDeviceProfile().isTablet; SplitAnimationTimings timings = AnimUtils.getDeviceSplitToConfirmTimings(isTablet); Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +4 −2 Original line number Diff line number Diff line Loading @@ -4589,11 +4589,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T * is (either the ThumbnailView or the tapped icon). * @param intent If we are launching a fresh instance of the app, this is the Intent for it. If * the second app is already running in Recents, this will be null. * @param user If we are launching a fresh instance of the app, this is the UserHandle for it. * If the second app is already running in Recents, this will be null. * @return true if waiting for confirmation of second app or if split animations are running, * false otherwise */ public boolean confirmSplitSelect(TaskView containerTaskView, Task task, Drawable drawable, View secondView, @Nullable Bitmap thumbnail, Intent intent) { View secondView, @Nullable Bitmap thumbnail, Intent intent, UserHandle user) { if (canLaunchFullscreenTask()) { return false; } Loading @@ -4609,7 +4611,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } mSplitSelectStateController.setSecondTask(task); } else { mSplitSelectStateController.setSecondTask(intent); mSplitSelectStateController.setSecondTask(intent, user); } RectF secondTaskStartingBounds = new RectF(); Loading
quickstep/src/com/android/quickstep/views/TaskView.java +2 −1 Original line number Diff line number Diff line Loading @@ -761,7 +761,8 @@ public class TaskView extends FrameLayout implements Reusable { if (container != null) { return getRecentsView().confirmSplitSelect(this, container.getTask(), container.getIconView().getDrawable(), container.getThumbnailView(), container.getThumbnailView().getThumbnail(), /* intent */ null); container.getThumbnailView().getThumbnail(), /* intent */ null, /* user */ null); } return false; } Loading