diff options
| author | 2014-07-08 16:13:43 +0000 | |
|---|---|---|
| committer | 2014-07-06 02:28:07 +0000 | |
| commit | 114c68cec40a995fb6f3ef0ab110ee8b59ab0cba (patch) | |
| tree | 102aa7015e8d0aee8cc2a40c5cbc7f44cbc32910 | |
| parent | 5eb5cffca4ff9f95284ab64d100425bf369b8091 (diff) | |
| parent | ff243289d346530a99921fd19ca35df7cea51042 (diff) | |
Merge "Prevent exit transition when a new task was started."
| -rw-r--r-- | core/java/android/app/Activity.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 2914a61b9552..7934705cb844 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3704,9 +3704,6 @@ public class Activity extends ContextThemeWrapper * @see #startActivity */ public void startActivityForResult(Intent intent, int requestCode, @Nullable Bundle options) { - if (options != null) { - mActivityTransitionState.startExitOutTransition(this, options); - } if (mParent == null) { Instrumentation.ActivityResult ar = mInstrumentation.execStartActivity( @@ -3742,6 +3739,9 @@ public class Activity extends ContextThemeWrapper mParent.startActivityFromChild(this, intent, requestCode); } } + if (options != null && !isTopOfTask()) { + mActivityTransitionState.startExitOutTransition(this, options); + } } /** @@ -5207,9 +5207,8 @@ public class Activity extends ContextThemeWrapper * another task. * * @return true if this is the topmost, non-finishing activity in its task. - * @hide */ - public boolean isTopOfTask() { + private boolean isTopOfTask() { try { return ActivityManagerNative.getDefault().isTopOfTask(mToken); } catch (RemoteException e) { |