summaryrefslogtreecommitdiff
path: root/core/java/android/window/DisplayAreaOrganizer.java
Commit message (Collapse)AuthorAgeFilesLines
* Move FEATURE_IME to TestApiChris Li2022-03-221-1/+0
| | | | | | | | This is to allow us to check if the IME is organized by WM Shell in CTS. Test: atest KeyboardVisibilityControlTest#testRestoreImeVisibility Bug: 223640691 Change-Id: I19457c4cd26e45a42ba4522fb8ef54a9682cda07
* (1/n) Phase out FEATURE_ONE_HANDED_BACKGROUND_PANELJason Chang2022-01-111-9/+1
| | | | | | | | | | | | Remove DisplayArea feature FEATURE_ONE_HANDED_BACKGROUND_PANEL We are going implement One handed panel throught WindowlessWindow mechanism instead. Bug: 197165590 Test: manually test One-handed mode basic operations. Test: atest WMShellUnitTests Change-Id: I3ba106a266e69bf61cdd43c0043852eed14dc365
* Enable vendors to organize ImeContainerRomica Iordan2021-11-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add FEATURE_IME as unique id for ImeContainer to organize it from WmShell. Disable automatic ImeContainer surface and container reparenting when it is organized. These changes enable vendors to control where the IMEs are positioned and implement custom UX rules (e.g. for foldable devices - place the IME on the bottom screen while the focused app is on the top one). Manual test: Organize FEATURE_IME from WmShell. Set its bounds, appBounds, screenSizeDp and setSmallestScreenWidthDp. Outcome: * The IME receives onConfigurationChanges. * The IME is updated on the screen. * The IME is not reparented from its default parent. Test: atest WmTests:WindowProcessControllerTests Test: atest WmTests:DisplayContentTests Test: atest WmTests:WindowContainerTests Test: atest WmTests:DisplayAreaTest Test: atest WmTests:DualDisplayAreaGroupPolicyTest Bug: 188038793 Change-Id: I438253e9647ceab5b7847b8db66db8399271723f
* Allow TaskFragmentOrganizer to apply WCT without permissionChris Li2021-07-151-1/+1
| | | | | | | | | | TaskFragmentOrganizer will be used by regular apps without the permission to manage Task. We are allow it to apply transactions if it is operating on TaskFragment that is organized by itself. Bug: 193191599 Test: atest WmTests:TaskFragmentOrganizerControllerTest Change-Id: I82e5d49260680bd496ff184c6795ec817c65d858
* Include RootDisplayArea feature id in DisplayAreaInfoChris Li2021-05-191-0/+9
| | | | | | | | | With the RootDisplayArea id, one can create WindowContext with bundle that specifying the RootDisplayArea using KEY_ROOT_DISPLAY_AREA_ID to get the WindowContext associated with the DA. Bug: 176875245 Test: atest WmTests:DisplayAreaTest
* Fix after turning the Dark theme on, users can not clearly identifyJason Chang2021-01-111-0/+8
| | | | | | | | | | | | | the screen has entered one handed mode Add a new DisplayArea feature color background layer to fix it. Bug: 157124724 Test: manual Test: atest WMShellUnitTests Test: atest DisplayAreaPolicyBuilderTest Change-Id: I16beddb182125551621d0083dba2f259140d7b78
* Merge "Allow TaskDisplayArea to have TaskDisplayArea children (4/n)"Chris Li2020-12-211-7/+11
|\
| * Allow TaskDisplayArea to have TaskDisplayArea children (4/n)Chris Li2020-12-161-7/+11
| | | | | | | | | | | | | | | | | | | | - Create TaskDisplayArea in another TaskDisplayArea through DisplayAreaOrganizer - Store the TDA organizer in mOrganizersByFeatureIds Bug: 175136051 Test: atest WmTests:DisplayAreaOrganizerTest Change-Id: Iafb7737f269e97ac46e6c7be543564f44ef13d97
* | Added support for RootTaskDisplayAreaOrganizerWale Ogunwale2020-12-141-3/+25
|/ | | | | | | | | | | | | Allows shell to have information on the parent container for tasks so it can do things like attach other surfaces to it. E.g. split-screen divider. Also, have DisplayAreaOrganizer ctor take an executor so incoming calls from the binder threads can be posted to the main thread. Bug: 175416931 Test: They pass! Change-Id: Ia3d0b978cf43badd8c495b75708aa027fe9a2aa1
* Add API to create new TaskDisplayArea at runtimeChris Li2020-11-201-0/+57
| | | | | | | | Allow DA organizer to create new TaskDisplayArea. Fix: 173455508 Test: atest WmTests:DisplayAreaOrganizerTest Change-Id: I7d4e88f43ae14561720c6942ca0e9f82dc28e9f6
* Reparent IME container to the root of the IME target windowChris Li2020-11-161-0/+7
| | | | | | | | | Reparent IME container so that it's bounds and config will be updated to match the RootDisplayArea. Bug: 156355859 Test: manual: test with dual display policy Change-Id: Ia9c4f6c73c2a6b8ecbf2cd9f6feb39967ebff80c
* Support hide display cutout with display areashawnlin2020-11-111-0/+6
| | | | | | | | | | | | | | - Added a new DisplayArea feature for hide display cutout - Added a new config for enable/disable hide display cutout - Resize and shift display areas to exclude the cutout areas. - Force dark status bar when there is a cutout area at top - Update bounds & offsets for different rotations. Bug: 157388722 Test: atest HideDisplayCutoutControllerTest atest HideDisplayCutoutOrganizerTest atest WMShellTest Change-Id: Iad2c8b1eff1ea4523f8a7e362c9e851d8594141c
* Update DisplayAreaOrganizer documentChris Li2020-11-031-1/+3
| | | | | | | | | 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
* Return the existing DisplayAreas when registering an organizerChris Li2020-10-281-2/+18
| | | | | | | | | | | 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
* Deprecate MANAGE_ACTIVITY_STACKS permissionLouis Chang2020-10-281-2/+2
| | | | | | | | | | | 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
* Make WindowOrganizer and TaskOrganizer non-staticHongwei Wang2020-09-021-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add Feature FULLSCREEN_MAGNIFICATION for DisplayAreaChris Li2020-07-171-0/+8
| | | | | | | | | 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
* Migrate DisplayContent.mOverlayContainers to DisplayAreaChris Li2020-05-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | (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
* Register DisplayAreaOrganizer for one handed (6/N)Bill Lin2020-04-301-4/+30
| | | | | | | | | | | | | Introduce OneHandeDisplayAreaOrganizer and AnimationController Test: atest OneHandedDisplayAreaOrganizerTest Test: atest OneHandedManagerImplTest Test: atest OneHandedUITest Test: atest OneHandedSettingsUtilTest Test: atest SystemUITests Test: atest DisplayAreaPolicyBuilderTest Bug: 150747909 Change-Id: I654090adf404214056ef37d83bacd3f65fffc1ff
* Remove getLeash from WindowContainerTokenchaviw2020-04-291-3/+6
| | | | | | | | | | | | | | | | If the WindowContainer was revoked from a registered organizer, the client could still call getLeash to system server and control the leash for the WindowContainer. Instead, pass the leash back to the client in onTaskAppeared and onDisplayAreaAppeared. Once the WindowContainer is revoked from the client, the leash will reference the old WindowContainer SurfaceControl and will not be able to control the WindowContainer anymore. Test: Split screen Test: DisplayAreaOrganizerTest Test: WindowOrganizerTest Bug: 154558563 Change-Id: I1f6eb987a2a3fecfef912a3009ee52989c85ff4b
* Added onDisplayAreaChanged and unregister for DisplayAreaOrganizerchaviw2020-04-221-0/+22
| | | | | | | | | | Notify DisplayAreaOrganzier when the registered DisplayArea has changed. Also added the ability to unregister a DisplayAreaOrganizer Test: DisplayAreaOrganizerTest Bug: 152114574 Change-Id: I9e8c537f8fe6aa7f5b007ef73535294be62dd806
* Add DisplayAreaInfochaviw2020-04-221-7/+6
| | | | | | | | | Pass DisplayAreaInfo to the client to communicate information about a specific DisplayArea. Test: Builds Bug: 152114574 Change-Id: Iec53ec57d1e5e892d66a1da0bd48b75f91965d20
* 6/n Manage multiple task display area in the policyAndrii Kulian2020-04-071-2/+2
| | | | | | | | | | Delegate task display area creation and container management to the display area policy implementation. This should allow creating and handling device-specific task display area arrangements. Bug: 152116619 Test: WM CTS and unit tests Change-Id: Ic1182d064e7d8387f701f04fb267e2bb6d4da0c5
* Add TestApi interfaces for window organizersWale Ogunwale2020-04-011-0/+91
Enables testing the API surfaces from CTS. Bug: 149338177 Test: they pass! Change-Id: I7e1f2852585a10c20d299bd87e9a87f828d06d6a