Check for target activity with taskid and launch cookie
Found an issue with screen recording, where if you open an app to be recorded, but close the initial activity before recording starts, the recording fails because we expect to identify the task to the record by looking for an activity with matching launch cookie. As a backup, we also supply the task id (when possible) into the projection and try to find the opened task that way.
Fix: 333779790
Flag: None
Test: manual testing by attempting to screenrecord Google Photos while on the trash acvitity, then navigating back to the home activity before recording starts
Test: atest FrameworksCoreTests:ContentRecordingSessionTest
Test: atest FrameworksServicesTests:MediaProjectionManagerServiceTest
Test: atest WmTests:WindowManagerServiceTests
Test: atest RecordingServiceTest
Change-Id: Ied4c8f117ce39288971d293dbcafa022711bf26a
15 files changed