From 92f6a747085b4b5ed692de4bdb0050c096eae393 Mon Sep 17 00:00:00 2001 From: Ricardo Cervera Date: Fri, 4 Apr 2014 11:17:06 -0700 Subject: docs: Added info on noHistory and onActivityResult(). Bug: 13807256 Change-Id: Iae4901a311e76401396f89c552e5b27a49c65c83 --- core/java/android/app/Activity.java | 4 ++++ core/java/android/content/Intent.java | 4 ++++ docs/html/guide/topics/manifest/activity-element.jd | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index d6db8c2..cdfd6f2 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -4316,6 +4316,10 @@ public class Activity extends ContextThemeWrapper * *

You will receive this call immediately before onResume() when your * activity is re-starting. + * + *

This method is never invoked if your activity sets + * {@link android.R.styleable#AndroidManifestActivity_noHistory noHistory} to + * true. * * @param requestCode The integer request code originally supplied to * startActivityForResult(), allowing you to identify who this diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 3c66b68..ad2312a 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -3400,6 +3400,10 @@ public class Intent implements Parcelable, Cloneable { * the user navigates away from it, the activity is finished. This may also * be set with the {@link android.R.styleable#AndroidManifestActivity_noHistory * noHistory} attribute. + * + *

If set, {@link android.app.Activity#onActivityResult onActivityResult()} + * is never invoked when the current activity starts a new activity which + * sets a result and finishes. */ public static final int FLAG_ACTIVITY_NO_HISTORY = 0x40000000; /** diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index bd1edc2..eb37b9a 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -565,7 +565,9 @@ visible on screen — "{@code true}" if it should be finished, and

A value of "{@code true}" means that the activity will not leave a historical trace. It will not remain in the activity stack for the task, -so the user will not be able to return to it. +so the user will not be able to return to it. In this case, +{@link android.app.Activity#onActivityResult onActivityResult()} is never called if you +start another activity for a result from this activity.

-- cgit v1.1