diff options
| author | Shaun Corkran <scorkra@google.com> | 2022-03-16 06:02:23 +0000 |
|---|---|---|
| committer | Shaun Corkran <scorkra@google.com> | 2022-04-07 07:45:59 +0000 |
| commit | 8e9e270de729d05d560f3c0626d6e563246e047b (patch) | |
| tree | 0b861fb036e0c28d04019176717e48da5b9f724d /core/java/android/window/DisplayWindowPolicyController.java | |
| parent | 1e5ed56a17555be0efff09a67406c5b8873ed338 (diff) | |
Decide on navigation to task by policy in Virtual Device
Adds the implementation to allow or block navigation to a
new task in the policy controller for a virtual device. Will
only change behavior if the cross navigation allow or block
list is included and the navigation does not occur from
the default display.
Bug: 223915401
Test: atest WmTests:DisplayWindowPolicyControllerHelperTests
atest CtsVirtualDevicesTestCases
atest WmTests:ActivityStarterTests
Added test in ag/17503735
Change-Id: I3dfb9dd93c0edf4634320c52a3fc40c4bf473085
Diffstat (limited to 'core/java/android/window/DisplayWindowPolicyController.java')
| -rw-r--r-- | core/java/android/window/DisplayWindowPolicyController.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/window/DisplayWindowPolicyController.java b/core/java/android/window/DisplayWindowPolicyController.java index 1270d87e3a04..d3cc918c2a29 100644 --- a/core/java/android/window/DisplayWindowPolicyController.java +++ b/core/java/android/window/DisplayWindowPolicyController.java @@ -110,6 +110,13 @@ public abstract class DisplayWindowPolicyController { @WindowConfiguration.WindowingMode int windowingMode); /** + * Returns {@code true} if the given new task can be launched on this virtual display. + */ + public abstract boolean canActivityBeLaunched(@NonNull ActivityInfo activityInfo, + @WindowConfiguration.WindowingMode int windowingMode, int launchingFromDisplayId, + boolean isNewTask); + + /** * Called when an Activity window is layouted with the new changes where contains the * window flags that we’re interested in. * Returns {@code false} if the Activity cannot remain on the display and the activity task will |
