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
Loading
Please register or sign in to comment