Commit Graph

150 Commits

Author SHA1 Message Date
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
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
Amin Shaikh
299c45c85d Never clear QS tile state.
QSTile#clearState puts QS tiles in an invalid state that may not be
immediately rectified through QSTile#refreshState. In the case of
configuration changes, if a subclass implementation of
QSTile#handleSetListening does not trigger a refresh state, the
invalid state causes incorrect click handling.

Change-Id: I17eba133cf08c45a768e9e0ed8fda623e85b4370
Fixes: 69738120
Fixes: 110480955
Test: manual
2018-08-16 12:08:36 -04:00
Kunhung Li
1b35253f58 Add clock plugin interface
More flexible to test any clock plugin in the future

Bug: 111971817
Test: manual test
Change-Id: I45fa2d1ca99446abdb315cc28b58956d8e409283
2018-08-08 18:23:35 +08:00
Mady Mellor
b3a6aed980 Add 'Snooze' to local context menu for notifications
Bug: 34840333
Test: manual - 1. turn talkback on
               2. have a notification focused
               3. invoke local context menu, note that 'snooze' is an option
               4. select snooze, note that notification is snoozed

Change-Id: Id3ea62a0a9e5c2b8893aa5b548e64bb2b341d7a2
2018-05-14 12:52:22 -07:00
Amin Shaikh
4c9048c364 Ensure QS tile secondary text marquees.
Update the logic to marquee only the currently selected page.

Change-Id: Idc2398e1c67c614414ae4298c43a1609431c62fa
Fixes: 78159844
Test: visual
2018-04-20 11:33:20 -04:00
TreeHugger Robot
b17c2388a5 Merge "Control the QS label marquees." into pi-dev 2018-03-30 21:13:04 +00:00
Julia Reynolds
ac55e01e1c Volume UI updates
- Reorder streams
- constrain ripples
- Show an introductory ripple on the ringer toggle
- Add sound/vibration feedback for the ringer toggle
- resize some elements

Test: manual
Bug: 76438403
Fixes: 73892482
Change-Id: I92dd6f5681f1822ae493a5a2b218b15970293e80
2018-03-29 16:42:28 -04:00
Amin Shaikh
0f8ea543c1 Control the QS label marquees.
- Start the marquee when fully expanded and pause when collapsed.
- Also do not change qs label to multiline once it's already been resized
to single line.

Change-Id: I2dd4f6b5473a6a5147999c29441537227751b705
Fixes: 74757991
Test: visual
2018-03-27 15:10:30 -04:00
Matthew Ng
2ea93b708d Revert "Revert "Centralized quick step/scrub/switch logic (1/2)""
This reverts commit 0e490d9208.

Reason for revert: Will be merged with fix
Bug: 74726495
Test: manual

Change-Id: I36ea9c2702107b23eff4adb1f3ba9fdc1be12999
2018-03-14 13:51:26 -07:00
Winson Chung
0e490d9208 Revert "Centralized quick step/scrub/switch logic (1/2)"
This reverts commit b06ae3bf13.

Reason for revert: b/74726495
Bug: 74726495

Change-Id: I4bce8df13f9fa9e1b420382f7a96f9855510196f
2018-03-14 19:41:16 +00:00
Matthew Ng
b06ae3bf13 Centralized quick step/scrub/switch logic (1/2)
Moved all the logic for quick step/scrub/switch to QuickStepController
so touch events can be used for deciding which gesture is used. Once a
gesture is decided, the rest will not handle the other gestures.

Quickstep will trigger when passing a touch slop on navigation bar. The
event onQuickStep (with a motion event) will be sent to launcher when
this occurs telling it that systemui is not handling anymore motion
events. During quickstep motion events will still be proxied.

Used raw X and Y motion events for Opalayout and KeyButtonView so that
the moving over the touch slop can be detected to ignore button (long)
press state.

Fixes: 73971902
Fixes: 74456391
Test: swipe up
Change-Id: I40b931aa0a9f123b810ff9206c9b1ce040a68a56
2018-03-13 17:21:22 -07:00
Julia Reynolds
b586745d86 Show app ops guts when tap app ops icons
Test: runtest systemui
Bug: 64085448
Change-Id: Ia51044f77311ab705ffb9dd1ae204d0131316396
2018-03-08 01:45:09 +00:00
TreeHugger Robot
5a169cf2f6 Merge "System sounds get its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
Anton Hansson
d137c872cd frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
2018-03-07 11:42:04 +00:00
Beverly
d696476fb3 System sounds get its own dnd toggle
- Added logic for streams to be muted by dnd (unassociated with ringer)

Test: runtest -x frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Bug: 73362490
Change-Id: I1101e67282f7331497e91eb510d2bf4f1ea6b4b1
2018-03-06 09:08:29 -05:00
Jason Monk
ba055f8f9d Import some plugin documentation into the tree
In the spirit of writing things down

Test: none
Change-Id: I93371eab99721ace1fd32d07739b861d492e4be6
2018-02-23 14:52:37 -05:00
Julia Reynolds
ee57193bb6 New small volume dialog
- Remove labels
- Remove output chooser dialog
- Reorder icons
- Add settings affordance
- Add instructive toast

Test: manual
Change-Id: I6640fb8147707936fe22e3c756ab29116973fbe3
Fixes: 73719758
Fixes: 73333233
Fixes: 71663761
2018-02-22 10:10:42 -05:00
Rohan Shah
a840199853 [QS] Fix irritating animation for QS
We're animating 2x the icons and, due to the transparent grey
background color, it looked like the icons were getting darker.

Fixed by having it exclude the full icon frame while animating.

Test: Visually
Bug: 72173914
Change-Id: Ie36973ab44a86e6e1edd99b9266420a274d9aaa2
2018-01-29 12:20:31 -08:00