summaryrefslogtreecommitdiff
path: root/core/java/android/app/TaskInfo.java
Commit message (Collapse)AuthorAgeFilesLines
* Don't force double-tap education on unfoldMassimo Carli2023-03-241-2/+11
| | | | | | | | | | | The CL changes the way double-tap is detected for the compat ui update to avoid false detection due to unfolding. Fixes: 275054305 Test: manual Change-Id: Ic325a180bffef81262b281a7c3b306d45265776c
* [2/n] Adds reachability education for double-tapMassimo Carli2023-03-231-1/+70
| | | | | | | | | | | | | | | | | Double-tap education which explains to the users how double-tap works for repositioning an app in letterbox or size compat mode. The education appears the very first time an app is launched by a user and every time the user double-tap to reposition the app. Fixes: 255943773 Test: atest WMShellUnitTests:ReachabilityEduLayoutTest atest WMShellUnitTests:LetterboxEduWindowManagerTest atest WMShellUnitTests:ReachabilityEduWindowManagerTest Change-Id: I583a2ca8e552885b3578eaa4e344d89a67143b57
* Fix pip expand issue if parent task under split rootTony Huang2023-03-171-0/+11
| | | | | | | | | | | | | | | | | | | If task have more than one activity and enter pip mode, WMS will create new task for that activity and reparent it back when it exit pip mode. This cause some issues if the origin task under split root such as UI abnormal or it cannot expand to fullscreen.(We expect it expand to fullscreen always when click expand button on pip.) Fix this by record the origin task id in taskInfo and use this id to check exit split first or not if such task still under split root when exit pip. Fix: 264002510 Test: manual Test: pass existing tests Change-Id: I673f8c7a677f16897700d2be3853d4b4a36df7dd
* Restart Dialog reacts to Light/Dark themeMassimo Carli2023-02-271-0/+2
| | | | | | | | | | Fixes: 266262111 Test: Manual. Display a size compat mode restart dialog, change from Light mode to Dark or vice versa, and check the dialog updates the theme. Run `atest CompatUIControllerTest` Change-Id: Iceb4a1aaaeccbad39e108933aeab557c52201664
* Add topActivity to the list of states that task organizer cares.Josh Yang2022-11-011-1/+2
| | | | | | Bug: 256215798 Test: manual test Change-Id: I4f9a3d6feed7dfbac9f53659a850ec3d237cebaf
* Merge "Use snapshot in enter content-pip animation" into tm-dev am: ↵Hongwei Wang2022-05-261-17/+0
|\ | | | | | | | | | | | | | | | | a143492a2b am: b3643f53a1 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18501932 Change-Id: Ifcff7a1de0dd9ecebf8476db1b95f35501a9ac1d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Use snapshot in enter content-pip animationHongwei Wang2022-05-251-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entering content-pip - We take a snapshot for the host task within the ActivityStarter#startActivityInner function, this is to make sure that the snapshot is taken before an app switches to the placeholder content - We retrieve the snapshot in WM Shell when animating the newly created content-pip task, and use that snapshot during the animation - This works similar to the solid color content overlay when app enters PiP without specifying a valid source rect hint. Therefore, we abstract the functionality to a dedicated PipContentOverlay class Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dRSTf7prHc0krPhTKZ0kXx Bug: 220191201 Test: enter content-pip from ApiDemos app, see also Video Change-Id: I2420402341a910b44bd8f64e3ad518ebef41bc19
* | Remove supportsSplitScreenMultiWindowTony Huang2022-05-111-10/+0
|/ | | | | | | | | | | For new split screen, we are using supportsMultiWindow and other multi-window features should use it too so remove supportsSplitScreenMultiWindow and update some files which still use it. Bug: 199236198 Test: pass existing tests Change-Id: I3b3ec3376a4c79295f9d9f913585534a3815e75a
* Add a single-top root task for split screenJerry Chang2022-03-251-1/+2
| | | | | | | | | | | | | | | Make direct children of a created-by-organizer task organizable. Add a single-top root task which the split divider bar can attach to. So we can remove the special logic of the divider bar z-ordering in the followup patch. Bug: 207185041 Fix: 215322621 Test: atest ZOrderingTests Test: atest com.android.wm.shell.splitscreen Test: manual check the divider bar z-order setup with pip window and assistant voice plate Change-Id: Ia36d7529ef52685be4516b6f6ea5d7179fc26fd6
* Add shouldDockBigOverlays APIGalia Peycheva2022-03-091-7/+7
| | | | | | | | | | This CLs provides the getter API for DockBigOverlays. To better follow API guidelines, it changes the naming from "*preferDockBigOverlays" to "*shouldDockBigOverlays" Bug: 220739302 Test: atest PinnedStackTests#testShouldDockBigOverlaysWithExpandedPip Change-Id: I25c18531bc1f386b208ab7dde81a8b11a22d03a1
* Add Content PiP support with launch-into-pip APIHongwei Wang2022-02-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Terms - Host activity, the activity that the content-pip is originated from. There should be some UI affordance on Host activity user can tap to enter content-pip - Container activity, the activity that carries the content from Host Activity and transits to PiP mode Workflow in brief - Container activity is defined in the same application as Host activity - A new ActivityOptions#makeLaunchIntoPip API is added, Host activity uses this API to construct ActivityOptions to launch the Container activity directly into pip mode. - ActivityStarter sets a reference on Container activity pointing to Host activity upon creation and moves the activity to pinned task - WMShell transits Container activity to pinned mode - When user taps on `Expand` button in PiP menu, WMShell calls WCT#startTask with the task id to bring the Host task to front Content hand-off - Since Host activity is the one starts Container activity, it can replace its content with some placeholder right after startActivity - This CL also makes the assumption that Host activity can establish a communication channel with the Container activity, such as using the ResultReceiver parcelable. Therefore it's out of scope to provide extra callback to Host activity on lifecycle events of Container activity. See also the design doc go/content-pip-v2 and the end-to-end demo in ApiDemos `App > Activity > Picture in Picture` Bug: 165793661 Video: http://recall/-/aaaaaabFQoRHlzixHdtY/e9Mp5rvxYBrNOdGSUoSXHO Test: manual, see Video Test: atest WmTests:ActivityOptionsTest \ WmTests:ActivityRecordTests \ WmTests:ActivityStarterTests \ PinnedStackTests Change-Id: I2bebfea8d1930b0b7e495d91cfd5ddc7c347da68
* Add API to prefer docking big overlaysGalia Peycheva2022-02-151-0/+15
| | | | | | | Bug: 216749913 Bug: 203647003 Test: atest PinnedStackTests#testPreferDockBigOverlaysWithExpandedPip Change-Id: I6add690d54b8fb1061a1b5c9e5fe2f856f8019d0
* [2/n] Letterbox Education: Add information about fixed orientation letterbox ↵tomnatan2022-01-311-1/+14
| | | | | | | | | | to TaskInfo Bug: 207010227 Test: atest WmTests:ActivityRecordTests Test: atest WmTests:SizeCompatTests Test: atest WMShellUnitTests:ShellTaskOrganizerTests Change-Id: I04e82eb494c84bd78c269dd244bdd4a3e4d5fcc8
* Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3 am: ↵Mariia Sandrikova2021-12-181-5/+83
|\ | | | | | | | | | | | | | | 02a17e7b1f Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379 Change-Id: Ic9916a3883eef0148a86c86149aa2e883fc56d1b
| * [2/n] Camera Compat UI: Add interfaces for client-server communication.Mariia Sandrikova2021-12-171-5/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState - ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell - ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser - ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests Bug: 206602997 Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
* | Merge "Add minWidth, minHeight and minTaskSize to TaskInfo"Jorge Gil2021-12-011-0/+27
|\ \ | |/ |/|
| * Add minWidth, minHeight and minTaskSize to TaskInfojorgegil@google.com2021-11-031-0/+27
| | | | | | | | | | | | | | | | | | | | Allows OEMs access to this info in order to send resize requests that comply with the minimal size policies without having to query state via WMS. Bug: 176970585 Test: builds Change-Id: I540e17312b02afd7c4092f32bdf671f473c736cd
* | Add locusId as something taskOrganizers care aboutMady Mellor2021-11-021-1/+2
|/ | | | | | | | | | | This ensures that a locusId change will trigger an onTaskInfoChange immediately. Previously it would just be sent with the next info change event which isn't sufficient. Test: atest NotificationManagerTest Bug: 204260661 Change-Id: I2b53f63b6efd6d2c22a877b7c33f5a12832a8e1d
* Make isVisible member in TaskInfo public for digital wellbeingtomnatan2021-10-141-0/+7
| | | | | | Bug: 199825187 Test: N/A Change-Id: If2e8ff32e865591ea8b2de68e5cb1e8b05e06f35
* Fix letterbox issue when auto-enter-pip from landscapeHongwei Wang2021-07-131-0/+15
| | | | | | | | | | | | | Included in this CL - Skip layout of window when in transition to PiP mode - Pass display cutout info via TaskInfo - Removed TaskInfoCompat Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK Bug: 191310680 Test: manual, auto-enter-pip from landscape with source rect hint being turned on, see the video Change-Id: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
* Merge "Revert "Revert "Not show size compat UI when task is not visible""" ↵Chris Li2021-07-081-1/+2
|\ | | | | | | | | | | | | | | into sc-dev am: 50c03ea7ed Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237129 Change-Id: I8c2e257e5a2b7d89814288d5d8cd2e24af76c722
| * Revert "Revert "Not show size compat UI when task is not visible""Chris Li2021-07-081-1/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit 76370b6fe6690ee8c2fe688260607587dcc8d860. Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java Fix: 193069342 Test: atest WMShellUnitTests:ShellTaskOrganizerTests Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
| * Remove TaskInfo#topActivityToken usage in size compat for securityChris Li2021-07-071-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | Security report shows that this can cause leak token of different app. Replace the functionality with a callback to the TaskOrganizerController to restart activity when size compat restart button is clicked. Bug: 186776724 Test: manually verify the restart button still works Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66 Merged-In: I097b9f02e8435e6765695b9d5a531a4e165bac66
* | Revert "Not show size compat UI when task is not visible" am: 76370b6fe6Leon Jeng2021-07-081-2/+1
|\ \ | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232572 Change-Id: Ib61cabd6c4d77d4fa5cd3f64b2272fcd684db153
| * | Revert "Not show size compat UI when task is not visible"Leon Jeng2021-07-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit adb92508c045b007cb873fa3d1851b7286fa4f6a. Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=coral-userdebug&lkgb=7530814&lkbb=7530923&fkbb=7530923, bug b/193105445 Bug: 193105445 Change-Id: I697229da6986d6466d7f13872e9ae7a727b80838
* | | Merge "Not show size compat UI when task is not visible" into sc-dev am: ↵Chris Li2021-07-081-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | 927c644bfa Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225378 Change-Id: Ic80035d84e4e2f2a5471bd4f85cc90ff61cda49f
| * | Not show size compat UI when task is not visibleChris Li2021-07-071-1/+2
| |/ | | | | | | | | | | | | | | | | Before, when a size compat task was hidden, the size compat UI might still be showing. Now, remove the UI when the task is no longer visible. Bug: 193069342 Test: manually verify the size compat button is not showing in recents Change-Id: Ia17a97f5e7a9af497d8da16b31bb5169dd502d53
* | Remove TaskInfo#topActivityToken usage in size compat for securityChris Li2021-07-071-12/+1
| | | | | | | | | | | | | | | | | | | | | | Security report shows that this can cause leak token of different app. Replace the functionality with a callback to the TaskOrganizerController to restart activity when size compat restart button is clicked. Bug: 186776724 Test: manually verify the restart button still works Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66
* | Merge "Add a featureId to TaskInfo." into sc-v2-devYuncheol Heo2021-06-251-1/+12
|\ \
| * | Add a featureId to TaskInfo.Yuncheol Heo2021-06-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Introduced featureId to identify which DA the new task is created in. Bug: 188933554 Test: Add a log in ShellTaskOrganizer.TaskListener#onTaskAppeared() to check if TaskInfo has the proper featureId. Change-Id: Ifee436a74fc1859377b75539427e6642f55962ed
* | | Notify TaskFragmentOrganizer onConfigurationChangedChris Li2021-06-241-5/+4
|/ / | | | | | | | | | | | | Bug: 190433129 Bug: 190433500 Test: N/A Change-Id: I383a434d536ac08f7cf82dfd87cd24bfc53a6d58
* / Do not dismiss split if stages are not visible due to screen is sleepingJerry Chang2021-05-251-1/+11
|/ | | | | | | | | | | | | | Pass isSleeping information in TaskInfo to determine whether the task is sleeping due to display state. Prevent to dismiss staged split when both stages is not visible due to the display is sleeping, like keyguard showing or screen off. Bug: 188010345 Test: atest WMShellUnitTests Test: verified staged split won't be dismissed while keyguard showing and screen off. Change-Id: I0ee8943b035a9e9f937c22d2a228913e597ac79f
* Determine whether to support activities in multi window (1/n)Chris Li2021-04-271-0/+11
| | | | | | | | | | | | | Add a field of supportsMultiWindow to TaskInfo for WM Shell to use. Because we will change to Task#supportsMultiWindow to check the support based on the root activity's resizibilty, min widht/height, and the device settings, using this to replace the check in ActivityTaskManager, which is pure device settings. Bug: 176061101 Test: atest WMShellFlickerTests Change-Id: Iad94b39506e71b6224d923f02bd7fc454cae02c8
* Add locus id to ActivityRecord / TaskInfoMady Mellor2021-03-051-0/+11
| | | | | | | | | | | | | | | - Bubbles needs to know if a task has a LocusId for the Suppress Bubble API - Apps can already set a locusId on the activity, this occurs after the activity has been created. - This CL adds the locusId to the ActivityRecord and triggers a task info change - TaskInfo uses the top activity in the stack to populate the locusId Bug: 170267239 Test: atest NotificationManagerTest (in CTS CL) Change-Id: I33cf784e3f3f89835d91e31961b3abe7a7b68c8d
* Allow non-resizable apps in split-screen (10/n)Chris Li2021-02-151-1/+3
| | | | | | | | | | | | Render size compat restart button on Task surface with WindowlessWindowManager. Bug: 176061101 Bug: 178327644 Test: atest WMShellUnitTests:SizeCompatRestartButtonTest Test: atest WMShellUnitTests:SizeCompatUIControllerTest Test: atest WMShellUnitTests:SizeCompatUILayoutTest Change-Id: I86912adca18a6a62265cd31585f2c7d612c90fd1
* Save and pass last snapshot data with recents task infoWinson Chung2021-02-091-10/+1
| | | | | | | | | | - Adds task & snapshot sizing info to RecentTaskInfo so that SysUI can stably layout overview when there are tasks of different sizes - Removing some unused code Bug: 179466077 Test: atest WmTests:RecentTasksTest Change-Id: Idf4c27e2d04380328413459fc537ff8bcc111a14
* Allow non-resizable apps in split-screen (7/n)Chris Li2021-02-021-0/+17
| | | | | | | | | | Add interface for SizeCompatUIController in WM shell to use when refactoring SizeCompatModeActivityController from system UI. Bug: 176061101 Bug: 178327644 Test: atest WMShellUnitTests:ShellTaskOrganizerTests Change-Id: I37f72396e1769b7773722be6575506fc430b2739
* Allow non-resizable apps in split-screen (6/n)Chris Li2021-01-311-1/+19
| | | | | | | | | | | | | | | Trigger TaskInfoChanged when the direct top Activity of the organized Task enters or exits size compat mode. This is the prerequisite to move SizeCompatModeActivityController from system ui to shell. After that, we can render the size compat restart button on Task Surface similar to split screen divider. Bug: 176061101 Bug: 178327644 Test: atest WmTests:SizeCompatTests Test: atest WmTests:WindowOrganizerTests Change-Id: I0e328796095bc17d40a5ef2f354f291c12ffa04a
* Added @TestApi to some TaskInfo.java methodsWale Ogunwale2021-01-081-0/+19
| | | | | | | | For use in CTS. Bug: 169271943 Test: MultiWindowTests Change-Id: Iec98eb93f09ec66c88b4b973b17e559ddc59bee9
* Merge "Move TaskSnapshot into android.window package"Ming-Shin Lu2020-12-161-2/+3
|\
| * Move TaskSnapshot into android.window packageMing-Shin Lu2020-12-131-2/+3
| | | | | | | | | | | | | | Bug: 166736352 Test: build pass Test: atest CtsWindowManagerDeviceTests Change-Id: I7f03524f018ceb64c109fd9d78abeb0ea98b6ea5
* | Clean up LetterboxTaskListerner and all related logic.Mariia Sandrikova2020-12-131-45/+0
|/ | | | | | | | | | This is the first step towards moving letterbox gravity logic from WM Shell to WM Core. It's important to do this even before the new implementation in WM Core is ready because surface repositioning in WM Shell causes visible flickering on rotation for all apps on devices with cutout. Fix: 174632285 Bug: 175212232 Fix: 173440321 Test: atest WMShellUnitTests Change-Id: I2b3706a1a46bb2c7ee4bb3789fb09b216e32f290
* Letterbox: show activity under insets when possible or neededMariia Sandrikova2020-12-091-1/+13
| | | | | | | | | | Activity handles insets on its own (e.g. under status bar or navigation bar). After task's surface is repositioned, intersection between an activity and insets can change but if it doesn't, the activity should be shown under insets to maximize visible area. Also, an activity can use area under insets and insets shouldn't be cropped in this case regardless of a position on the screen. Test: atest LetterboxTaskListenerTest Fix: 174086576 Change-Id: I84cd28520ead3fb0099f15cc672167871c7d78a1
* Use equals() to check equality of PictureInPictureParams.Garfield Tan2020-12-041-1/+1
| | | | | | | | | | | | Introduce equals() method to PictureInPictureParams and RemoteAction. Also makes a dup of PictureInPictureParams when filling task info to avoid the same instance being updated later which will interfere equality checks. Bug: 174786192 Test: PIP on YouTube looks OK. Change-Id: Ifd8534589d784719dfd5f9b37412ca8779a46983
* Add task visibility to TaskInfo.Garfield Tan2020-11-301-3/+12
| | | | | | Bug: 165794880 Test: Task visibility is pushed to WM shell. Change-Id: If518a72c658ffe55b60c82afadfc92b1e7bd2738
* Add window focused state to TaskInfo.Garfield Tan2020-11-191-3/+13
| | | | | | | | | | Add a helper method Task#dispatchTaskInfoChangedIfNeeded to avoid checking for isOrganized() every time we need to dispatch a task info change. Bug: 165794880 Test: Window focused state is pushed to WM shell. Change-Id: I3e1272884f4ca9021c82b0df71ff2f7c5a6fea83
* Move TaskInfo comparison from TaskOrganizerController to TaskInfoMariia Sandrikova2020-11-181-0/+31
| | | | | | Bug: 170216257 Test: atest WMShellUnitTests Change-Id: I7ef6913172f57fbfad116a04e9e324ed9dc6535a
* Make positioning in letterbox mode configurable.Mariia Sandrikova2020-11-171-0/+10
| | | | | | | | | | | | | Changes: - Allow to specify in config_letterboxPortraitGravity and config_letterboxLandscapeGravity desired alignment for letterboxed apps. - Add ADB commands to allow overriding these config values for testing - Move positioning logic for letterbox mode from WM Core to WM Shell. Test: atest LetterboxTaskListenerTest LetterboxConfigControllerTest Test: go/wm-smoke Test: manual with adb shell dumpsys activity service SystemUIService WMShell (get)set-letterbox-portrait-gravity / (get)set-letterbox-landscape-gravity Fix: 170216257, 170215849 Change-Id: I8e6392faab05bec1bf61b9691f3bd9b8b09b9621
* 4/ Add basic drag and drop policy & handler for the shellWinson Chung2020-11-021-0/+12
| | | | | | | | | | | | | | | | - Add basic policy for handling drags over home/fullscreen tasks /split tasks. For now, default to only allowing split to non-docked root task - Refactor drag layout to have same lifecycle as the window instead of being per-drag session - Resolve activity info for tasks as well as activity drag items (shortcuts to be resolved in a follow up CL) - Fix crash due to sending drag events to all displays Bug: 169894807 Test: atest DragAndDropPolicyTest Change-Id: I7d777c59296e9ca9e1d169c8a021f9263af94d65
* Merge "Allow children task of created-by-organizer task to be organized"Jerry Chang2020-11-021-0/+18
|\