Commit Graph

247 Commits

Author SHA1 Message Date
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
TreeHugger Robot
6d79c13f62 Merge "Don't manage whitelisted plugins" 2018-11-03 06:49:01 +00:00
Jason Monk
da08f5462e Don't manage whitelisted plugins
Add sysui to the plugin whitelist and don't manage whitelisted plugins.
This will prevent sysui getting all its components disabled when it
crashes if we have a plugin compiled into the APK, which we now support.

Bug: 118403466
Test: added test
Change-Id: I1f65ae44db686e718e23bf1d9f4c06d0ba16056a
2018-11-02 13:21:44 -04:00
Hyunyoung Song
9d873ed912 Make StatsLog hidden method available to launcher
Bug: 113043444
Test: builds and verified that the jar exposes all the necessary
hidden API to Launcher

Change-Id: I71e245211ca2a2295c7d0b4b0c53c9fc8bcfebed
2018-10-31 15:37:18 -07:00
Winson Chung
6cdb69c04f Merge "Moving SysUI with legacy Recents to another build target" 2018-10-26 22:55:17 +00:00
Winson Chung
2dbcf0973b Moving SysUI with legacy Recents to another build target
- Move all legacy recents code out of the core sysui code
- Add separate target for products which still depend on it
- Move overview proxy implementation into another implementation of the
  recents interface

Test: atest SystemUITests
Test: Push SystemUiWithLegacyRecents to the system image
      adb shell pm disable com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
      and ensure that the old recents implementation still works (and split
      screen)

Change-Id: Iad67218ec37c13c79b6393d87f6bdc4f3996e2c6
Signed-off-by: Winson Chung <winsonc@google.com>
2018-10-26 10:15:50 -07:00
Lucas Dupin
559ec61bb1 Only show plugin toasts on eng builds
Test: adb shell am crash com.android.systemui # look at logs/toast
Change-Id: I9dc894fc91c0cf1c50661208594d98db4c6dfd58
Fixes: 117583358
2018-10-24 13:52:37 -07:00
John Reck
8884cfc13e Merge "Rename & package shuffle" 2018-10-23 20:02:00 +00:00
Winson Chung
4275303c1a Deprecating some old Recents logic
Bug: 117603579
Test: Everything still builds

Change-Id: I24cc5d77481ad9c76c2889b285b58aae3623ce9e
2018-10-23 11:28:50 -07:00
Yohei Yukawa
5281b6b4c0 Add Context.getDisplayId() to avoid possible IPC
ContextImpl has an internal rule that when ContextImpl#mDisplay is
null the Context is associated with the default display.  The problem
is that, as discussed in Bug 117709581, when ContextImpl#mDisplay is
null ContextImpl#getDisplay() tries to get some non-null Display
object by making an IPC to the system server, which is redundant when
the display ID is the only thing that the caller wants to know.

By having an @hide method Context.getDisplayId(), we can ensure that
display ID can be obtained without any IPC.  This enables us to
re-submit my CL [1] that aimed to instantiate InputMethodManager (IMM)
for each display but then got reverted due to a performance regression
(Bug 117434607).

There should be no developer-observable behavior change.

 [1]: I7242e765426353672823fcc8277f20ac361930d7
      c53d78e992

Fix: 117712745
Test: atest FrameworksCoreTests:android.content.ContextTest
Test: prebuilts/checkstyle/checkstyle.py -f \
      frameworks/base/core/tests/coretests/src/android/content/ContextTest.java
Change-Id: I2534530a5ce90e2620c5039d793a6454a0a1e154
2018-10-15 07:38:25 +08:00
Tony Wickham
0406f853ae Add callback to handle wtf logs
TerribleFailureHandler is hidden API, so we abstract it out so only
sysui uses it.

Test: compiles

Bug: 115877296
Change-Id: Iec9ca5c22beffcd9a86edde8eb5bdba06ae6aea5
2018-10-09 17:02:17 -07:00
Tony Wickham
b4593f977b Move code to plugin core lib
This contains the core interfaces for plugin support, e.g. Plugin.java
and the associated annotations. It is reused by the shared library and
plugin interfaces in both sysui and launcher are built off of it.

Test: atest com.android.systemui.shared.plugins
Test: cd $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/plugin_core \
    && mma -j32 && cd -
out/target/product/$TARGET_PRODUCT/obj/JAVA_LIBRARIES/PluginCoreLib_intermediates/javalib.jar
contains the created jar and is useable in launcher

Bug: 115877296
Change-Id: I82ca7398e882d6432333238e2f77a12e776f1d76
2018-10-05 14:36:34 -07:00
Tony Wickham
32c554373d Refactor code to PluginEnabler
SystemUI uses PackageManager to enable/disable plugin components.
Launcher cannot do this, so we abstract this logic into an interface;
Launcher will have a different implementation.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ie6f11572026dafa369c99722d63d4daa0ea44fb5
2018-10-05 14:32:04 -07:00
John Reck
32f140aa67 Rename & package shuffle
Rename DisplayListCanvas -> RecordingCanvas
Move RecordingCanvas to android.graphics
Move RenderNode to android.graphics

Bug: 112709971
Test: make & boot
Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
2018-10-04 16:18:12 -07:00
Neil Fuller
2fe74e7f47 Merge "Merge "Remove unused / invalid import" am: 9073dc4839 am: a447164ae5" into pi-dev-plus-aosp
am: 01731e5eaa

Change-Id: Ib31823cf7a2c24a36f3da7d93fab127d89d3cdb8
2018-10-02 18:03:35 -07:00
Neil Fuller
a447164ae5 Merge "Remove unused / invalid import"
am: 9073dc4839

Change-Id: Icd39d49c9fae7c11837434fdcbe5603310034ad3
2018-10-02 15:28:39 -07:00
Tony Wickham
7362abd073 Merge "Move plugin support to shared lib" 2018-10-01 18:18:01 +00:00
Neil Fuller
4ff327141d Remove unused / invalid import
NavigationBarCompat imports sun.misc.Resource though
it doesn't need it.

Bug: 113148576
Test: build only
Change-Id: I26d6e0b3d9a8948333fdf9f3659b87b3b46a75d5
2018-10-01 11:32:36 +01:00
TreeHugger Robot
4a1b3e251e Merge "Only abort activity options when failing to bring a task to front" 2018-09-28 18:30:56 +00:00
Tony Wickham
023cb195be Move plugin support to shared lib
In addition to changing imports, this required some changes to use java
7, since that's what the shared lib needs to be for launcher.

See bug for more details on this project.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ib79ede0a61664df0ba1a194632a345d2229777fc
2018-09-28 10:04:09 -07:00
Winson Chung
67f5c8b2d0 Removing dependencies on recents-specific code in SysUI
- Removing references to SystemServicesProxy (to be removed) for
  AM/WMWrapper
- Removing unused code for old nav bar swiping logic, and also unused
  and quickstep-incompatible code for dragging in recents
- Removing all event bus logic from outside recents subpackage
- Exposing PipUI component for bridge caller

Bug: 114137554
Test: Can still swipe up
Change-Id: Ibcfbe06acae06ea5950615cabd52243279fee16d
2018-09-26 14:14:08 -07:00
Winson Chung
d024368b7e Only abort activity options when failing to bring a task to front
- If the activity options has a start callback, abort will prematurely
  call the callback prior to the app actually being good to go (and starting
  the app transition)
- Also exposing custom activity options call with callback to Launcher

Bug: 111896388
Test: Make change with launcher to defer hiding the task view until the
      transition-start callback, check that swiping down does not flicker

Change-Id: Ie19a38ed81b62057957b3ebfc119d5348468818b
2018-09-26 11:43:31 -07:00
John Reck
26caa0f509 Use public APIs instead of private ones
Test: builds
Change-Id: I4a8f289a1ac2ee6819bde5cd7c8edb98184c3c27
2018-09-24 15:45:10 -07:00
Charles Chen
3b37d4d803 Merge "Fix WM input limitations on secondary displays (3/4)" 2018-09-06 11:26:44 +00:00
Jason Monk
2c3a8045cd Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f26)
(cherry picked from commit 1a8ee9d2f9)
(cherry picked from commit 83ce30d807)
2018-09-05 13:57:10 -07:00
Jason Monk
83ce30d807 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f26)
(cherry picked from commit 1a8ee9d2f9)
2018-09-05 12:50:09 -07:00
Hyunyoung Song
6d9db37d18 Remove unused SysUISharedLib
Test: it builds!
Bug: 113128349

For Launcher3 to build from the library directly, the build rule cannot
be an app. This is the very first CL out of 2~3 that will follow.

Change-Id: I7a1aa2d33e1ccf64d91a65db58e69446e77a4044
2018-08-31 13:48:25 -07:00
Arthur Hung
39134b21d8 Fix WM input limitations on secondary displays (3/4)
One DisplayContent contains one InputMonitor now.
- Change setInputWindow of InputManagerService updated by displayId,
  so Window Handles in InputDispather can be updated by each DisplayContent.
- Only exist one focus in current state, reset it if in removed DisplayContent,
  will be updated by default display or focused display.
- Add displayId parameter for createInputConsumer and destroyInputConsumer,
  so InputConsumer from PIP, RecentApp and Wallpaper can be supported in multi-display.

Bug: 111363643
Test: atest WindowManagerSmokeTest ActivityManagerMultiDisplayTests
Test: atest com.android.server.wm.DisplayContentTests
Test: atest libinput_tests inputflinger_tests
Change-Id: I999c355be1789af5759f00206475d004e10116e3
2018-08-30 09:59:09 +00:00
Vishnu Nair
aeab1b8251 SF: Remove setFinalCrop impl 1/2
setFinalCrop functionality is reimplemented by creating a new bounds layer
and applying a crop on this layer. see ag/4625718

Test: go/wm-smoke

Change-Id: I3ffb6dc2e2afd5170f6c6dee9e928ed0600656b1
2018-08-29 08:37:38 -07:00
Hyunyoung Song
c1647ead13 Swipe down on Pixel Launcher expands Notification Shade
Bug: 111839343
Test: make -j31 && vendor/google/tools/flashall

-Tested for single touch swipe
-Tested with heads up noti
-Tested for single touch T1, second touch T2
T1 DOWN, T2 DOWN, T2 UP, T1 UP
T1 DOWN, T2 DOWN, T1 UP, T2 UP

Change-Id: I4b392ced07f6a9bece4bfc0a8be46de9b5088f82
2018-08-27 12:49:01 -07:00
Sunny Goyal
056b80da9c Removing some unsed compat APIs
Test: manually tested on device
Change-Id: I7f8832850d5020517b2a4566d823f11ec1a4b436
2018-08-22 21:45:45 +00:00
Sunny Goyal
bba378e87c Restricting the shared lib to java 7
Bug: 112849320
Test: Verified launcher works fine with the new jar
Change-Id: Ibfbc4e53f879894ada134c227e212e3e23c49ea6
2018-08-22 13:03:57 -07:00
Jason Monk
a2f2d82f26 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
2018-08-16 19:40:39 -04:00
Winson Chung
6b0f1a3d77 Expose DockedStackListener for logging purposes in Launcher
Bug: 111077107
Test: Implement listener in Launcher and verify the callbacks are made

Change-Id: I4017c8e139242c2b0875f8222c99396d55b1be04
Signed-off-by: Winson Chung <winsonc@google.com>
2018-08-03 15:19:36 -07:00
Winson Chung
e4c7d37e03 Merge "Expose method to clear all visible recent tasks" 2018-08-02 21:08:56 +00:00