Yes the flags are different, but the differences aren't relevant for intent
matching (same as extras aren't).

On Tue, May 17, 2011 at 11:23 AM, Eric <[email protected]> wrote:

>
>
> On May 17, 1:55 pm, Dianne Hackborn <[email protected]> wrote:
> > Long press on home uses the Intent that was originally used to start the
> > task.
>
> Thank you for that clarification.  I did confirm this, although the
> Intent that used internally in the ActivityManager is slightly
> different, but the app really shouldn't care about this.  However,
> it's not the _exact_ same Intent passed to the app.  The intent flags
> are slightly different (main launcher case flag=0x10200000, long-home-
> press-task switcher case flag=0x10600000).  And in the main/launcher
> case the Activity gets an onCreate(), but in the task switcher case
> the activity gets an onRestart().  So it is a bit different, but
> anyway here's the log...
>
>
> 05-17 14:12:55.620: INFO/ActivityManager(101): Starting: Intent
> { act=android.intent.action.MAIN
> cat=[android.intent.category.LAUNCHER] flg=0x10200000
> cmp=com.example/.MyActivityA1 } from pid 198
> 05-17 14:12:55.670: INFO/ActivityManager(101): Start proc com.example
> for activity com.example/.MyActivityA1: pid=3277 uid=10081 gids={1015}
> 05-17 14:12:55.780: INFO/MyActivityA1(3277): onCreate (taskID:15) --
> Intent { act=android.intent.action.MAIN
> cat=[android.intent.category.LAUNCHER] flg=0x10600000
> cmp=com.example/.MyActivityA1 }
> 05-17 14:12:56.090: INFO/ActivityManager(101): Displayed
> com.example/.MyActivityA1: +419ms
> 05-17 14:12:57.790: INFO/ActivityManager(101): Starting: Intent
> { act=android.intent.action.MAIN cat=[android.intent.category.HOME]
> flg=0x10200000 cmp=com.android.launcher2/.Launcher } from pid 101
> 05-17 14:13:02.130: INFO/ActivityManager(101): Starting: Intent
> { flg=0x10100000 cmp=com.example/.MyActivityA1 } from pid 101
> 05-17 14:13:02.160: INFO/MyActivityA1(3277): onRestart (taskID:15) --
> Intent { act=android.intent.action.MAIN
> cat=[android.intent.category.LAUNCHER] flg=0x10600000
> cmp=com.example/.MyActivityA1 }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to