Commit Graph

93 Commits

Author SHA1 Message Date
Winson
675c5d8e5a Fixing issue with toasts not showing for guest users.
Bug: 30001278
Change-Id: I43269da8a6c41f4fec5923aafe5a624ec75ba651
2016-08-23 17:22:32 -07:00
Jorim Jaggi
dbe6fdb05b Fix multi-window drag jank if vsync-app is before vsync-sf
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
2016-08-02 10:55:49 +02:00
Jorim Jaggi
e525a35704 Fix multi-window enter animation
Stable insets are not calculated in the first pass, so fetch it
manually if needed to avoid a relayout.

Bug: 28705801
Change-Id: I8f9a3bab96b597a80963d7ebcc8b19454b3e45a6
2016-05-27 23:58:20 +00:00
Jorim Jaggi
a6c05d5151 Fix weirdness when home task forces rotation
- 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
2016-05-27 21:09:22 +00:00
Winson
7660bca509 Removing extra haptic feedback.
- ag/923796 changed the logic to always return true, so these extra 
  calls are no longer needed.

Bug: 28867314
Change-Id: I07a4f6ac772a1444bba1950b2f27aa4be58a8419
2016-05-23 18:24:49 +00:00
TreeHugger Robot
a1e0cebf3a Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev 2016-05-19 15:03:36 +00:00
Jorim Jaggi
3070e77f91 Fix a few issues with ime adjust/minimized dock stack
- 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
2016-05-18 19:27:24 +00:00
Jorim Jaggi
c5887ea7a0 Fix janky multi-window entry animation
- 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
2016-05-17 18:10:31 +00:00
Michael Wright
f9d9ce7705 DO NOT MERGE Rename PointerIcon and Pointer Capture APIs
This is a response to API council feedback.

Bug: 26830970
Change-Id: Ia2d284b5c1ab8365bedfdc37d129be4b8146036b
2016-05-17 18:02:32 +01:00
Wale Ogunwale
3b23239d6e Fixed bugs with starting windows when displayng forcedResized activity
- 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
2016-05-16 16:27:01 -07:00
Jorim Jaggi
26c8c42bbb Also freeze configuration when freezing bounds
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
2016-05-13 16:00:50 -07:00
Jorim Jaggi
e6d157b936 Fix transition for forced resizable exit
Since the transition is picked from layout params from the activity
below, we need to manually override it.

Bug: 28750938
Change-Id: I7351c7d8bd14a393cba51d6afb1e644204217440
2016-05-13 21:18:52 +00:00
Jorim Jaggi
8563943bd3 Fix smallest width configuration calculation
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
2016-05-11 18:33:01 -07:00
Jorim Jaggi
069dfe67a2 Don't resize task when dismissing docked stack
Make sure to "freeze" bounds while dismissing the docked stack by
either maximizing or minimizing it.

Bug: 28196862
Change-Id: Ifcd9deda340de8bc46df949df2fa1049e2f45f92
2016-05-04 17:24:47 -07:00
Jorim Jaggi
31f71705df Add dump information for divider
Bug: 28575870
Bug: 28445644
Change-Id: Ib2137c49f1672ed2a9e7e31a5b68c22e0bb166b1
2016-05-04 16:43:04 -07:00
Jorim Jaggi
c875ae74ba Don't move forced resizable info activity to the front
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
2016-04-27 19:19:04 -07:00
Winson
d46b72788e Removing legacy calculation of Recents visibility.
- 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
2016-04-21 15:16:42 -07:00
Jorim Jaggi
7b4583974c Fix IME adjust in SysUI
- Make sure scale is correct.
- Adjust interpolator to match WindowManager.

Bug: 28175599
Change-Id: Ica94b3dbac2fcc6e4b8a75faa311fb7861071ccc
2016-04-20 23:51:42 +00:00
TreeHugger Robot
50c410c1c9 Merge "Fix wrong transition when recents is growing when entering" into nyc-dev 2016-04-20 01:48:39 +00:00
Jorim Jaggi
db21bbd2ca Fix wrong transition when recents is growing when entering
Bug: 27855229
Change-Id: I050305d16df6fe53abf5e74e1f9ee6c882dd7ead
2016-04-19 17:07:06 -07:00
Winson
ce9630da86 Tweaking accessibility actions for dock divider.
- Adding tl_full/70%/50%/30%/rb_full

Bug: 27724715
Change-Id: Ie3125ec81e6463696cf56640c6b86f9cfcbda945
2016-04-19 14:46:24 -07:00
Winson
863828763a Disallowing scrim activity from setting TaskDescription.
Bug: 28248314
Change-Id: Ifa2ed84a0a772ed3636ec4a8b94a165aebeb7049
2016-04-19 10:41:40 -07:00
Jorim Jaggi
e370e15056 Slow down entrance animation on tablets a bit
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
2016-04-15 14:34:55 -07:00
Jorim Jaggi
698e7634aa Disable resize when IME is adjusted
Bug: 28175599
Change-Id: I338dd230443973d912f17946ed722789b0f545a2
2016-04-14 20:45:56 -07:00
Jorim Jaggi
545c5c20d3 Refine long-press enter and exit animations
Bug: 27154882
Change-Id: I13a1a6ea7eabdefc7e5c32ae0471d9fa14cc3f86
2016-04-13 21:27:32 +00:00
Jorim Jaggi
29379ec859 TRON refinements for multi-window
Bug: 26013430
Change-Id: I89b139b4ca3e7b6a06d8b5b351d67ffac240f73f
2016-04-12 19:43:52 -07:00
Jorim Jaggi
2917dc4918 Add shadow for minimized dock
Bug: 27972642
Change-Id: Ic4c8145f61694ff2bb0e237da1142093c6a4d965
2016-04-12 19:17:24 -07:00
Jorim Jaggi
47ee9ad92c Refine exit animation
Don't move the other stack when exiting multi-window with undock
gesture.

Bug: 27154882
Change-Id: Ia2793d2e2b16def543289f8b2b13631db90edca8
2016-04-12 18:11:23 +00:00
Winson
d87e9a4857 Adding vibration after successful dock/undock gesture.
Bug: 27588627
Change-Id: I1dd149d4f7e7fccf8ec61b59bab7c14a90b77e45
2016-04-11 21:39:00 +00:00
Jorim Jaggi
ab9b01ccb0 Fix talk back announcement
Bug: 27950180
Change-Id: I8f201c6303e40d0249944d73b2b71eb0ceadfad8
2016-04-11 18:58:50 +00:00
Jorim Jaggi
7b3936977f Update visuals of force resizable
Bug: 27327287
Change-Id: I32d30a8044f683e2f6287035250126999f623e15
2016-04-09 01:14:48 +00:00
Jorim Jaggi
7c3912e4ab Merge "Dismiss docked stack when opening non-resizable activity" into nyc-dev 2016-04-07 23:40:44 +00:00
Jorim Jaggi
d53f09254e Dismiss docked stack when opening non-resizable activity
- Also move the toast to SysemUI as a cleanup.

Bug: 27341740
Bug: 28026841
Change-Id: Ic6196ed75511751c6fadb12fa24574c881100f65
2016-04-07 16:07:27 -07:00
Jorim Jaggi
11c62e17af Dynamic density change handling
- 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
2016-04-06 19:12:24 +00:00
Jorim Jaggi
8eb8a32f98 Fix divider touchable region
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
2016-04-06 01:20:25 +00:00
Jorim Jaggi
ef92d6fd24 Fix minimized dock
- 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
2016-04-04 15:00:29 -07:00
Jorim Jaggi
e661f4001c Fix background pivot point
Bug: 27859759
Change-Id: Id4d77d3bd17ae96441960717a4ffe0bf4831562e
2016-03-26 02:20:43 +00:00
Jorim Jaggi
6885598ba0 Hide window swapping behind a flag
Bug: 27859522
Change-Id: I0e1e578d2d91f7572b0978dbb12ed143acbdf1e1
2016-03-26 01:55:12 +00:00
Jorim Jaggi
8dccd23675 Some divider handling fixes
- 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
2016-03-25 18:10:14 -07:00
Jorim Jaggi
2adba07d75 Show a scrim activity if task is not resizable
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
2016-03-25 14:23:41 -07:00
Andrii Kulian
cddd32fc2b Merge "Revert "Refine divider behavior"" into nyc-dev 2016-03-22 21:04:48 +00:00
Andrii Kulian
fc34b73aef Revert "Refine divider behavior"
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
2016-03-21 17:26:11 -07:00
Wale Ogunwale
85941cff0c Merge "Added support to specify animation duration when resizing stack" into nyc-dev 2016-03-21 20:04:20 +00:00
Wale Ogunwale
e75a9adfbd Added support to specify animation duration when resizing stack
Needed for sys-ui to control the duration of various Pip transitions.

Bug: 27674339
Change-Id: I7bad27aaa19755a73c594e88b88b56db033e1a45
2016-03-21 11:17:19 -07:00
Wale Ogunwale
ef676d89f8 Only resize task when divider is released
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
2016-03-18 15:12:12 -07:00
Jorim Jaggi
d47e7e1176 Add ability to swap docked/fullscreen stack
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
2016-03-10 19:49:45 +01:00
Jorim Jaggi
899327f5cb Animation for docking task gesture
- 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
2016-03-09 13:58:11 +01:00
Jorim Jaggi
88afd020b6 Accessibility for split-screen divider
- Add label
- Add actions

Bug: 27274494
Bug: 26894949
Change-Id: I041c44f793f1ec86ec27951cc8e87868148b527d
2016-02-25 13:18:12 -05:00
Jorim Jaggi
0c790411c3 Cancel fling animation when starting to drag
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
2016-02-20 02:23:37 +00:00
Jorim Jaggi
42625d1bc7 New behavior for docked stack when going home
- 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
2016-02-19 12:11:11 -08:00