Android has TONS of bugs related to activities and tasks.
Nevertheless, Google changed the behavior of tasks between OS versions and didn't notify the developers, which is the most annoying thing about it.
jakk - If you didn't set any flags on the activities (A or B), than the behavior you are describing is WRONG.
And for all the ones which say that there is no problem with the documentation, try this:
- Create an application with Activity A (launching activity) & B (with the default launch mode for both).
- Start the application - a task is created with activity A only.
- From a button in activity A, launch activity B with a FLAG_ACTIVITY_NEW_TASK.
- Click the button several times and you'll see that activity B is created multiple times inside the task, which is NOT as the documentation says.
There are more scenarios to prove that the documentation is BAD / WRONG.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…