Loading core/java/android/app/ActivityManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,14 @@ public class ActivityManager { public static boolean allowTopTaskToReturnHome(int stackId) { return stackId != PINNED_STACK_ID; } /** * Returns true if the stack should be resized to match the bounds specified by * {@link ActivityOptions#setLaunchBounds} when launching an activity into the stack. */ public static boolean resizeStackWithLaunchBounds(int stackId) { return stackId == PINNED_STACK_ID; } } /** Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +11 −5 Original line number Diff line number Diff line Loading @@ -1719,6 +1719,11 @@ public final class ActivityStackSupervisor implements DisplayListener { // moveTaskToStackUncheckedLocked() should already placed the task on top, // still need moveTaskToFrontLocked() below for any transition settings. } if (StackId.resizeStackWithLaunchBounds(stackId)) { resizeStackLocked(stackId, bounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } else { // WM resizeTask must be done after the task is moved to the correct stack, // because Task's setBounds() also updates dim layer's bounds, but that has // dependency on the stack. Loading @@ -1726,6 +1731,7 @@ public final class ActivityStackSupervisor implements DisplayListener { false /* relayout */, false /* forced */); } } } final ActivityRecord r = task.getTopActivity(); task.stack.moveTaskToFrontLocked(task, false /* noAnimation */, options, Loading services/core/java/com/android/server/am/ActivityStarter.java +14 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import static com.android.server.am.ActivityStack.STACK_INVISIBLE; import static com.android.server.am.ActivityStackSupervisor.CREATE_IF_NEEDED; import static com.android.server.am.ActivityStackSupervisor.FORCE_FOCUS; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS; import static com.android.server.am.ActivityStackSupervisor.TAG_TASKS; import static com.android.server.am.EventLogTags.AM_NEW_INTENT; Loading Loading @@ -1429,8 +1430,15 @@ class ActivityStarter { mVoiceSession, mVoiceInteractor, !mLaunchTaskBehind /* toTop */); mStartActivity.setTask(task, taskToAffiliate); if (mLaunchBounds != null) { final int stackId = mTargetStack.mStackId; if (StackId.resizeStackWithLaunchBounds(stackId)) { mSupervisor.resizeStackLocked(stackId, mLaunchBounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } else { mStartActivity.task.updateOverrideConfiguration(mLaunchBounds); } } if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity + " in new task " + mStartActivity.task); Loading Loading @@ -1512,6 +1520,11 @@ class ActivityStarter { mSupervisor.moveTaskToStackUncheckedLocked( mInTask, stackId, ON_TOP, !FORCE_FOCUS, "inTaskToFront"); } if (StackId.resizeStackWithLaunchBounds(stackId)) { mSupervisor.resizeStackLocked(stackId, mLaunchBounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } } mTargetStack = mInTask.stack; mTargetStack.moveTaskToFrontLocked( Loading Loading
core/java/android/app/ActivityManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,14 @@ public class ActivityManager { public static boolean allowTopTaskToReturnHome(int stackId) { return stackId != PINNED_STACK_ID; } /** * Returns true if the stack should be resized to match the bounds specified by * {@link ActivityOptions#setLaunchBounds} when launching an activity into the stack. */ public static boolean resizeStackWithLaunchBounds(int stackId) { return stackId == PINNED_STACK_ID; } } /** Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +11 −5 Original line number Diff line number Diff line Loading @@ -1719,6 +1719,11 @@ public final class ActivityStackSupervisor implements DisplayListener { // moveTaskToStackUncheckedLocked() should already placed the task on top, // still need moveTaskToFrontLocked() below for any transition settings. } if (StackId.resizeStackWithLaunchBounds(stackId)) { resizeStackLocked(stackId, bounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } else { // WM resizeTask must be done after the task is moved to the correct stack, // because Task's setBounds() also updates dim layer's bounds, but that has // dependency on the stack. Loading @@ -1726,6 +1731,7 @@ public final class ActivityStackSupervisor implements DisplayListener { false /* relayout */, false /* forced */); } } } final ActivityRecord r = task.getTopActivity(); task.stack.moveTaskToFrontLocked(task, false /* noAnimation */, options, Loading
services/core/java/com/android/server/am/ActivityStarter.java +14 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import static com.android.server.am.ActivityStack.STACK_INVISIBLE; import static com.android.server.am.ActivityStackSupervisor.CREATE_IF_NEEDED; import static com.android.server.am.ActivityStackSupervisor.FORCE_FOCUS; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS; import static com.android.server.am.ActivityStackSupervisor.TAG_TASKS; import static com.android.server.am.EventLogTags.AM_NEW_INTENT; Loading Loading @@ -1429,8 +1430,15 @@ class ActivityStarter { mVoiceSession, mVoiceInteractor, !mLaunchTaskBehind /* toTop */); mStartActivity.setTask(task, taskToAffiliate); if (mLaunchBounds != null) { final int stackId = mTargetStack.mStackId; if (StackId.resizeStackWithLaunchBounds(stackId)) { mSupervisor.resizeStackLocked(stackId, mLaunchBounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } else { mStartActivity.task.updateOverrideConfiguration(mLaunchBounds); } } if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Starting new activity " + mStartActivity + " in new task " + mStartActivity.task); Loading Loading @@ -1512,6 +1520,11 @@ class ActivityStarter { mSupervisor.moveTaskToStackUncheckedLocked( mInTask, stackId, ON_TOP, !FORCE_FOCUS, "inTaskToFront"); } if (StackId.resizeStackWithLaunchBounds(stackId)) { mSupervisor.resizeStackLocked(stackId, mLaunchBounds, null /* tempTaskBounds */, null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS, true /* allowResizeInDockedMode */); } } mTargetStack = mInTask.stack; mTargetStack.moveTaskToFrontLocked( Loading