Commit Graph

281 Commits

Author SHA1 Message Date
lumark
5428446535 Better support for cleaning up the recents animation
With Life Tiles in QuickSteps (b/111697218), launcher will
“punch a hole” for TaskView & the app window will be transformed
in it & keep the task is running.

To prevent launcher animates on TaskView without the real app surface
during task switching, launcher start RecentsAnimation to monitor
onStackOrderChanged without cancel animation when swiping to recents.

We use this as signal to screenshot the previous app window when next
app transtion start, make leash with screenshot surface to let it below
homeAnimationLayer, so that launcher can still control the leash,
and then callback onAnimationCanceled with screenshot parameter for
launcher to know if need to call IRecentsAnimation#cleanupScreenshot for
clean up screenshot, to make the next app transtion animation can work
smoothly without flickering.

Bug: 122593881
Test: manual
Test: atest RecentsAnimationControllerTest RecentsAnimationTest
Change-Id: I83504d578a17856623a53c04a7d3c54e5bcab5f4
2019-03-21 02:04:04 +08:00
Winson Chung
c5fe7ffba7 Add mechanism for freezing the system recent task list
- In order to support swiping between tasks in a stable list, this allows
  SystemUI to temporarily freeze the task list ordering until either an
  interaction within the current app, or some timeout occurs.

  This does not affect the actual task ordering, only the ordering of the
  tasks via the call to getRecentTasks() made from SystemUI.

Bug: 111926330
Test: atest WmTests:RecentTasksTest

Change-Id: I9ebda02e4e0d34fd2211cfbbed9f7b0ec35f86cc
2019-03-15 09:53:47 -07:00
TreeHugger Robot
e035a1fd2e Merge "Decrease the edge panels height to not overlap with ime" 2019-03-09 03:48:18 +00:00
Matthew Ng
63c8f34fc0 Decrease the edge panels height to not overlap with ime
Test: manual
Fixes: 124267373
Bug: 112934365
Change-Id: I5e8a79ab3df7ddf54f08a3ecc893bd222d11bc05
2019-03-08 15:30:04 -08:00
TreeHugger Robot
c47a64e94b Merge "Do not show assist affordance when no assistant is available" 2019-03-08 02:10:56 +00:00
TreeHugger Robot
66d64cd4d6 Merge "Add restart button for size compatibility mode activity" 2019-03-07 06:34:27 +00:00
Matthew Ng
add4c3986d Do not show assist affordance when no assistant is available
This also tells launcher that there is no assistant so it will not
consume input events.

Bug: 112934365
Test: manual
Change-Id: I5690cf2fffe45c955a9f165a0fdeac1db8641601
2019-03-06 21:35:52 +00:00
Riddle Hsu
cf33f1c5c2 Add restart button for size compatibility mode activity
- The floating restart button will show when an size compatibility
  mode activity shown with non-native screen configuration. e.g.
  display size changed, move to another display.
- Consolidate onDisplayRemoved into CommandQueue.Callback so the
  components which implement CommandQueue.Callbacks don't need to
  register display listener individually. The leakage of
  AutoHideController when removing display is also fixed by the way.

Bug: 112288258
Test: runtest systemui -c \
      com.android.systemui.SizeCompatModeActivityControllerTest

Change-Id: Ib04efe983ae0d8d21b33fb9fd9c60e7f6f0dc92e
2019-03-06 01:17:15 +08:00
TreeHugger Robot
5766681ae5 Merge "Only show smart actions for whitelisted apps in lock task mode." 2019-03-04 11:38:18 +00:00
TreeHugger Robot
24ed9e4f35 Merge "Receive assistant progress and start commands from launcher" 2019-03-01 23:15:36 +00:00
Matthew Ng
42025e3ca8 Receive assistant progress and start commands from launcher
Bug: 112934365
Test: manual
Change-Id: Id3e8a104f10940f4db87fb2986a424555214d97e
2019-03-01 11:43:39 -08:00
Gustav Sennton
5a4fc2122f Only show smart actions for whitelisted apps in lock task mode.
In lock task mode only apps from a specific whitelist can be started. To
avoid showing buttons that won't do anything when clicked we remove
smart actions linking to apps that are not whitelisted.

In this change we add several IPC calls during smart suggestions (in
notification) inflation - one in the common code flow, and several
others only for the case where lock task kiosk mode is enabled. This is
OK from a performance perspective because we inflate smart suggestions
on a background thread.

Bug: 117976013
Test: atest InflatedSmartRepliesTest
Test: start lock-task mode with 1. chrome whitelisted -> chrome actions
show up, 2. chrome not whitelisted -> chrome actions don't show up.
Test: ensure smart replies are still enabled in lock task mode.
Change-Id: I664ff2cdcfd1b212744d85d36d7a2b305bf4b3a9
2019-03-01 11:54:58 +00:00
Jeff Chang
ba7ad27960 Merge "Signal a rerouted callback if display was set to SingleTaskInstance" 2019-02-28 17:04:09 +00:00
Jeff Chang
bf29986c54 Signal a rerouted callback if display was set to SingleTaskInstance
singleTaskInstance displays will only contain one task and any attempt
to launch new task will re-route to the default display. Signal a callback
for listeners to handle the case.

Bug: 123642392
Test: atest ActivityManagerMultiDisplayTests#testSingleTaskInstanceDisplay
Change-Id: I16b98d47a798f920a551942d761f07b1df1defc0
2019-02-27 17:33:45 +00:00
Tracy Zhou
535c212158 Dispatch key events to launcher input consumer.
Fixes: 125495172
Test: Manual
Change-Id: I7d17dd91654c7543afb9e985dee4da8b89da6f08
2019-02-27 07:31:56 +00:00
Hyunyoung Song
80adf6be29 Add StyleUIChanged field to atoms.proto
Test: builds and flashed
Bug: 123356136

Change-Id: Ic24f282d7e799b263fada371d16c03dd4539a023
2019-02-23 22:04:11 -08:00
Josh Tsuji
523fdc673e Merge "Move bubbles away from the IME if needed." 2019-02-21 18:36:09 +00:00
Mark Renouf
f9aa3044f2 Merge "Adds TaskInfo to some TaskChangeListener methods" 2019-02-21 15:11:05 +00:00
Tracy Zhou
c75ac159f2 Fix NPE in SyncRtSurfaceTransactionApplierCompat#scheduleApply
Fixes: 124522312
Test: Manual
Change-Id: I0eadbd8a6c3be0cbe7122ffc43fc86c18866a33f
2019-02-20 16:56:25 -08:00
Mark Renouf
c808f069f6 Adds TaskInfo to some TaskChangeListener methods
This change dispatches TaskInfo directly for some methods
which currently only pass taskId. This eliminates the need
for second binder call to search for the TaskInfo.

See also: ag/6306456

Bug: 124058588
Bug: 123631242
Test: atest WmTests:TaskStackChangedListenerTest
Change-Id: I2e4c458f2a1ae684ef8d9f6a4ab2fbcfe13570b5
2019-02-20 16:22:22 -05:00
Joshua Tsuji
a19515f02a Move bubbles away from the IME if needed.
This involves adding the PinnedStackListenerForwarder, so that sysui can have multiple pinned stack listeners listening for updates from the WM. This looked easier and simpler than modifying all the WM code to support multiple listeners. We're also planning to integrate PIP and bubbles at some point, so that they're aware of each other and move together. At that time, we can simply delete the forwarder and use a single listener again, without modifying WM code.

Test: atest SystemUITests
Change-Id: Ie2f9f937fe0a19cac5a1ae83d83698db8d53aba2
2019-02-20 16:19:21 -05:00
Sunny Goyal
e1831cdf2a Exposing MotionEvent.addBatch method to be used in Launcher
Test: Verified library in Launcher
Change-Id: Idd58082d75310a15ed2196917f1a9e9e42f82d45
2019-02-20 11:47:54 -08:00
Sunny Goyal
aac6c8864b Adding support for passing touchevents through InputDispatcher
Bug: 124255113
Test: Verified it with Launcher
Change-Id: I1bf02ba03a80d5ffb9ebaa2a0f7154a9fc0ada9c
2019-02-13 08:20:02 +00:00
Sunny Goyal
730c407595 Merge "Adding method to release Surface control reference in Launcher process" 2019-02-08 19:01:00 +00:00
Sunny Goyal
bcd6faf4f0 Adding method to release Surface control reference in Launcher process
Bug: 124011598
Test: Library compiles
Change-Id: Ibba4d5cdf278b543cc325703ec81a21641caf27d
2019-02-08 18:33:50 +00:00
Sunny Goyal
eb0b605c17 Adding a wrapper class over InputConsumer to use it in Launcher
This allows us to use platform logic for event deduping and
timestamp extrapolation (eg using velocity tracker on the main tread).


Test: Tested the library with launcher
Change-Id: Ic4544aab975db1447100618ad2cb66b0d6c19134
2019-02-08 18:32:31 +00:00
Beth Thibodeau
ab47e04df5 Add compat for secondary splitscreen window option
Test: Tested that compiles and option works in plugin
Change-Id: I4861e09fe4bba6c1a0ec57395939aa293dd95347
(cherry picked from commit 401c20314169cfd2f50c926bdabd78d4c76502d3)
2019-02-01 20:03:33 +00:00
Peiyong Lin
9d4274005e Replace createHardwareBitmap with wrapHardwareBuffer.
The bitmap.createHardwareBitmap doesn't take a ColorSpace as input, as a result
the returned bitmap is always in SRGB color space. Given that we want to remove
the assumption of SRGB color space, we replace the usage of
createHardwareBitmap with wrapHardwareBuffer which takes an extra argument
ColorSpace. As a result, we will be able to also fix SurfaceControl and various
other places that use screenshot in follow up patches.

BUG: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I57fc0c85d68df43b0e69f9a1ebac00d2ba39554d
2019-01-30 15:22:54 -08:00
Dave Mankoff
785d3d27f4 Merge "Fix the library paths of plugins to allow loading native libraries." 2019-01-15 23:06:05 +00:00
Dave Mankoff
b938def5e9 Fix the library paths of plugins to allow loading native libraries.
Test: atest
Bug: 111394067
Change-Id: I05db6db5e735f7532f772a59ff57b8ad0595c1a2
2019-01-15 10:45:37 -05:00
Winson Chung
decfc41289 Merge "Workaround to not use the hidden SyncRtSurfaceTransactionApplier" 2019-01-11 02:01:30 +00:00
Lucas Dupin
03270e1f37 Merge "Config to disable rounded corners" 2019-01-10 17:44:31 +00:00
Winson Chung
b6eba5eea2 Workaround to not use the hidden SyncRtSurfaceTransactionApplier
Test: unbundled branch builds
Change-Id: I32838cbfbeadab223e9402ece1ffb3325230271b
2019-01-09 22:29:37 +00:00
Lucas Dupin
f36d0dcfca Config to disable rounded corners
Some devices shouldn't render rounded corners because of graphics
limitations.

Bug: 122347746
Test: swipe up on multiple types of devices: walleye, sailfish, blueline
Change-Id: I93fcb4283ed1aa3df5569454483a8867a3bfd06b
2019-01-09 11:52:09 -08:00
Winson Chung
d3b98fef20 Add context compat to call to get user id.
Test: Builds
Change-Id: I302629b3c9118a53b7dc9dea5d8c0880cd3d9db8
2019-01-03 17:56:54 -08:00
Winson Chung
708ec75fb2 Skip logic to re-enable plugin if there is no valid component.
Bug: 121260102
Test: Just an null check
Change-Id: I623951a919904006b6035558a9535b662112608a
2018-12-21 14:08:40 -08:00
Jorim Jaggi
5bb571dc40 A brave new world for window insets (5/n)
Implement controlWindowInsetsAnimation

Based on the leashes we have on the client, and the insets the
client has requested, we are able to move the surfaces around
such that the resulting insets will match what the client
requested.

Bug: 118118435
Change-Id: I0616e53455a6544aaf374c1b0eb10e258aced21d
2018-12-21 13:05:30 +01:00
Dave Mankoff
fd2c695e05 Track when plugins are disabled due to crashes.
Bug: 120901833
Change-Id: I41e5c54d059b631befac235b1d3929200764860c
Test: atest SystemUITests
2018-12-14 13:33:03 -05:00
Winson Chung
71eda589c2 Expose method to create a SyncRtSurfaceTransactionApplier when attached
Test: Builds
Change-Id: I0e90ce3976b953599740731393263dc00f0f3e63
2018-12-11 13:04:53 -08:00
Winson Chung
1f96bf1dd0 Fix issue with fetching display id from activity.
Bug: 117474929
Test: Build L3 from unbundled branch
Change-Id: I67833e5c852faa17f036f2a2dfb29521c08d0641
2018-12-04 18:48:44 +00:00
Tiger Huang
44c0455124 Let getNavBarPosition() can take displayId
Navigation bar can show on non-default display now. So the caller
should specify which display the desired navigation bar is on.

Bug: 117474929
Test: atest QuickStepControllerTest
Change-Id: Ibe06a6c7778134204502e6456860d69bea2a9061
2018-12-03 16:10:27 +08:00
Lucas Dupin
086c6fc0ae Let launcher modify window corner radius
Test: Manualy launch an app
Test: Press home when activity is on top of the stack
Test: Quick scrub
Test: Swipe up on the home button, swipe down
Test: Tap on notification on the shade
Test: atest ActivityLaunchAnimatorTest
Bug: 111514493
Change-Id: Ib7e29e7e07bf2a245ff949373af700b319e273fc
2018-12-02 04:32:13 -08:00
Vishnu Nair
e86bd98a8b WM: Removes setSize from buffer-less surfaces
- Make a better distinction between surface bounds and buffer size by renaming setSize to
  setBufferSize and removing setSize for all buffer-less surfaces.
- Adds an error check in SurfaceControl to ensure buffer size is only set for buffer-less surfaces.
- Updates color fade surface to use passed in transaction object.

Bug:114413815
Test: go/wm-smoke
Test: atest FrameworksServicesTests:DimmerTests
Test: atest FrameworksServicesTests:SurfaceAnimatorTest
Change-Id: I88bd1452d6b3b3009e73e26986027d6a5a9efebc
2018-11-28 14:24:03 -08:00
TreeHugger Robot
6f4e271922 Merge "Add displayId for WMS override pending transition APIs." 2018-11-28 12:02:33 +00:00
Charles Chen
ea6e7f0401 Support hasNavigationBar per display(1/2)
This change is to support Auto case.
Auto may need to support displays without navigation bar by default,
because the display may be far away from driver.
Note: currently, hasNavigationBar is global since it's from config.
  In future patches, it will also check hasSystemDecorations() on
  secondary display.
TODO: We may find a way to make OEMs set hasNavigationBar() for each
  display.

Fixes: 119584629
Test: atest WmTests
Test: atest InputMethodManagerServiceTests
Test: atest SystemUiTests
Change-Id: I427f8ad1f3da644a2bf79ee5b777830378515348
2018-11-28 15:22:44 +08:00
lumark
a483f31ce8 Add displayId for WMS override pending transition APIs.
1) For sysui or launcher used APIs to support multi-display:
- overridePendingAppTransitionMultiThumbFuture
- overridePendingAppTransitionRemote

2) Modify WindowAnimator pending layout change debug log for all displays.

Bug: 119530958

Test: atest ActivityManagerMultiDisplayTests
Test: atest SystemUITests
Change-Id: I46a118a21b4df42c0d1767b77d838956a53262d3
2018-11-27 20:36:08 +08:00
Tiger Huang
7c610aaab3 Let System UI show on external displays (1/3)
Let each display have one status bar and one navigation bar. This is
so on each display, status bar and navigation bar can be laid out with
apps and produce proper insets.

Bug: 117474929
Test: atest com.android.server.wm
Test: Watch YouTube video in fullscreen mode, and see if status bar
      and navigation will be hidden as expected. Swipe on the edge
      of screen and see if status bar and navigation bar are both
      shown as expected.

Change-Id: I1550659b7cd1dd1676bf04483c5b68376ef42905
2018-11-22 17:58:06 +08:00
Evan Rosky
29206621ae Merge "Add sys-apis for dev-mode freeform support" 2018-11-21 19:34:16 +00:00
Evan Rosky
575c68c192 Add sys-apis for dev-mode freeform support
Provides a system api to check if freeform is enabled and
a way to specify options that launch into freeform.

Bug: None
Test: manual test with companion CL
Change-Id: I293db1828e0b0ad884c2f2982006c5fc2c3e053c
2018-11-20 17:44:13 -08:00
Winson Chung
f5378f77cb Updating shared lib ref to new class.
Bug: 119498574
Test: It builds
Change-Id: I78c68ddc5f1e1d03bcd8b0831a60a3678be88275
2018-11-14 10:34:30 -08:00