Commit Graph

74 Commits

Author SHA1 Message Date
Chris Li
1f34774d36 Update DisplayAreaOrganizer document
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
2020-11-03 12:47:34 -08:00
Chris Li
a9e67cd9aa Return the existing DisplayAreas when registering an organizer
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
2020-10-28 12:09:09 -07:00
Louis Chang
5510ecdfa9 Deprecate MANAGE_ACTIVITY_STACKS permission
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
2020-10-28 09:20:00 +08:00
Wale Ogunwale
188d801038 Changed createRootTask task to be completely async
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
2020-10-26 13:18:09 -07:00
Issei Suzuki
1e2b859350 Merge "Replace old app transition type to new transition type (1/N)" 2020-10-23 17:19:28 +00:00
Wei Sheng Shih
e11ad96453 Revert "Have createRootTask return TaskAppearInfo"
Revert "ARC++ changes to mirror changes to createRootTask"

Revert submission 12855635-create-root-task

Reason for revert: b/171369770
Reverted Changes:
Iabf090caa:ARC++ changes to mirror changes to createRootTask
I5948e6234:Have createRootTask return TaskAppearInfo
Fixes: 171369770
Bug: 169266958

Change-Id: Iee1cf0b30e368987931f928de8c691640e18286a
2020-10-22 11:23:56 -07:00
Issei Suzuki
aa5118f23d Replace old app transition type to new transition type (1/N)
- 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
2020-10-22 19:49:12 +02:00
Wale Ogunwale
089dda160c Merge "Made ShellTaskOrganizer thread safe" 2020-10-22 13:52:27 +00:00
Wale Ogunwale
c21aca86d8 Made ShellTaskOrganizer thread safe
- Post callbacks from WM Core on executor.
- Added lock to protect critical sections.

Bug: 171384876
Test: They pass!
Change-Id: Ia1808b66104c2a1e6efb9f43c31e6a3a2f67a952
2020-10-21 15:15:10 -07:00
Winson Chung
5c0e676957 Merge "Remove single task display path" 2020-10-21 17:09:17 +00:00
Winson Chung
d660f73a42 Remove single task display path
Test: atest TaskStackChangedListenerTest
Test: atest RecentTasksTest
Bug: 165794879
Change-Id: I4c86e58026be7bcbbd8a2568b396a281668b9385
2020-10-21 17:08:55 +00:00
Tiger Huang
9e2c966d61 Merge "Don't dispatch legacy insets to client" 2020-10-21 15:23:27 +00:00
Tiger Huang
2bf8c796c5 Don't dispatch legacy insets to client
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
2020-10-21 20:20:21 +08:00
Wale Ogunwale
093aba3d8a Have createRootTask return TaskAppearInfo
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
2020-10-20 12:36:03 -07:00
Roman Kalukiewicz
24403f7ef2 Add @Nullable annotation to the parameter of Object.equals() methods.
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
2020-10-15 10:48:01 -07:00
Winson Chung
13d990e697 Merge "Return the existing tasks when registering an organizer" 2020-10-14 15:45:19 +00:00
Chris Li
d93fff6c0f Support ignoring orientation request on DisplayArea level
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
2020-10-13 22:15:09 -07:00
Winson Chung
3f4c002e1f Return the existing tasks when registering an organizer
- 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
2020-10-13 20:58:25 -07:00
Wale Ogunwale
f1c1fd27b4 Added WindowManagerWrapper#setProvidesInsetsTypes
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
2020-10-02 15:32:22 -07:00
Evan Rosky
0dd1586bf7 Scaffolding for Shell Transitions
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
2020-09-30 11:36:35 -07:00
Chris Li
3dbefb99c4 Add option to always ignore orientation request
(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
2020-09-22 17:01:39 -07:00
Tiger Huang
6ef3b6e137 Remove the legacy insets mode
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
2020-09-18 15:13:12 +08:00
TreeHugger Robot
fe4f84bbe0 Merge "Remove Session#getDisplayFrame" 2020-09-10 05:29:20 +00:00
Louis Chang
80ffe3f0ae Merge "Replace StackInfo with TaskInfo" 2020-09-10 00:49:16 +00:00
Riddle Hsu
ccaeffc03f Remove Session#getDisplayFrame
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
2020-09-10 00:26:11 +08:00
Louis Chang
bfc9e59361 Replace StackInfo with TaskInfo
Bug: 148895075
Test: existing test pass
Change-Id: I97a12397b61f4ee67810dc4ae0423de07d4befa8
2020-09-03 10:13:57 +08:00
Hongwei Wang
f820ea88ad Make WindowOrganizer and TaskOrganizer non-static
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
2020-09-02 18:13:48 +00:00
Bill Rassieur
02664711e9 Revert "Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b338052..."
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
2020-08-27 02:20:22 +00:00
Winson Chung
4421f2888d Add mechanism to register single task organizer
- 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
2020-08-18 23:36:59 -07:00
Andrii Kulian
6e61790d80 Require permission to create trusted displays
Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles
Test: atest DisplayTest
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay

Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
2020-08-12 01:12:54 +00:00
Chris Li
e619eef586 Add Feature FULLSCREEN_MAGNIFICATION for DisplayArea
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
2020-07-17 16:16:02 -07:00
Jorim Jaggi
543db32125 Pass in callsite of SurfaceControl constructor explicitly (1/3)
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
2020-06-26 13:40:07 +00:00
TreeHugger Robot
f2f21c64ed Merge "VirtualDisplayTaskEmbedder: Post background color change callback" into rvc-dev am: 5c53f0af8b am: 0cba355c41 am: 3ed61b4280 am: 0273dad7a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11726785

Change-Id: I247bc1c7f60db39da37a99db166f4f4993e492ce
2020-06-04 16:18:40 +00:00
TreeHugger Robot
5c53f0af8b Merge "VirtualDisplayTaskEmbedder: Post background color change callback" into rvc-dev 2020-06-04 15:28:56 +00:00
Robert Carr
e52f809126 VirtualDisplayTaskEmbedder: Post background color change callback
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
2020-06-03 15:41:34 -07:00
Evan Rosky
629f35b32d Merge "Use boundsChangeTransaction to improve split-screen enter/exit" into rvc-dev am: 82352f9db8 am: eabcec5bf2 am: 1c32099b52 am: af08a6eefd
Original change: undetermined

Change-Id: I173df952538a9ee3d998e3ee57e54d63c616119f
2020-06-02 00:03:51 +00:00
Evan Rosky
82352f9db8 Merge "Use boundsChangeTransaction to improve split-screen enter/exit" into rvc-dev 2020-06-01 22:55:20 +00:00
Evan Rosky
3613854d1b Use boundsChangeTransaction to improve split-screen enter/exit
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
2020-06-01 11:33:27 -07:00
Winson Chung
beeed408b4 Merge "Mirror task visibility on task org leash" into rvc-dev am: 1298d2b760 am: 376ac8a830 am: bf3f0c2de8 am: a35b850544
Change-Id: I5d7a9bf0c588bb0ec71d6af72091cbcd98b25314
2020-05-29 21:52:18 +00:00
Winson Chung
1298d2b760 Merge "Mirror task visibility on task org leash" into rvc-dev 2020-05-29 21:06:03 +00:00
Winson Chung
14a657c944 Mirror task visibility on task org leash
- 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
2020-05-29 21:05:37 +00:00
Evan Rosky
a7d57de7cc Merge "Add boundsChangeTransaction for Task pending mode change" into rvc-dev am: 4911db037b am: 20d5f2b19a am: 5db3220bb8 am: 5f726d5349
Change-Id: I3a5e50fffa992c1c0e46b8a309c19cd8b5cc9dbd
2020-05-28 23:57:11 +00:00
Evan Rosky
0c86ced0aa Add boundsChangeTransaction for Task pending mode change
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
2020-05-28 12:58:35 -07:00
Chris Li
27284de40a Migrate DisplayContent.mOverlayContainers to DisplayArea
(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
2020-05-20 13:44:33 -07:00
Charles Chen
d4b479ad3d Merge "Add WindowMetricsHelper" into rvc-dev am: 5681f3e796 am: 8a1786f075 am: a02900fbf1 am: 242f71725b
Change-Id: I9558dc4196f1ffb9481b5c0330a401afdfc9acd6
2020-05-11 10:57:46 +00:00
Charles Chen
5681f3e796 Merge "Add WindowMetricsHelper" into rvc-dev 2020-05-11 10:17:37 +00:00
Yuncheol Heo
652e004d52 Merge "Migrate Tap exclusion logic to TaskEmbedder." into rvc-dev am: 73cc6b8f47 am: 9eeb721848 am: edb5fb4b6d am: aee0fb8ecd
Change-Id: Ib5f923d2198d7a4f6d8ecafcc713d48688a3ec30
2020-05-06 01:15:06 +00:00
Yuncheol Heo
8f5f53ca0f Migrate Tap exclusion logic to TaskEmbedder.
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
2020-05-05 14:41:43 -07:00
Charles Chen
49f329ca66 Add WindowMetricsHelper
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
2020-05-04 11:41:13 +08:00
TreeHugger Robot
c8ce55ce24 Merge changes from topic "displayAreaOrganizer_migration"
* 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)
2020-05-01 06:34:30 +00:00