Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9b2b73e6 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

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
parent 0af9d206
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