Consolidate DWPC usages.
There are two main entry points to DWPC#canContainActivity: - ActivityStarter#isAllowedToStart - ActivityTaskSupervisor#canPlaceEntityOnDisplay They have diverged and this CL addresses the following issues: 1. Native handoff doesn't work if the launching display is the default display. 2. Windowing mode checks don't trigger the ActivityBlockedCallback and they should. 3. ActivityTaskSupervisor does not respect display categories and virtual device allow/blocklists and it should. 4. ActivityManager#isActivityStartAllowedOnDisplay (which calls canPlaceEntityOnDisplay) triggers the ActivityBlockedCallback and it shouldn't. 5. ActivityManager#isActivityStartAllowedOnDisplay does not consider the launching display id and whether it's a new task. 6. keepActivityOnWindowFlagsChanged does redundant checks not related to the window flags. 7. testCanActivityBeLaunched_requiredDisplayCategory isn't testing anything because the test DWPC always returns flase for canActivityBeLaunched 8. ActivityInterceptionTest sends intents only with component, which is matched by any intent filter. It only passed before because of the bug that intents coming from DEFAULT_DISPLAY are never intercepted. Not fixing 5. in this CL as that requires much larger refactoring. Fix: 297168338 Test: atest VirtualDeviceManagerServiceTest Test: atest DisplayWindowPolicyControllerTests Change-Id: Ie261fe2d0db2f14be0a7911041bc3104e1db11f6
Loading
Please register or sign in to comment