What Ted said is absolutely true, I just wanted to add a little tidbit. In the AOSP sources, the code actually checks to see if finish was called from within onCreate and short circuits the displaying any UI. This is so that, if you determine your activity doesn't need to be run and call finish() in onCreate(), you won't get flickering from the activity starting up and then being immediately killed.
Best Ryan On Sun, Jul 21, 2013 at 4:59 PM, Ted Hopp <ted.h...@gmail.com> wrote: > This is because of the activity > lifecycle<http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle>. > When you call finish() from within onCreate(), none of the other activity > start-up events have occurred, so the corresponding shut-down events are > also skipped. This behavior is mentioned in the documentation for > onCreate()<http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)>. > > > -- > -- > 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. > > > -- -- 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.