Don't update task to return to type for last task over home
Resizing docked stack to fullscreen size results in dismissal of docked stack and moving of tasks to fullscreen stack. When tasks, which were originally launched from home or recents, are inserted on top of fullscreen stack, their mTaskToReturnTo value was overwritten. This CL doesn't allow to overwrite this field of task if there is no next task in stack and it was launched from home or recents. Also this reveals issue b/29342752. When app is moved to PiP mode, system UI shows another overlay activity in separate task in PiP stack with hint to user. In ActivityStarter#startActivityUnchecked some logic assumes that new activity is launched from focused stack. But PiP stack is not focusable, so we end up thinking that overlay activity was launched from home stack. This sets mTaskToReturnTo of overlay task to HOME_ACTIVITY_TYPE instead of APPLICATION_ACTIVITY_TYPE. This CL checks if stack id is specified and checks preferred stack if available instead of currently focused one. Bug: 29237751 Change-Id: I3a55b84d6a57be758705db51dec60592683e4e02
Loading
Please register or sign in to comment