We are not allowing client to register for feature that has alreay been
registered. Update the doument to make it clear.
Fix: 172027455
Test: just document update
Change-Id: I66823d073aaf65eef044329b6f793f58a0643643
A list of existing DisplayAreas of the given feature are returned when
registering the organizer, and the organizer will not receive
onDisplayAreaAppeared() for these DisplayAreas.
Fix: 162028888
Test: atest WmTests:DisplayAreaOrganizerTest
Test: atest OneHandedDisplayAreaOrganizerTest
Change-Id: I3f4c5921a31c06e5b6c0040397df15cdee6ebcdd
Adding MANAGE_ACTIVITY_TASKS permission as the replacement, but
still grant the deprecated MANAGE_ACTIVITY_STACKS permission for
app compatibility.
Bug: 157876448
Test: presubmit
Change-Id: I894ee66e058b1024a731d3be4b33b69626451f08
Currently some of the information about a task created by createRootTask
is returned with the method and the rest like leash is return in
onTaskAppear. Mixing both async and sync infromation return styles
complicates the mental model for this. So, we will have this be
completely aync for now.
Also, fixed an issue where the windowing mode for organizer created
task was not set correctly before the organizer gets the first task
appear signal.
Bug: 169266958
Test: Split-screen works!
Change-Id: Ia4180d5a42838bf566fbf75f40466dfd8237e0f1
- Rename TransitionType to TransitionOldType, and define a new
TransitionType.
- Calls prepareAppTransition which takes a new TransitionType when app
transition related event happens.
The TransitionOldType and related logic will eventually removed. Until
migration finishes, we keep both.
Bug: 166736358
Test: Pass existing tests, since no new logic is enabled.
Change-Id: I984f68d5ecfae56fbfe7d91babbfddcf34378f6c
- Post callbacks from WM Core on executor.
- Added lock to protect critical sections.
Bug: 171384876
Test: They pass!
Change-Id: Ia1808b66104c2a1e6efb9f43c31e6a3a2f67a952
The server won't dispatch the legacy content insets, stable insets, and
visible insets to the client. The insets would be computed from the
insets state by the client.
This CL also fixes the insets scaling issue in compatible mode.
Bug: 149813814
Fix: 169940916
Fix: 165412978
Test: atest WindowAddRemovePerfTest InsetsAnimationControlImplTest
ActivityRecordTests DisplayPolicyLayoutTests
InsetsPolicyTest InsetsStateControllerTest
Change-Id: I83570973f587a6abf887752494f750b46e3e484d
We return TaskAppearInfo on TaskOrganizer#createRootTask so it doesn't
have to wait for taskAppeared signal to take action.
Also, added createRootTask(..., listener) method to ShellTaskOrganizer
so that a specific listener can be associated with a root task we are
creating.
Bug: 169266958
Test: split-screen works.
Change-Id: I5948e623481deadb0aa5fc99b9941914f44a68e2
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
1. Move the mIgnoreOrientationRequest to DisplayArea so that one can set
it on DisplayContent and DisplayAreaGroup to ignore orientation request
from non-app windows.
2. Have the DisplayContent to return SCREEN_ORIENTATION_UNSPECIFIED when
it is SCREEN_ORIENTATION_UNSET so that the display respects sensor
rotation.
3. Move the logic of using last orientation back to TDA, otherwise when
TDA returns UNSET because ignore is set, DC may incorrectly uses the
last orientation.
Bug: 170725334
Bug: 155431879
Test: manual: test with setting TDA and DC to ignore
Test: atest WmTests:TaskDisplayAreaTests
Test: atest WmTests:WindowOrganizerTests
Test: atest WmTests:DisplayAreaTest
Test: atest WmTests:DisplayContentTests
Change-Id: Ie92b059c453204799a58efd39dc9b23f7d62816d
- Existing tasks for supported windowing modes are returned when
registering the organizer and the organizer will not receive
onTaskAppeared() for these tasks. For now, the shell task
organizer will keep these tasks for reporting task appeared when
individual components add listeners for their windowing modes.
- Fixed some tests now that we organize fullscreen tasks
Bug: 162028888
Test: atest WindowOrganizerTests
Test: atest ShellTaskOrganizerTests
Change-Id: Iedc5f58fbfa819e753a5dcea7a8eb9dee8b6843b
Allows launcher to set providesInsetsType on a window
Also, cleaned up ctor for ShellTaskOrganizer to reduce
duplicate code.
Bug: 169054709
Test: builds
Change-Id: I9e1f4a27b924013c0b6b17f0a5e10ac3411cbf4e
Initial rough implementation of Shell Transitions.
Shell Transitions can be enabled by setting ENABLE_SHELL_TRANSITIONS
via `adb shell setprop persist.debug.shell_transit 1`
The main structure behind this is:
- TransitionController in Core responsible for handling the
collection of transition participants and communicating with
the TransitionPlayer in Shell.
- Transitions in Shell responsible for starting transitions
and playing associated animations.
This initial version only supports task open/show/close and does
a simple fade. The flow is:
1. activityStarter calls to Transitions.requestStartTransition
2. Transitions will prepare to start and then call
WindowOrganizerController.startTransition().
2. Various operations in Core call TransitionController.collect()
to track participants. This collect() acts as a replacement for
adding to mOpening/ClosingApps.
3. The legacy executeAppTransition() is wired into
TransitionController.setReady() for now. This signal
is used to ready a BLASTSyncEngine.
4. When all participants are done drawing, TransitionController
will commit any showing visibility changes and then will construct
a TransitionInfo object summarizing all the changes needed for
animation. This gets sent to Transitions.onTransitionReady()
5. Transitions then plays the transition animation and on
completion will call WindowOrganizerController.finishTransition()
which will tell TransitionController to do any finishing
work (like commiting deferred hide changes).
Bug: 161980187
Test: enable the flag and try opening/closing tasks. Also added
TransitionControllerTests
Change-Id: I80c3a241fc12004a894c26523a1e5828e0c533ff
(2/n Orientation on DisplayAreaGroup)
When the option is set to true, the TDA will ignore all the
fixed-orientation request from apps.
This can be used on duo display device, so that the logical display will
not be rotated when launching a fixed-orientation app on one of the
display.
Bug: 155431879
Test: manual: test with dual-display-area policy
Test: atest WmTests:TaskDisplayAreaTests
Test: atest WmTests:WindowOrganizerTests
Change-Id: I3f0ea1415523926195b51fe28744974a9b64d803
This CL also refines the color view logic which checks the system bar
appearance instead of system UI flags.
Bug: 149813814
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
InsetsStateTest InsetsPolicyTest InsetsStateControllerTest
Change-Id: I26d93b3508c84e436133085bd316ade54d00d76a
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.
And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.
Also refine the resize handling in ViewRootImpl to make it easier
to read.
There should be no behavior change by this modification.
Bug: 161781274
Test: WmTests, DialogFrameTests
Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
This is to allow unit test against TaskOrganizer, WindowOrganizer for
interations between Shell and WM core.
To test on WM side
```
when(mWindowOrganizer.getWindowOrganizerController())
.thenReturn(mockedWindowOrganizerController);
when(mockedWindowOrganizerController.getTaskOrganizerController())
.thenReturn(mockedTaskOrganizerController)
doSomeTest();
verify(mockedWindowOrganizerController).somethingHappended();
verify(mockedTaskOrganizerController).somethingHappended();
```
To test on Shell side
```
ShellTaskOrganizer organizer = new ShellTaskOrganizer(
mockedTaskOrganizerController)
doSomeTest()
verify(mockedTaskOrganizerController).somethingHappended();
```
Removed also
- Singleton pattern in TaskOrganizer and DisplayAreaOrganizer as it's
redundant to what's in WindowOrganizer
- static getController methods in both TaskOrganizer and
DisplayAreaOrganizer as we prefer non-static for testability
- static methods in TaskOrganizer in general
- static methods in WindowManagerProxy in general
Bug: 161711455
Bug: 149338177
Test: make sure everything still works
Test: atest WmTests:WindowOrganizerTests \
WmTests:DisplayAreaOrganizerTest
Change-Id: I978d20c7b87e73d0f6d22f7ab08188e4d12d745c
Revert "Snap for 6792834 from 5b681187dce32555f398c1b823b82be3a4..."
Revert "Snap for 6792834 from ff268453a3067874ebba3646e8e9fdbc04..."
Revert "Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328de6e34..."
Revert "Snap for 6792834 from 38626f86b924625d27d752950ce04045e6..."
Revert "Snap for 6792834 from a2cb05379b86f00033bd19912e1d6031f6..."
Revert "Snap for 6792834 from f1e69b45bde30a055d37260012df8e951b..."
Revert "Snap for 6792834 from 9215e252c9daaad53a18582afe5478eb6c..."
Revert "Snap for 6792834 from c9d246d88c86368fddcaa9f58d6eec740f..."
Revert "Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1f42331..."
Revert "Snap for 6792834 from d6d5105b22925ff168be784af9fb044fdd..."
Revert "Snap for 6792834 from e8dc6bf8735df45be9eb7867921243d83d..."
Revert "Snap for 6792834 from de2e193ad770855a0cdc7b96d91a13929b..."
Revert "Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8857dc7..."
Revert "Snap for 6792834 from 1529174442dc31e0036c58fba7a90184ee..."
Revert "Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d953019..."
Revert "Snap for 6792834 from 1a8f386df1be8e4692c00dda348f4addfb..."
Revert "Snap for 6792834 from d5d749da0ba5e53684535fae5eb76c085f..."
Revert "Snap for 6792834 from bc7dc6f5c75789d25879762854a071bd1b..."
Revert "Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df331300..."
Revert "Snap for 6792834 from bdbd076341f75ed0416f4cda0a98fc6f54..."
Revert "Snap for 6792834 from 201eaa68fcc0781df6f7713901fd5a0862..."
Revert "Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d5db563..."
Revert "Snap for 6792834 from 82eecc9b3c895d356fca70f4b8def94600..."
Revert "Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d33be247..."
Revert "Snap for 6792834 from 4b73f247850059a4312525662991d73359..."
Revert submission 12462888-release-request-aa3875fd-ef4c-4f66-9a1c-b0b05058d091-for-git_main-busytown-release-6792834
Reason for revert: Bad snap due to branch misconfig.
Reverted Changes:
I950c3960b:Snap for 6792834 from de2e193ad770855a0cdc7b96d91a...
Ie6452b91a:Snap for 6792834 from c9d246d88c86368fddcaa9f58d6e...
I6b98cb766:Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d...
Ie5e19aaef:Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b...
I35385da96:Snap for 6792834 from 4b73f247850059a4312525662991...
I1a59949e5:Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df...
I2c40ffbc2:Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1...
I24c147f50:Snap for 6792834 from ff268453a3067874ebba3646e8e9...
Iabb2fe4c1:Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8...
I92bfbb5d5:Snap for 6792834 from 0ad493cce4f8f187dc37671b45d5...
I2e92b2d5d:Snap for 6792834 from f1e69b45bde30a055d37260012df...
I0fdb356fa:Snap for 6792834 from a2cb05379b86f00033bd19912e1d...
I9b19f9bdc:Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d3...
Ie88e387a6:Snap for 6792834 from 9215e252c9daaad53a18582afe54...
Idc1ae35dd:Snap for 6792834 from 201eaa68fcc0781df6f7713901fd...
Ib16deadd9:Snap for 6792834 from 1a8f386df1be8e4692c00dda348f...
I744f889d3:Snap for 6792834 from d5d749da0ba5e53684535fae5eb7...
Ib6e060e44:Snap for 6792834 from bdbd076341f75ed0416f4cda0a98...
Iab587ff78:Snap for 6792834 from e8dc6bf8735df45be9eb78679212...
Ia1f4ef82f:Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d...
Ief930c2b5:Snap for 6792834 from 5b681187dce32555f398c1b823b8...
Ia71445b6a:Snap for 6792834 from 38626f86b924625d27d752950ce0...
Ia95c82cfc:Snap for 6792834 from 1529174442dc31e0036c58fba7a9...
If1e1b5e35:Snap for 6792834 from bc7dc6f5c75789d25879762854a0...
I98959e228:Snap for 6792834 from 1e7f83c953b7571dceabd5d7f6a2...
I321c4cb8b:Snap for 6792834 from d6d5105b22925ff168be784af9fb...
I3ed2d46ee:Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328...
Id4a7f102c:Snap for 6792834 from 82eecc9b3c895d356fca70f4b8de...
Change-Id: I4b944b89f3c581fbd67f5952d9ec413d02756abc
- Create a single task organizer in SysUI which registers as an organizer
for multiple windowing modes internally in TaskOrgController.
Bug: 161980327
Test: atest WindowOrganizerTests
Test: atest SplitScreenTests
Test: atest PinnedStackTests
Test: atest ShellTaskOrganizerTests
Change-Id: Ic9dfbd6bcd75d9317e5a3aeb695afdff7e869d35
The Feature excludes window types in WindowState#shouldMagnify(). DAs of
this Feature will be used by the AccessibilityController.
Bug: 154719717
Test: atest WmTests:DisplayAreaPolicyBuilderTest
Change-Id: Iae0fbf03ad35c06338855cf3f1db02d246d03085
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.
Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
Otherwise we will end up calling SurfaceView#setResizeBackgroundColor
from a Binder thread and potentially cause a crash. This mirrors the
behavior of TaskOrganizerTaskEmbedder.
Bug: 157605189
Test: Existing tests pass
Change-Id: Iafe9e4c3eb4d32a52a6a1479aa9a2b295cd4ad6f
Uses applySyncTransaction to synchronize all the surface
updates during split-screen enter/exit.
In Divider, all syncTransactions are serialized and runnables
can be posted to operate on the returned transactions so
they happen all at once.
This also required adding a "merge" functionality on
WindowContainerTransactions to handle racing between rotation
and other in-flight sync transactions (because they are
serialized, sometimes they got delayed).
Bug: 153579514
Test: Enter/exit split-screen and observe no flickers
Change-Id: I57df13489247f3c4fb3ca59efa26867a872e447f
- Depending on the navigation mode, the task is either visible or not
when entering PIP, and if it is not visible, initially hide the leash
so that SysUI can control it's visibilty to prevent a flash
Bug: 156941210
Test: Introduce artificial delay on sysui taskAppeared() and verify that
we don't see the task when entering pip in gesture nav (and that
it still works in 3 button)
Change-Id: I291afd209af118ac178f8a6421d7df25974315f0
This associates a surfaceflinger bounds change with a task's
surface provided that task will become organized by the end
of a WindowContainer transaction. Without this, there's no
way to synchronize a new frame due to bounds-change with
said bounds-change if the bounds-change is a result of
changing windowing-modes (and thus becoming organized).
This also records the original Task that a bounds-change
transaction was associated with along with the transaction.
This is needed anytime tasks are nested (eg. with home
task or with split-screen tasks).
Bug: 153579514
Test: See test entry for end of commit chain
Change-Id: If14ea07eca17ef9146537d5aae7122dd7c2dc045
(1/n DisplayArea Sibling Roots)
Instead of adding magnification window to the overlay containers in
DisplayContent, move it to be part of the policy created display
hierarchy.
DA.Root
- DA for FEATURE_WINDOWED_MAGNIFICATION
- BELOW_TASKS
- TDA
- ABOVE_TASKS (below TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY)
- DA.Tokens for TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY
- Magnification overlay windows
- ABOVE_TASKS (DA.Tokens's for layers above
TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY)
Fix: 156424590
Test: manual: magnification and screen rotation
Test: go/wm-smoke (manual)
Change-Id: I959c0a882b0a0e9a9dbb44ad62a3c65c1dfe3c06
We want to pass the touches on ActivityView to the Activity inside ActivityView, not to be consumed by Activity hosting ActivityView.
To do that, we need to set a tap exclude region, so touches can go through.
Bug: 155424730
Test: Make sure the Activity inside ActivityView gets touch.
Change-Id: Ia9b2c7eba0c48512a633c798b1012e5fbec8422f
This metrics now is used for calculating the value reported by
Display#getSize. It could be extended to have more function later.
Also replace getCurrentMetrics usages to make them report
Display#getSize value.
Bug: 148904274
Test: atest WindowMetricsHelperTest
Change-Id: I182b6e63f7c28752eee22839cb9e69f073046c3f
* changes:
The one handed UX of auto-stop one handed by conditions (10/N)
TouchHandler to handle touch events inside & outside displayArea (9/N)
Implement Timer for one handed to handle auto-exit (8/N)
Implement DisplayArea Animation/Transition for one handed (7/N)
Register DisplayAreaOrganizer for one handed (6/N)
Create OneHandedSettingsUtil handle settings configs (5/N)
Sysui-infra for one handed mode (1/N)