Commit Graph

168 Commits

Author SHA1 Message Date
TreeHugger Robot
512dbfbbb4 Merge "Add ability to center a notification icon" into qt-dev 2019-04-18 06:53:48 +00:00
Robert Snoeberger
699568050d Add smart space to custom clock faces.
This changes adds a hook to the ClockPlugin to allow the
custom clock to control the position of the smart space.

Still todo:
 - move out of the way for the lock icon
 - don't slide smart space down on lock screen when no
   notifs are showing

Bug: 129348218
Test: Manually checked custom clock faces.
Change-Id: I2472f6b2bb54f94e2e673f01c78170c0e7f87627
2019-04-17 09:44:54 -04:00
Beverly
4077065daa Add ability to center a notification icon
Test: manual, atest CollapsedStatusBarFragmentTest
Test: atest HeadsUpAppearanceControllerTest
Bug: 124937207
Change-Id: Ie6b44fad2490ddede53116ebc1293876165695f8
2019-04-16 16:26:50 -04:00
Lucas Dupin
691169c8fe Merge "Improve dump format" into qt-dev 2019-04-11 01:28:15 +00:00
Lucas Dupin
dc13fe4bef Improve dump format
Test: adb shell dumpsys activity service com.android.systemui
Bug: 130204212
Change-Id: I75a74a46a2bd5e63a0f13a877741cc1ab806d6d0
2019-04-10 16:09:23 -07:00
shawnlin
2e7d4e4f3c Fixed jarring touch ripple effect when turning on/off battery saver from quick settings
Suppress the ripple effect on battery saver tile.

Fixes: 122374545
Test: atest SystemUIGoogleTests
Change-Id: If7c166dd212b4eca7b85a58096058f7ff4884d02
2019-04-09 15:00:54 +08:00
Evan Laird
e55c60104a Expose notification guts on menu shown
This change adds a few methods to NotificationMenuRowPlugin so that a
menu row can tell the stack scroller to expose the notification guts
when the menu is fully exposed.

TODO: fix the menu close animation so it happens after the guts open,
and if you close the guts by swiping you can trigger a flicker.

Also there are some things to make lint happy and lots of null checks.

Bug: 127998765
Test: swipe RTL on any notification
Change-Id: I46f7c7dc90032a1914f7b5513bc57e089887c722
(cherry picked from commit 9272fd2f57)
2019-04-04 18:04:44 +00:00
Robert Snoeberger
3358cfbe5c Add onDestroyView to allow clock plugins to clean up resources.
Fixes: 129859743
Test: New test point added to KeyguardClockSwitchTest
Change-Id: Ia0eb7cb329820a64a4783937f65135fda742a2d1
2019-04-03 17:29:16 +00:00
Robert Snoeberger
2ba20603af Add method to ClockPlugin to get preview image.
Bug: 125370285
Test: Checked that preview images still appear in picker app.
Test: Added ViewPreviewerTest
Change-Id: I819d58f621be7b0c4f5e3d0e56d7cb2604c8c770
2019-03-29 15:47:08 -04:00
Anthony Tripaldi
2c430871e4 Add a new Secure Setting check for current opted-out state of captions.
Bug:129066127
Test: manual
Change-Id: I511f5fdb140480ca49e340386d11510f69a5ef31
2019-03-22 11:32:46 -04:00
Anthony Tripaldi
ea0236d0ec Add tool tip view for first run of volume dialog to notify users of odi
captions functionality.

Bug:128970574
Change-Id: I4710fd1d84f4116e003c14720a2ce55c5b3ff899
Test: manual
2019-03-21 10:25:11 -04:00
TreeHugger Robot
18c3f0c4a8 Merge changes Ica566fec,Ib2e8e756
* changes:
  Invoke GlobalActions Plugin#onDismissed() from #dismissImmediately()
  Dismiss keyguard from GlobalActionsPanelPlugin
2019-03-15 01:35:01 +00:00
Steve Elliott
4c86885aa1 Dismiss keyguard from GlobalActionsPanelPlugin
This allows for the GlobalActionsPanelPlugin impl to fire
PendingIntents from the lockscreen, prompting the user to unlock
first.

Test: manual
Change-Id: Ib2e8e756db03e6aace815f1097a32905c06a0a57
2019-03-14 17:05:43 -04:00
Nadav Bar
21f2ecfaaa Merge "Adding the on-device captions service toggle into the volume rocker." 2019-03-13 04:54:28 +00:00
Anthony Tripaldi
a404da31ef Adding the on-device captions service toggle into the volume rocker.
Change-Id: Iec78b07a7df0c22f7f505cab7910315b7ea07d6b
Bug: 126956988
Test: manually
2019-03-11 16:55:28 -04:00
Salvador Martinez
1c2c337781 Remove UI restriction on hotspot & airplane mode being on together
This just makes it so that the hotspot tile doesn't care about
airplane mode. Apparently the airplane mode tile already didn't
check anything for hotspot.

Test: Manual
Bug: 111681176
Change-Id: I786077ad5e817ed9ee6753fa1be220e846c77e16
2019-03-08 16:14:52 -08:00
Steve Elliott
9b87a44b79 "Global Actions Panel" plugin
This change adds a new plugin API surface inside of Global Actions,
where a plugin can provide a View to be rendered alongside the Global
Actions menu.

When the GlobalActionsDialog.ActionDialog is created, the plugin can
produce a GlobalActionsPanelPlugin.PanelViewController instance, which
is used to provide the View to be rendered, and respond to Global
Actions events (right now, only dismissal). At this time, the plugin
is given an instance of GlobalActionsPanelPlugin.Callbacks, allowing
the plugin to interact with the GlobalActionsDialog (right now, only
to request dismissal).

When there is a Panel present, a darker scrim is used that is *not*
based on the colors underneath.

In order to provide maximum flexibility, the View comprising the Panel
is rendered above (z-ordering) the existing Global Actions menu, and
can take up the entire screen if desired. In practice, plugins should
take care to not block access to the GlobalActions menu.

Change-Id: I9d6eea80f7eb49e9adbc1a634f7d9c1ab720cddb
Test: manual
2019-03-06 11:30:58 -05:00
Robert Snoeberger
9ad03f4ed0 Show installed clock plugins in picker app.
Added methods to ClockPlugin to provide information to picker app.
Due to this change, I bumped the api number of the ClockPlugin
interface.

Bug: 125370285
Test: atest ClockManagerTest
Test: checked clock from plugin apk appears in picker app
Change-Id: I0dc3d5a450f7d352900b077b28c670ebadb874e7
2019-02-28 15:12:00 -05:00
Lucas Dupin
de86b3754b Merge "Apply colors extracted from wallpaper to clock faces." 2019-02-10 18:12:46 +00:00
Robert Snoeberger
0397c843a3 Apply colors extracted from wallpaper to clock faces.
Bug: 122301289
Test: Looked at clock faces with various wallpapers.
Change-Id: I5c0bda2fa1f3da783315a10e1c2f8047d63e1e6d
2019-02-07 15:12:00 -05:00
Beverly
8fdb533e08 Make StatusBarStateController available to plugins
Test: atest SystemUITests
Bug: 115322193
Change-Id: I46e4b23c9839720a3eb10e381d7aaf79a74c6b33
2019-02-07 14:44:54 -05:00
linanson
2bcd403526 SeamlessMedia button as one of media action button
- Implement the mechanism for Seamless button in the group of media action button.
- Have a fake Seamless icon in the right of media action button group.
- Need to bind with MediaOutputSlice that are implementing.

Bug: 118428931
Test: Build pass
Change-Id: Idc51d416cc1fc85babdc83d138c8558db5ed5d8e
2019-01-31 14:20:49 +08:00
Gus Prevas
a18dc57f6f Adds setting for direction of dismiss gesture.
Bug: 122314709
Test: atest SystemUITests, manual
Change-Id: I829c4148b6d5afc7b106d706d677c6105ec0f078
2019-01-24 14:04:49 -05:00
TreeHugger Robot
853fbd373e Merge "Run pending-intent-sent callback on UI thread." 2019-01-04 12:57:42 +00:00
Beverly
1be62f46ab Make DarkIconDispatcher visible to plugins
Test: manual
Bug: 115322193
Change-Id: I6204d771e476c504e9070ebc88dd8fd44b268635
2019-01-02 16:13:34 -05:00
Robert Snoeberger
6a0140ab95 Add container for big clock behind NSSL and KeyguardStatusView.
Bug: 120497585
Test: Added tests to KeyguardClockSwitchTest, pass locally.
Change-Id: Icc1199a67b9a4728e4d0f0b50ea98f5221de904d
2018-12-20 13:20:39 -05:00
TreeHugger Robot
732c6ca594 Merge "Add option for plugins to hide KeyguardSliceView." 2018-12-18 18:40:23 +00:00
Robert Snoeberger
e3b3e783b1 Add option for plugins to hide KeyguardSliceView.
Option defaults to showing the slice view so that it doesn't break
existing plugins.

Test: SystemUIGoogleTests pass.
Test: SystemUITests pass.
Test: slice view is hidden when using example plugin.
Bug: 118496011
Change-Id: I574009170da4703e84fd392e327e1cb84ada6cd0
2018-12-18 10:38:23 -05:00
Lucas Dupin
1ae6cf9118 Initial sleep-lock-screen implementation
We're now listening for sleep events and forcing the device into
sleep mode when necessary.

Display state is now cached and handled properly for cases where
the device wakes up and should go back to sleep.

Test: atest LockScreenWakeUpControllerTest
Test: manual
Bug: 111414690
Bug: 111405682
Fixes: 120864496
Change-Id: I3096329e8f6a07a686582d35c4b0e9977bf9ab1b
2018-12-17 09:46:50 -08:00
Gustav Sennton
32137e4474 Run pending-intent-sent callback on UI thread.
Before this CL the callback passed to
StatusBar.startPendingIntentDismissingKeyguard() was being run on a
background thread otherwise used to run the pending intent. This is not
obvious to the caller of startPendingIntentDismissingKeyguard(), so with
this CL we call the callback to the UI thread and make it clear that's
the case.

Bug: 120894295
Test: atest SystemUITests
Test: manual - ensure HUN is removed when pressing HUN smart action.
Change-Id: If106b697527843dd74e37d14de882d5f08187285
2018-12-17 14:26:49 +00:00
Robert Snoeberger
9c1074fbaa Send time zone changed event to clock plugin.
This prevents plugins from needing to register for time zone
changed broadcasts. The event can be relayed from
KeyguardUpdateMonitor.

Bug: 120666411
Test: example plugin updates when time zone is changed
Change-Id: I84732887527db8575504af27cc8ed537118696c6
2018-12-10 09:33:38 -05:00
Tony Mak
7d4b3a5f19 Add onActionClicked in NotificationAssistantService
This is added to report clicks on actions buttons to NAS.

BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
      observed the log.

Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
2018-11-29 11:43:53 +00:00
Lucas Dupin
b2d9f48fe1 Wake-up sensors integration
Bug: 111414690
Bug: 111405682
Test: manual
Change-Id: I9db42b3e5f1964ebe1e52066b1eecf0754e6e3b7
2018-11-16 19:02:33 -08:00
TreeHugger Robot
b4c2dc0c1f Merge "Refactor QuickStepController into Gestures" 2018-11-12 19:44:42 +00:00
Robert Snoeberger
e32efd76af Add setDarkAmount method to ClockPlugin interface.
setDarmAmount implementations provided by clock plugins
should use the dark amount to transition into and out
of the doze state on AOD. For example, the size of the
clock could shrink in the Y direction when leaving doze
to make room for the notification stack scroller.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Change-Id: I9968dc2cc5ab8000ff525f3d1d06ffbf73359086
2018-11-12 09:29:59 -05:00
Robert Snoeberger
ffbe315d43 Add dozeTimeTick method to ClockPlugin interface.
dozeTimeTick implementations provided by clock plugins
should update the time of the clock while the device
is dozing and deal with burn-in related issues.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Test: Custom clock updates with time on AOD screen.
Change-Id: I5c31e6d856c5a80dc3e501831dda5a62c0be5ba0
2018-11-09 14:21:11 +00:00
Matthew Ng
86a436efb8 Refactor QuickStepController into Gestures
The refactor allows adding new gestures easier and provides a way to
reassign triggers to the gestures.

go/navbar-prototypes-doc

Test: atest QuickStepControllerTest
Bug: 112934365
Change-Id: I5334947e2ff3f39af890e1f026089b933ff48a3c
2018-11-08 12:28:13 -08:00
Dave Mankoff
21beba8bcd New "FalsingPlugin" to allow for easier data collection.
Bug: 117600098
Change-Id: I67b634f84a0e168eec269f7804c5169b130db586
Test: manual testing
2018-11-07 17:07:22 -05:00
TreeHugger Robot
b2b90207d7 Merge changes from topic "plugin"
* changes:
  Remove view from existing clock plugin when new plugin connects.
  Update script to consider code moved to plugin_core.
2018-11-01 20:51:32 +00:00
Fabian Kozynski
58d9b86667 Fixes context for tiles without longClick
QSTile can declare whether it doesn't support (has no effect) long click
and then TalkBack will not report it as an available option.

Test: manual & atest
Change-Id: Iec21181f4308c7c8c4962f191fa0787e053ae944
Fixes: 117921787
2018-10-30 12:08:04 -04:00
Robert Snoeberger
3749d81918 Update script to consider code moved to plugin_core.
Bug: 118427190
Test: Used jar from script to build plugin in Android Studio
Change-Id: Iab7ff5a97822602c7c65863b528345a04820d5e5
2018-10-29 08:54:37 -04:00
Jason Monk
297c04ee53 Make StatusBar not be a NotificationPresenter
Break the NotificationPresenter out of the StatusBar and most of
the logic with it.

 - Break RemoteInput Callbacks out of NotificationPresenter
 - Break Environment Callbacks out of NotificationPresenter
 - Add ShadeController interface for StatusBar (abstraction
   layer from StatusBar)
 - Add InitController to allow for post-init tasks (dependency
 resolution should not go here)
 - Make some dependencies (ShadeController, NotificationEntryManager,
 NotificationLockscreenUserManager usually) lazily-resolved to break
 some dependency cycles

 - Lots of other cleanup

Test: Existing tests do not pass
Change-Id: Ic043c6b15a4ffe551fc27f99b25d5c3caa1be582
2018-10-23 11:19:15 -04:00
Kevin Chyn
f7c3903cda Update SensorManagerPlugin to have vendorType
Bug: 111414690
Test: Builds
Change-Id: Ice50275160b23bcb60aca1653b570ec9b4565c4e
2018-10-11 09:59:22 -07:00
Lucas Dupin
3d95175dd5 Hook up wake-lock-screen with plugin structure
Wake-lock-screen gesture now receives signals from
the pluggable sensor pipeline.

Bug: 111414690
Test: manual
Change-Id: I9433d7310fcb9dd9b08a4fedf7d2a8e8779fe386
2018-10-10 13:08:28 -07:00
Kevin Chyn
ac56f746f0 SensorManager Plugin for trigger events
Bug: 111414690
Bug: 111479454

Test: atest AsyncSensorManagerTest

Change-Id: I141d756e9184418d494285ad1a6ce801c00581c0
2018-10-09 20:09:57 -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
Winson Chung
0d3815d98e Remove empty NavBarGestureHelper class
- Also add logging for QuickStepController state

Bug: 112783625
Bug: 114137554
Test: Can still swipe up into Overview
Test: adb shell dumpsys activity service SystemUIservice
Change-Id: I6a1203d7140e30239e032266680236d090b7682e
2018-09-28 21:20:39 +00:00
Aaron Heuckroth
266cb3485c Remove references to SwipeHelper from NotificationMenuRow.
The intent here is to move gesture processing out of NotificationMenuRow and into NotificationSwipeHelper.

Test: Automated tests should pass, and manual experimentation with dismissing/tapping/replying to notifications should work as expected.
Change-Id: Icd32f14769f1b494ecc1dedb2cc37ee129ed21f7
2018-09-20 15:54:16 -04:00
Amin Shaikh
32d786fb73 Do not animate QS state changes when not in view.
Skip QS state change animations when the target view is not fully
visible on screen.

Some tiles require extra time before the status is fully changed and
therefore will be animated later.

Change-Id: I08e76e0fdeab2b260cb7a41a117a6ff484ca3329
Fixes: 111680760
Test: visual and runtest systemui
2018-09-04 21:48:10 -04:00
TreeHugger Robot
d2d33da1f6 Merge "Convert sysui to bp" 2018-08-17 03:11:10 +00:00