Commit Graph

130 Commits

Author SHA1 Message Date
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
Beverly
925cde8f74 Alarms and Media visibly muted in PriorityOnly dnd
- if alarms and/or media cannot pass dnd and the phone is currently
in priority only dnd, then the alarm and/or media volume stream
will appear muted in the volume dialog and sound settings
(Settings > Sound)
- if all behavior for priority only dnd is not allowed to bypass dnd
(discluding alarms and media), then ringer is muted when priority-only
dnd mode is on. If a user clicks this ringer in the volume dialog, then
dnd ends
- Updated default zen config to version 3 (added alarms and media)
Test: manually toggle alarms + media in Settings > Sound > DND >
Behavior, toggle on/off dnd and then look at volume dialog and
volume bars in Settings > Sound
Test: runtest --path cts/tests/tests/media/src/android/media/cts/AudioManagerTest.java
Fixes: 72052742

Change-Id: Ia9e809ec2be93cb5a9ba6518dce04bf3ce45110b
2018-01-26 18:39:06 +00:00
TreeHugger Robot
1d92689eee Merge "Add QS scrolling support" 2018-01-25 16:50:16 +00:00
Julia Reynolds
6692b47d37 Display the current connected audio device
If connected via bluetooth.

Also fix long press behavior on the ringer footer, and
change the output chooser icon.

Test: manual
Bug: 63096355
Change-Id: I2c4d86fb03f8ac38721b6fc580bba45871d59f5d
2018-01-24 16:59:10 -05:00
Jason Monk
231b052d1f Add QS scrolling support
The brightness slider and tile layout are now a scrollview and
can handle nested scrolling between the views. There is some
black magic which manages the touches to allow a scroll up to
continue into a collapse gesture.

TODO: need to add edge effect colors to theme

Test: visual
Bug: 70799330
Change-Id: Ief0c1480f001cae62175c8ac4f3784daaa0ed2b8
2018-01-24 11:30:00 -05:00
Jason Monk
c17b7d9143 Add support for secondary text in QS
Test: visual
Bug: 70799372
Change-Id: I64b1d050807e69f1755604e0baff94b89c9aeb2b
2018-01-16 22:11:25 +00:00
Matthew Ng
a8f2426df6 Beginning implementation of quickscrub (1/3)
When enabled via launcher, the home button is able to be be pulled to
the right side to send events to launcher via binder calls of when the
quick scrub operation starts, ends and progress changes between each
interval. Launcher will use this information to determine how the
recents apps are laid out with vibration feedback.

When the home button is pulled and released under 150ms, quick switch
will occur. A binder call will tell launcher to switch to the previous
app used.

While quick scrub or switch is active, launcher will not get any nav
bar motion events, only events for quick scrub and switch.

Bug: 67957962
Bug: 70180755
Test: enable new experience via launcher settings
Change-Id: I344f5d67f259ff454205ea4d2e95140f783d3b5c
2018-01-12 12:24:03 -08:00
Evan Laird
daad3da642 Merge "Fix incorrect colors for CustomTile in QS" into oc-mr1-dev am: 859f8c4a21
am: e5d55d52b6

Change-Id: I7ab8bd9a58a7582286e73f1888b81d4a745eac24
2017-10-18 15:13:54 +00:00
Evan Laird
b3daf2b88c Fix incorrect colors for CustomTile in QS
Add support for Supplier<Icon> in QSTile.State, allowing a method for
CustomTile not to cache the drawable for its IconViews. This fixes the
problem that the ImageViews in QQS and QS were trying to use the same
drawable and putting it in a bad state.

Test: Add 3rd party tile to first position in QS and turn on/off; visual
Change-Id: I408d6391a718fcb3f847e72bd303551d2d004dbb
Fixes: 67356768
2017-10-17 16:00:29 -04:00
Charles He
9851a8da99 StatusBar: add DISABLE2_GLOBAL_ACTIONS.
We add a new StatusBarManager flag to disable the global actions dialog
(a.k.a. the power button menu), which is required in certain kiosk mode
scenarios.

Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
      DevicePolicyManagerService

Change-Id: Ib7da2f4837281e98e558afcc30be8bae6f2e179a
2017-10-10 21:04:42 +01:00
Jason Monk
d2aa1351c9 Roll back nav bar interface to version 2
Partial revert of If27641aedcd05ebc834c9dc0b38d18cd20ddae03

Test: make
Change-Id: I47de1ca026028e16e6c4075e6be5b18a9746962c
Fixes: 65055647
2017-08-25 16:00:01 -04:00
Daniel Sandler
d33fe05c66 Merge changes from topic "revert-injectors" into oc-mr1-dev
* changes:
  Revert "Add API to allow apps more control over instantiation"
  Revert "Add plugin to swap out recents"
2017-08-17 14:32:40 +00:00
Dan Sandler
f6e33b1b33 Revert "Add plugin to swap out recents"
This reverts commit 0ea67d82e3.

Bug: 64345190
Change-Id: I353c064db7bfaf91e98b5fd0d3e7180381a1b2b8
Test: n/a
2017-08-15 16:45:07 -04:00
Annie Chin
98cdafb191 Remove ButtonInterface.setCarMode()
Bug: 63444779
Test: Android Auto still functions
Change-Id: If27641aedcd05ebc834c9dc0b38d18cd20ddae03
2017-08-15 11:32:08 -07:00
Jason Monk
0b99402f87 resolve merge conflicts of de0c539dd4 to oc-mr1-dev
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I3f5eb2a0481fb09b98c0c522c82c233350c06375
2017-08-08 16:27:14 -04:00
Jason Monk
b4302182bc Move shutdown UI to sysui (when possible)
Test: click restart or power off in global actions
Change-Id: I0dc30a9772bbfb3cd3c3568f157e854fef87bf87
Fixes: 63576195
Fixes: 64125291
2017-08-08 09:13:51 -04:00
Anthony Chen
54daefe3aa Use custom QS fragment for auto use-case.
Use a custom QS fragment if the UI mode is car. This fragment disables
the quick settings row and expansion. Remove the config options that
used to have disabled this in the phone QSFragment.

To accomplish this, introduce a new QSFooter interface. The old
QSFooter.java now implements this.

Test: boot on phone and Android Auto headunit
Bug: 33210494
Change-Id: I5accc2d27d6725380ca5e271d332a03991c9419b
2017-06-28 14:32:28 -07:00
Jason Monk
0ea67d82e3 Add plugin to swap out recents
Adds new mechanism for activities in sysui to be replaced by plugins
and allows that to happen for recents.

Test: runtest systemui
Change-Id: I8b570ce7c57484c58a52afe5e247d24ebfa0c57f
2017-06-27 20:41:45 +00:00
TreeHugger Robot
51278d6a27 Merge "Add customs accessibility actions to snooze, allow it to be focused" into oc-dr1-dev 2017-06-21 18:31:35 +00:00
TreeHugger Robot
644f8e8583 Merge "Add plugin hooks to DozeService" into oc-dr1-dev 2017-06-13 23:51:13 +00:00
Mady Mellor
f33a097232 Add plugin hooks to DozeService
- Find out when the dreaming starts / stops
- Request the doze UI to show / hide

Bug: 62534409
Test: manual, have no plugin, check that doze still works as expected (i.e.
      pick up gesture shows it, noti shows it)
Change-Id: I11618e47e0bab18423f0d89c8daf285d8c14d238
2017-06-13 10:28:40 -07:00