Loading services/core/java/com/android/server/am/ActivityStarter.java +15 −6 Original line number Diff line number Diff line Loading @@ -1077,6 +1077,10 @@ class ActivityStarter { top.task.setIntent(mStartActivity); } ActivityStack.logStartActivity(AM_NEW_INTENT, mStartActivity, top.task); if (shouldActivityBeBroughtToFront(mReusedActivity)) { mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT); } top.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage); } Loading Loading @@ -1509,6 +1513,16 @@ class ActivityStarter { return intentActivity; } private boolean shouldActivityBeBroughtToFront(ActivityRecord intentActivity) { final ActivityStack focusStack = mSupervisor.getFocusedStack(); ActivityRecord curTop = (focusStack == null) ? null : focusStack.topRunningNonDelayedActivityLocked(mNotTop); return curTop != null && (curTop.task != intentActivity.task || curTop.task != focusStack.topTask()) && !mAvoidMoveToFront; } private ActivityRecord setTargetStackAndMoveToFrontIfNeeded(ActivityRecord intentActivity) { mTargetStack = intentActivity.task.stack; mTargetStack.mLastPausedActivity = null; Loading @@ -1517,13 +1531,8 @@ class ActivityStarter { // the same behavior as if a new instance was being started, which means not bringing it // to the front if the caller is not itself in the front. final ActivityStack focusStack = mSupervisor.getFocusedStack(); ActivityRecord curTop = (focusStack == null) ? null : focusStack.topRunningNonDelayedActivityLocked(mNotTop); if (curTop != null && (curTop.task != intentActivity.task || curTop.task != focusStack.topTask()) && !mAvoidMoveToFront) { mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT); if (shouldActivityBeBroughtToFront(intentActivity)) { if (mSourceRecord == null || (mSourceStack.topActivity() != null && mSourceStack.topActivity().task == mSourceRecord.task)) { // We really do want to push this one into the user's face, right now. Loading Loading
services/core/java/com/android/server/am/ActivityStarter.java +15 −6 Original line number Diff line number Diff line Loading @@ -1077,6 +1077,10 @@ class ActivityStarter { top.task.setIntent(mStartActivity); } ActivityStack.logStartActivity(AM_NEW_INTENT, mStartActivity, top.task); if (shouldActivityBeBroughtToFront(mReusedActivity)) { mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT); } top.deliverNewIntentLocked(mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage); } Loading Loading @@ -1509,6 +1513,16 @@ class ActivityStarter { return intentActivity; } private boolean shouldActivityBeBroughtToFront(ActivityRecord intentActivity) { final ActivityStack focusStack = mSupervisor.getFocusedStack(); ActivityRecord curTop = (focusStack == null) ? null : focusStack.topRunningNonDelayedActivityLocked(mNotTop); return curTop != null && (curTop.task != intentActivity.task || curTop.task != focusStack.topTask()) && !mAvoidMoveToFront; } private ActivityRecord setTargetStackAndMoveToFrontIfNeeded(ActivityRecord intentActivity) { mTargetStack = intentActivity.task.stack; mTargetStack.mLastPausedActivity = null; Loading @@ -1517,13 +1531,8 @@ class ActivityStarter { // the same behavior as if a new instance was being started, which means not bringing it // to the front if the caller is not itself in the front. final ActivityStack focusStack = mSupervisor.getFocusedStack(); ActivityRecord curTop = (focusStack == null) ? null : focusStack.topRunningNonDelayedActivityLocked(mNotTop); if (curTop != null && (curTop.task != intentActivity.task || curTop.task != focusStack.topTask()) && !mAvoidMoveToFront) { mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT); if (shouldActivityBeBroughtToFront(intentActivity)) { if (mSourceRecord == null || (mSourceStack.topActivity() != null && mSourceStack.topActivity().task == mSourceRecord.task)) { // We really do want to push this one into the user's face, right now. Loading