Revert "Revert "Fixed UserVisibilityMediator profile scenario.""
This reverts commit 8b9cd557288193c0b17bfa025f779077f2f332cd , which
in turn reverted commit 6638c3c491f3e733a1134de5554d681e045ce280 , as
the latter broke work profiles (they could not be created or enabled,
as they wouldn't be visible); it's now safe to revert this CL as
the underlying UMS and DPMS calls (which caused the breakage) were
changed by commit fb7bb3f3d8d1bbbcb98ce2fca7c5fc2a093eff83.
Anyways, here's the "real" description:
Fixed UserVisibilityMediator profile scenario.
A profile should not started visible when its parent is not visible.
Also made some cosmetic improvements (like javadoc clarification and
setting DBG dynamically).
Test: atest UserVisibilityMediatorSUSDTest UserVisibilityMediatorMUMDTest UserVisibilityMediatorMUPANDTest
Test: atest android.server.wm.StartActivityAsUserTests#startActivityAsValidUserWithOptions
Test: manual verification with TestDpc (set a managed profile and
used QS to turn it on / off)
Bug: 261538337
Bug: 268198860
Change-Id: Ibf0c9aa62c8aaf938dbea27a486325c4b68ce5eb
Merged-In: Ibf0c9aa62c8aaf938dbea27a486325c4b68ce5eb
(cherry picked from commit 98cc66959542854b0a5cb2ddef2ecc78562baba0)
5 files changed