Skip to content
Commit f714906c authored by Jeff Chang's avatar Jeff Chang
Browse files

Avoid creating new instance when started for result with singleInstance/singleTask

The activity with launchMode "singleTask" and "singleInstance" can
exist in multiple instances. It contradicts with developers
documentation and breaks the purpose of these modes. The conditions
for searching the reusable tasks always ignore the start-for-result
case result in singleInstance/singleTask instances being created.

List the problems :

1. singleInstance activity stays in the caller’s task if it was
   started via startActivityForResult(). The activity should
   always get launched into its own task. It should always be
   the single and only member of its task.

2. Multiple singleInstance/singleTask activities are created and stay
   in the different tasks.

The CL updates the condition for searching the reusable task which
avoids the new instance being created.

Bug: 122967919
Bug: 148047668
Test: atest IntentTests
Change-Id: I721cfcaac0759327ae81f430d52d81f1c8145262
parent 82dd3e14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment