Before, before TaskFragment appeared, the getTopNonFinishingActivity may
be null, and throw exception for no bounds found.
Now, make sure we always have Task bounds stored.
Bug: 228885031
Test: atest WMJetpackUnitTests:SplitControllerTest
Test: atest WMJetpackUnitTests:TaskContainerTest
Change-Id: I3744813a85f24941563c8ff8f284b2e45396f906
To use this new custom close action on Phone
- We expect app providing actions via
PictureInPictureParams.Builder#setActions as they normally do
- We also expect app providing a custom close action via
PictureInPictureParams.Builder#setCloseAction
- The custom close action is used on Phone only if it matches one of the
actions listed in setActions (by comparing the PendingIntent)
SysUI will render the custom close action with a highlighted background
and ensures the PiP dismisses after certain timeout if the app fails to
respond in time.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/fR0hxeorlYrxXyzfZ02btK
Bug: 223896879
Test: see video
Change-Id: I65c585ae3224061311e476753bc4c72f00c4fa33
In current desgin, the confgis for cutout and rounded corner are based
on the original display size. If the display resolution is overridden,
cutous and rounded corners will be drawn in incorrect places with
incorrect size.
We should load the cutout & rounded corners with the orignal display
size and then scale the results with the display ratio which is
calculated by dividing current size with original size.
Bug: 209592558
Test: manual:
1. Go Settings-> Display-> Screen Resolution
2. Switch between FHD+ and QHD+
3. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: manual:
1. adb shell wm size 1080x2340
2. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: atest DisplayCutoutTest LocalDisplayAdapterTest
ScreenDecorationsTest RoundedCornerResDelegateTest
Change-Id: Iea42b73c0276b82983c1ddbce9455355afdc164d
Dragging a notification into split screen would fail if bubbles
were expanded while performing this action. I think it makes sense
to collapse the stack if its open when drag and drop for an app
starts.
Bug: 223909931
Test: atest DragAndDropControllerTest
Test: manual - have bubbles expanded
- swipe down the shade, long press on a notification
and drag it
=> bubbles are collapsed and the notif is able to be
put into split screen.
Change-Id: Ib5160b3d772452f1cdd704926887bd38a5fd1ef1
We ignore WCT for TaskFragment in PiP, but in case the empty
TaskFragment is not removed before the Task enters PiP, we should allow
organizer to remove it.
Also make sure we have all requests in one WCT during
onTaskFragmentInfoChanged.
Bug: 225371112
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Test: atest WMJetpackUnitTests:SplitControllerTest
Test: atest WMJetpackUnitTests:TaskFragmentContainerTest
Change-Id: I718bbb7f6c18c35048c671ed3c131eaf536cf265
This is a follow-up of ag/17527240 in which we do not cover the case
that a Task in pinned mode is directly removed via Task#moveTaskToBack
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cMG5Uh1kLC7EyAs2EbDVkM
Bug: 228793904
Test: follow the reproduce step in bug, see video
Test: atest WMShellUnitTests:PipTaskOrganizerTest
Change-Id: Ib7472908a81d56d34216ca272afbd9f1a2668b89
This bug occured when it has multiple visible app targets need to
show. If surface didn't have specific layer, their display order
will be determined by create timing. By such rule, we should create
their animation leash by down to top rather than top to down.
This patch also fix wrong logic to create RecentsAnimationSplitTasks,
we should only do that when split is active.
Fix: 223396876
Fix: 207390696
Test: manual
Test: pass existing tests
Change-Id: I74a33cdc28d370f1db3910ebda8577c72416bc97
Libtonemap now accepts the display renderintent as an optional
parameter.
Bug: 227779465
Test: builds, boots
Change-Id: Ic9b48cba4bd23ec0b7e43ecdc1808f8bd522dcb3
When a bubble gets dismissed while the stack is expanded, we should
select the next available bubble. Instead, we are collapsing.
This is because we get an onTaskMovedToFront event for the app
behind bubbles moving to the front, which causes the stack to
collapse. To fix this I add a check to see if the switch animation
is running, and if so we skip the collapse in onTaskMovedToFront.
Bug: 208648025
Test: manual - have multiple bubbles, expand the stack, visit each
bubble
- dismiss each bubble by dragging to dismiss target
=> observe that after dismissing each bubble, the next
bubble is selected (if available)
Change-Id: If82c004ecd1ec8920e934dbae2107b4c37853cb5
When the bubbles are shown vertically on the left side of the screen
and you tapped between them, the view would be misaligned for a bit
during the animation.
This was happening because the padding being applied to the view
didn't account for the space the pointer triangle took up.
The fix is to add the size of the pointer to the padding when
showing vertically on the left side.
Bug: 196444014
Test: manual - expand a bubble on a large screen on the left side
- tap between the bubble and the overflow or other
bubbles
=> observe that the expanded view doesn't jump a bit to
the left
manual - test switching between bubbles on phone, phone
landscape (left & right sides), and tablet on the
right side
=> observe that the animation looks correct
Change-Id: Icb3cd87843504ab31da8005fb72f36daae387d39
Bug: 228533817
Test: Try swipe back to home on Flag Flipper (with Predictive Back
Animation toggle enabled in Flipper) and make sure animation looks good.
Try in both landscape and portrait mode.
Change-Id: If2165827a0f66f8e0bd8f78483577c3ac4c9f213
Use a fixed icon size and fit to centor scale for split decor to avoid
unexpected icon size. Also sync the same icon size to drop zone area.
Bug: 228928242
Test: Manual resize the split and check the icon size.
Manual drag to split and check the icon size.
Change-Id: Idaf523810e3913a22787925817b6013464818147
If user start task and intent with same app but not support
multi-instance, in this case it will only start one side split and
the other one show as black screen.
We should avoid such status and do some error handling, this patch
prevent it by exiting split immediately and expand the that app as
full screen.
Fix: 224888879
Test: manual
Test: pass existing tests
Change-Id: I827debb01f3a2fc8f04f4b1931084f2fa475f8a6
The code was passing the index of the bubble rather than the
actual position onscreen so the resulting translation was incorrect.
Test: manual - be on a large screen / tablet
- expand bubbles, select the overflow
- rotate the device
=> observe that the overflow container remains with
the rest of the bubbles and doesn't jump around
Bug: 223911182
Change-Id: I95403f57e40e8c428ea9694e6fb93b0b0478c530
Previously we were using an EGLConfig that is out of line with the spec
in order to support this. It would be more work to get this to work
properly, and the devices we're shipping with hardware support will
always be using Vulkan in HWUI. Simply disable the feature, so that
such a device can still work when switched to use GL.
Add a new APEX header for querying various system properties. This matches
how libandroid_runtime accesses other HWUI utilities. Currently the new
header only includes one method, but could be expanded in the future to
include other properties.
Bug: 226371798
Test: manual
Change-Id: I276e089ecb68ce1fff58adeb38774f2c860e7cf6
When the Task contains multiple activities, activity entering PiP will
be reparented to a new PiP Task. In this case, we should notify the
organizer about the behavior, and prevent the dependents from closing as
a result of an empty TaskFragment.
Bug: 225371112
Test: atest WmTests:TaskFragmentTest
Change-Id: I6f0138c0532d2d0249de38fd84d1a4690f266c07