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
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