Using setIntent() is dangerous in the face of activity recreations (which 
can be more easily triggerred with "Developer settings | Don't keep 
activities"). Normally getIntent() returns the intent set by setIntent(). 
However, this gets reset after the activity is recreated. This is in line 
with the trivial implementation of setIntent() in 
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/Activity.java

    public void setIntent(Intent newIntent) {
        mIntent = newIntent;
    }

This seems like a "bug" in setIntent in the sense that it misleads people 
into thinking that it can be used to cache state without realizing the 
activity recreate problem. Am I missing anything?

Thanks,
Shri

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to