If vsync-app is a couple of ms before vsync-sf, we handle the touch
in SystemUI at vsync-app. Then, we have extremely little time to resize
all the stacks in activity manager until vsync-sf, so sometimes this is
done before vsync-sf tick, and sometimes after, which leads to jank.
Figure out the difference of vsync-app and vsync-sf in SystemUI and then
post the updates to be processed at vsync-sf so we have the whole 16ms
to process the change.
Change-Id: Ibe7cb6dfe9fbfe2d3e68e522a95a75138fb0dcf1
Fixes: 30437123
Stable insets are not calculated in the first pass, so fetch it
manually if needed to avoid a relayout.
Bug: 28705801
Change-Id: I8f9a3bab96b597a80963d7ebcc8b19454b3e45a6
- Make sure to retain the state when divider goes through a configuration
change in order to avoid that nothing happens when entering multi-window.
Save the state in DividerState and use a handler that's independant of the
attached state.
- Don't allow home task to dictate orientation unless the docked stack is
minimized. This caused a lot of weird bugs because when docking a task,
home stack gets moved to front, and if home task is front of stack, it
temporarily might dictate the rotation but later not anymore so this
causes two rapid configuration changes which may cause a lot of weirdness.
Change-Id: I6a2308af893cd8413ee8801e5b964f6ddc0abd51
Fixes: 28943853
- ag/923796 changed the logic to always return true, so these extra
calls are no longer needed.
Bug: 28867314
Change-Id: I07a4f6ac772a1444bba1950b2f27aa4be58a8419
- Do not override minimized state in SysUI when IME adjust change
comes in.
- Do not animate IME adjust if we are already animating for minimized.
This lead to problems that we animated the minimized state with the IME
adjust values.
- Make sure to update state after checking whether the IME adjust is
animating. This is to fix an issue where sometimes the IME adjust
animation didn't run because the old target was wrong.
Change-Id: Ie35e2f943a4cda99ffdc6f14663d892863759e46
Fixes: 28819201
- Add tracing when drawing ImageWallpaper.
- Don't force a redraw in onSurfaceRedrawNeeded. This only adds
another unnecessary draw and doesn't do anything useful.
onSurfaceRedrawNeeded is only here so the client can block.
- Delay entrance animation by one frame so wallpaper can be drawn
before the transition is starting.
- Add some delay for animating the tasks up in recents to match that
delay (it wasn't matched before at all).
- Fix an issue where launchedFromHome was wrong while docking.
Bug: 28769940
Change-Id: I2b763ed40078541328a1e04ffecf5b0a520fe019
- Added ActivityOption to mark a starting activity as a taskOverlay
activity. That is the activity will always be the top activity of the
task and doesn't cause the task to be moved to the front when it is added.
- Only set the starting window state of the ActivityRecord to shown if
window manager actually showed the starting window for the activity.
Avoids incorrectly trying to remove starting window for an activity that
didn't show any.
- When starting additional activity in a task, transfer the starting
window from the top most activity with a starting window. It is possible
the top most window does have a starting window like in the case of the
forcedResized activity.
- Only ensure visiblity of an activity we are starting in a task whose top
activity is a task overlay. They need to start in the visible-paused state
and not the resumed state which just causes extra churn in the system.
- Always add additional starting activities in a task with an overlay
activity below the overlay activity.
Bug: 28751186
Change-Id: I3624a4313ae9c406d42c67a3537f67ad685791af
We also need to freeze the override configuration so we don't report
the new configuration too early, which leads to bugs.
Bug: 27915587
Change-Id: Idffadbb02ab0311796caa760ae1f467fd2d17768
Since the transition is picked from layout params from the activity
below, we need to manually override it.
Bug: 28750938
Change-Id: I7351c7d8bd14a393cba51d6afb1e644204217440
For calculating the smallest width, we need to iterate through all possible
orientations, snap the task bounds to a valid snap target and then use the
smallest width across all orientations.
In addition to that, when flinging the divider handle to the bottom of the
screen, we need to pass in fullscreen task bounds to avoid that this new
logic applies so the maximizing app only receives one configuration change.
Change-Id: I37aa9a40938517dfaf26770eb41327d76aec7c62
Fixes: 28469673
Make sure to "freeze" bounds while dismissing the docked stack by
either maximizing or minimizing it.
Bug: 28196862
Change-Id: Ifcd9deda340de8bc46df949df2fa1049e2f45f92
If we start the forced resizable activity with an existing task,
avoid moving that task to the front. This can cause that a previous
task that was moved to the back gets moved to the front again just
because we started that activity. That's not good.
Bug: 28223489
Change-Id: If8acf31b8be98b82665de1015d5621331c37fb64
- This was causing us to try and launch the Recents activity again after
docking because the running task was the newly docked task and not
Recents.
Bug: 28177001
Change-Id: I222e50f6de00a9d7881da2182eebc61564fd3266
Also fix an issue where resize was not called.
And make the translation a bit larger, because the
animation is longer.
Bug: 27870534
Change-Id: Ia6128db8108fe57bee96816fc95fd0811d941ffb
- In PWM, make sure to read the height values after the new
configuration has been applied.
- Reset all navigation bar button icons when density changes.
- Adjust height of notification bar.
- Reload divider height values in SysUI and WM.
- Snap divider handle to a new position after loading the
new configuration, as the snap points change.
Bug: 26844819
Bug: 27450471
Bug: 27921696
Change-Id: I9e28f0c49f6367c5fcfac010e7a6e98a42e85996
Make sure to update the touchable region whenever the layout
changes. The layout is wrong if the window is invisible during
the first layout.
Bug: 27854148
Change-Id: Ic0501eccf7b919d10491c6f5aa0c0f1765a07c52
- When SysUI crashed, make sure state is up-to-date
- When divider gets invisible, update state because animations
won't finish
- Make sure to keep mMinimizedDock up-to-date in all cases, even
if docked stack is already gone.
- If docked stack is going away, reset minimized state
- Disallow undocking when minimized.
Bug: 27588187
Bug: 27486464
Change-Id: I6ea48562fae3a8df038a690a488580d758681370
- Fix calculation on which side to apply dimming.
- Fix dismissing parallax logic for new resize handling.
- Remove wrong/unnecessary resizeStack call
Bug: 27738239
Change-Id: Iaac671ca03e19aa70fa779d319b5fe84ff3b40ba
Add a callback to TaskStackChangeListener which gets fired when the system
might need to inform the user that a specific app might not work in
multi-window.
Use that callback in SysUI to show a translucent activity which scrims the
activity behind to inform that it might not be resizable.
Debounce the information to once per multi-window session, to not make it
annoying.
Introduce launchTaskId to start an activity in an existing task, and protect
that with START_TASKS_FROM_RECENTS permission.
Bug: 27327287
Bug: 27431869
Change-Id: I89e8d653872ab01ba3c1e252b426e5481da0e6ca
This reverts commit 50cd6361d7.
Now resize happens only after the divider is released, so these changes are
no longer needed.
This also fixes resize of 'non-docked' stack in split-screen during dragging
the divider: minimizeHoles was setting incorrect 'taskPositionOther' value
which lead to incorrect insets.
Bug: 27621228
Change-Id: Iec8dc977296e204b206954847dddfc159f498930
To reduced jank during resizing we now only resize the task
when the split-screen divider is release vs always resizing
it to the snap points.
Bug: 27738239
Bug: 27676101
Bug: 27601572
Change-Id: Iad450842d82193bc1731729834339068cf2d3e83
Adds tap affordance that moves all tasks of the docked
stack into the fullscreen stack as well as moves the top task
of the fullscreen stack into the docked stack.
Also make sure not to trigger focus switch when tapping the divider
handle. For that, add a method so SysUI can specify the touchable
region which then gets excludes for the focus switch touch region.
Bug: 27358134
Change-Id: I34f39c53cacc0b9c00f87a792b88c3f64a5f61e1
- Don't move recents window around during the animation
- Set the correct task size shortly after docking, so recents
starts with the correct size to avoid jank.
- Add staggered animation in recents.
Bug: 27154882
Change-Id: I7c56102feba9c3f6cb86cb5f1d87f0ad3b29c721
Makes sure we don't end up in a weird state because
at the end of the fling animation, mDockSide gets
reset.
Bug: 27269044
Change-Id: I779b8ee9be9a35553c7f822421d1f02ca802111c
- We keep the docked stack visible when home task is visible even
though it's not resizable.
- We introduce the a new concept called "minimizing" the docked stack,
which happens when going home. In this state, the docked stack is
clipped of almost completely.
- To achieve that, we introduce TaskStackBoundsAdjustController,
which adjusts the bounds of the docked stack when minimized. Also,
migrate the IME handling to this new class.
- We also need to inform SysUI that it is now minimized so it can
remove the drag affordance on the divider, and also make it a bit
smaller.
- When we detect an app transition, we check whether the home stack
gets visible/invisible. We then start an animation which runs in
sync with the normal app transition. For that we introduce
DockedStackDividerController.animate(), which performs the animation.
Bug: 27137961
Change-Id: I8623bc73cc6872bf28c5b1b8d5795974576811b2