Access through the overview proxy to get the bounds of the secondary
split screen app when split screen is enabled.
Test: manual
Fixes: 77678123
Change-Id: Iabbcf30dc7194ac6fff9b4d7cad8a9fe5ee48a2b
Works around a source of jank when drag resizing in split
screen mode: instead of immediately resizing the (potentially
numerous) invisible secondary stacks, we defer that until
the user lets go of the handle.
Change-Id: I3b9faa83005fa86185d4e51b2849e3a826b7f6a9
Fixes: 78214347
Test: Open a gazillion (resizeable) tasks. Enter split screen. Drag handle, verify there is no jank
Test: atest RectTest
There are cases where the last snapTarget position is negative.
Specifically, it can be negative if the divider was moved up, making the
last position negative off-screen. Instead save the middle SnapTarget,
which is the default, so bounds aren't accidentally calculated with
negative position.
Fixes: 74440003
Test: Bug no longer occurs
Test: Split screen with 3rd party launcher
Test: ActivityManagerSplitScreenTests
Change-Id: Id3261d6e31622a96f71ff80301dd9cc39599b7ec
Fixes an issue where the insets given to SystemUI's dock divider
did not include the display cutout insets, which would lead to the
minimized view being laid out wrong.
Bug: 75277581
Test: Enter landscape, enter splitscreen, press home. Verify that there is no extra space between home and the divider.
Change-Id: I85107f147381aaceb01dfcad329662d54d72bbf7
- Restructure assist data receiver to not extend hidden interface
- Restructure animation spec to not use hidden spec class
- Restructure transitions apis to not use graphic buffers
- Remove direct arguments which use hidden animation start listener
- Renaming some methods to be a bit more clear
- Expose AnimateableViewBounds and task stack listener
Bug: 67510855
Test: Sysui and quickstep still build and work
Change-Id: Ibc471c34a725daa3149765960ae0731996ceb854
- Move the task stack listener wrapper into the shared lib, along with some
other AM calls.
Bug: 67510855
Test: Launch recents
Change-Id: Icb5ea78ec42d4b76a1c531ce336dd9a3f07a9629
Tablets have the ability to dock to the right side in landscape. This
change supports minimized mode for right dock side.
Test: run-test CtsActivityManagerDeviceTestCases
android.server.am.ActivityManagerDockedStackTests#
testMinimizedFromEachDockedSide
Change-Id: Ie879bdf7bf74226c0ceda9295f9de2004fd6a9b5
Fixes: 68017311
- When a task is docked from Recents, the last position is never updated
if the user never touches the divider. Ensure that the default dock
snap target is saved in this case as well.
Bug: 66903645
Test: Dock a task from Recents, go home, and hit recents
Change-Id: Ia229d2ba0eee792424fb9e9c043320cec71695dc
Changed to save snap targets instead of positions when divider is
attached to window and after any stopdragged animations occur.
Test: manual - split 2 apps, rotate screen, hold home launch assistant,
click keyboard, hold device back to portrait and press home
Fixes: 64977831
Change-Id: If47a04742b812eed3be0d08a243d4226515308b5
There was a regression where recents stopped growing when in split
screen and bottom app has less height than top. Then when pressing
recents button it would go into recents on bottom split and divider
would move to the center.
Test: manual - split with 2 apps, lower divider, press recents button
Fixes: 62431729
Change-Id: I3cacb4e4bd38a17602415ebee4e24a517115bbdd
- The RecentsDrawnEvent sent when Recents is first drawn can be racey, if
it is sent before the configuration change in Divider is dispatched, then
it will be posted for the old DividerView, which prior to ag/2363241 was
still sending the correct resize calls (the animation is independent of
the view). For now, we register the event handler in Divider, and
instead proxy it to the current view when it is posted.
Bug: 62528361
Test: go/wm-smoke
Test: Play a movie in Play Movies, ensure the activity is resized
Change-Id: I665b0c6af55dea0db1916f5b041589bf72da3baf
If a divider view is removed or in the process of been removed, then it
should no longer have any influence on the size of stacks.
Fixes: 62273599
Test: go/wm-smoke
Test: enter split-screen and make sure recents is visible, lock and
unlock the device and verify things look fine.
Change-Id: I79aca82be8a7013328b78e82f508c4ed9fa48a4a
"Activity may not work with split-screen" message is not showing
because the overlay activity is not allowed to resume without
user action.
Bug: 36205249
Test: Launch an activity with target SDK < 25, enable split-screen
Test: go/wm-smoke
Change-Id: Ic796f4449df1307c75ca5445cbffab218f0f8ae3
Holds the divider ratio in the divider state to persist after
configuration change while minimized. After unminimizing past
a configuration change, the previous position will estimate to
the closest snap target.
Test: manual - minimize, rotate, unminimize
Fixes: 34395958
Change-Id: I6ceffb9f5018b8009069f0aa0085f263d8982319
When launching an app in splitscreen with while ime is up will trigger
an animation that is trying to minimize the docked stack (this bug is
tracked in b/36603383) with the end result in incorrect bounds for the
docked and fullscreen tasks (leaving visual glitches in their apps).
This was caused by setting the divider position while there was
interaction with the minimized state. Therefore ignore setting divider
while adjusting for ime and minimized interaction for the tasks to end
with the correct bounds.
Fixes: 38428386
Test: manual - dock something in split screen, use the launcher search
to bring up ime, launch any app (like gmail)
Change-Id: Ic3547b02a39f40698db07d1c0946e0991b69f5d3
DividerView sometimes gets attached (after created) after minimized mode
has triggered and therefore causes choreographer to trigger a null
exception. So put it in the constructor to avoid this issue.
Change-Id: Iad32fa42ab2bc60bde4ac0be8f8eac8b55de40ae
Fixes: 38017227
Test: manual - hard to repro, keep rotating screen while minimized
Added code to restore docked stack to the position before minimized
state when no animation duration is specified. Battery mode skips
animations and therefore it provides no animation duration.
Change-Id: Ica4e4497b90d6b99c9c2c78b5e27365fe35b37ce
Test: manual
Fixes: 36768431
- Use same strategy to draw thumbnail bitmap by moving
startActivity off from the main thread and start caching the future
when AM is busy executing startActivity.
- Move some binder calls off the main thread.
- Add some trace points for better analysis in the future.
- Make toggleRecentApps asynchronous so we don't have to wait on
the next app-vsync - it's totally not needed.
Test: com.android.apptransition.tests.LatencyTests
Fixes: 32668632
Change-Id: Id6483e26e9d6c1e319bceaa8268da976cedfbca3
Merged-In: I15db41f2e821779972ab3b430033c70aa1dfd907
Minimizing with the ime would cause visual glitches with the divider and
unminiming after would set the wrong position leaving graphical errors.
Record the position before minimizing when adjusting for ime and do not
set that position when the ime is still adjusted. Also added animation
for the divider when adjusting for ime.
Bug: 36603383
Test: manual
Change-Id: I456f3a726c62d130dce6c58c2245982e7f46454c
When docking any app with overview on the bottom and continuously press
the overview button would not cause the position before minimized
variable to record an incorrect position. Instead only record when not
animating so that the original position is kept. Then after unminimizing
the docked stack, it will return back to the original position that was
recorded.
Change-Id: Ia9da24dcb2a5be1f10be3797007e02b1a1425345
Fixes: 35642296
Test: manual
There is a contract that a non-resizeable activity cannot get
a configuration different from the global config (or fullscreen
config on primary display). This CL ensures that for launching on
secondary displays and checks if target display's config matches
the global config.
If a forced-resizeable activity is launched to a secondary display
or there was an attempt to launch a non-resizeable activity that
failed, corresponding toast message will be displayed.
Bug: 36777179
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testLaunchNonResizeableActivityOnSecondaryDisplay
Test: #testLaunchNonResizeableActivityWithSplitScreen
Test: #testMoveNonResizeableActivityToSecondaryDisplay
Change-Id: I5346afe740e78e4e5ba9a9694e97ac60b92663e9
We create a new thread on which everything is running that
directly impacts window animations, i.e. layout, anim tick and
starting window creation. This is such that any work on
android.display can not lead to jank in the window animation,
specifically lock contention on activity manager lock that blocks
callbacks from android.display into AM can not lead to window
animation jank.
Test: Run animation, take systrace, make sure animation is on
android.anim
Test: AppWindowContainerControllerTestTest: AppWindowContainerControllerTestss
Fixes: 36792959
Change-Id: I5d41419a709b7984724e7053a3afdcc1ffe1aaa2
Test: Run window animation, make sure it's smooth
Test: Take systrace, make sure it runs at vsync-tick
Test: Move divider, make sure it's still smooth
Change-Id: I1600618e074be811134fe4ccb1dfbd5034820c71
Fixes: 36583867
Fixes minimized state for its task and stack bounds to always match
inline with the cts test that was failing.
This also fixes multiple state issues related to splitting home and
recents into different stacks when recents incorrectly reads home stack
bounds to determine bounds for recents.
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerActivityVisibilityTests or
ActivityManagerDockedStackTests
Fixes: 35351074, 35145587
Change-Id: I6417a567e937c647818ff26dc08df463e6ef4257
Since resizable launchers in minimized mode shows more of the docked
stack than in non-resizable launchers, it will play the same
functionality as split screen where long press overview button will
exit split screen into fullscreen mode.
Test: test was written - adb shell am instrument -w -e class
com.android.androidbvt.SysUIMultiWindowTests
com.android.androidbvt/android.support.test.runner.AndroidJUnitRunner
Fixes: 34892561
Change-Id: I9f957dada1b325b36068d59fa9b2d1fa4912b804
If a launcher is resizable, going to minimized mode (dock task and then
press home) would show a cropped height of the task at the top in a
minimized state and the fullscreen stack would show the home launcher
which takes the rest of the remaining height. If the launcher is not
resizable, it will default the original behavior.
To enable this in a launcher, add android:resizeableActivity="true" in
the AndroidManifest.xml in the <application/> tag.
Test: manual - rotating while minimized, minimizing using dragging task
or holding overview nav button, installing resizable launcher with a
non-resizable launcher
Fixes: 32504542
Change-Id: Idf4015b40f9bec81b70f146f0f2d7df8ccfb4cf0
- Distinguish between task overlays that need to be resumed and
those that should not.
Bug: 34240533
Test: Open PiP, tap to show menu.
Change-Id: Ibdb54d544c501a492260f02cdc2de40c5c1a66d1
This fixes an error from change-id
Ic9c8a5096ce9f30fc1265774ebb82c1356b1221b where the docked state was
not dismissed when long pressing recents. Minimized state is also
handled by not having the second vibration.
Test: manual - tested home screen, minimized, dock and undock the tasks
into multi-window mode
Fixes: 33655754
Fixes: 29927464
Change-Id: I3adedf9d0e1dcd5fe297f7ca8b9cb8faeba8bcb1
We tried to fix this issue in I83357975c87c704af9d0702c939ca99984462365
but the fix introduced other problems. So, we are going to have sys-ui
create a separate binder for object for each type of window it adds.
Long term we want to allow one binder object to map to multiple window
tokens on the same display in window manager.
Change-Id: Iee53b8bf95b87f79ab7a1b574a54111c678f7413
Fixes: 33567674
Fixes: 33538278
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
For smaller size screens (such as 720p), in split-screen view,
the size of DividerSnapAlgorithm.mTargets is 3, the divider line
can only stop in the middle.
As the original logic, when tapping recent, it will cause the top-docked
activity to resize, leading to flash in some cases.
To fix this, do not call startDragging in this scenario.
Google issue:
https://code.google.com/p/android/issues/detail?id=224851
Change-Id: Iac58d536ccf668eed67f82418ce2cf90d46670ed