Commit Graph

85 Commits

Author SHA1 Message Date
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
Mady Mellor
920fd89aef Add customs accessibility actions to snooze, allow it to be focused
- Add plumbing for accessibility action IDs, enabling custom
  accessibility options in the local context menu
- Allow snooze view to be focusable
- When option is selected announces the selection via window state change

Test: manual
Bug: 34840333
Change-Id: Idca0b0e00e792d3e3f71fc6a15b9b26d9136f6da
2017-06-12 17:16:58 -07:00
Mady Mellor
f3f6ddf7cb Merge "Updates to NotificationMenuRowPlugin so that long press may be captured" into oc-dr1-dev 2017-06-12 21:48:45 +00:00
Mady Mellor
4ab2820e6c Updates to NotificationMenuRowPlugin so that long press may be captured
This will allow the NotificationMenuRow plugin to do something else
rather than showing a menu when the view is long pressed.

- Allow menu to intercept touch events
- If the menu item provided to long press is null, don’t show it
- Also passes the status bar notification when the menu is created
  or updated

Bug: 62534409
Test: manual, have no plugin and long press -> see notification info
      have a plugin that returns null for long press -> nothing happens
Change-Id: I384c5217d5343e990f4c3506eb2477b015705e5c
2017-06-12 18:08:19 +00:00
Jason Monk
8f8b5ac031 Merge "Add notification listener plugin hook" into oc-dr1-dev 2017-06-09 16:57:49 +00:00
Jason Monk
98bf8ba30c Add notification listener plugin hook
Allows plugin control over notifications right at the entrance
to sysui and gives them the opportunity to mess with them how
they see fit.

Test: manual
Change-Id: I569bf37138da66d0524acecfa36ceb409f98fbb4
2017-06-08 19:23:11 -04:00
Jason Monk
d7dab0f36f resolve merge conflicts of a5b457b3bf to oc-dr1-dev
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2aa49bfdbd2c44684d0edb21b52520fea406e167
2017-06-08 13:00:40 -04:00
Jason Monk
01df36f37f Move QS cell indicator back into mobile data tile
Remove it from the header and drop it back in its old location.

This reverts commit 10b4c8a4ab.

Test: runtest systemui
Fixes: 62331189
Change-Id: I087589c256894e0972656619e665b6a16536ce6c
2017-06-07 15:00:23 -04:00
Mady Mellor
cbff978fb4 Merge "Check for false touches when determining if the notif menu should be shown" into oc-dev am: 70739fb812
am: 2cd3e9c500

Change-Id: I393a87e48487ec51fc563cc1cb9f50d604970dc0
2017-05-26 15:13:59 +00:00
TreeHugger Robot
70739fb812 Merge "Check for false touches when determining if the notif menu should be shown" into oc-dev 2017-05-26 14:40:27 +00:00
Jason Monk
2775a1d82d Merge "Fix up the QS gutter" into oc-dev am: 78ee090f78
am: f4968f3c98

Change-Id: I9b7d99aa2b519c8c9629dbec32d22c906f0456f7
2017-05-25 22:00:15 +00:00
Mady Mellor
bd707492a2 Check for false touches when determining if the notif menu should be shown
If it's a false touch don't show the menu.

Test: manual: try swiping things away on the lockscreen (fast + long)
     try showing notification menu on the lockscreen
Bug: 38208094

Change-Id: I16ceedd90a5fbc80156a9495d6cfd6fa02771886
2017-05-25 13:26:53 -07:00
Jason Monk
4de5d3c03d Fix up the QS gutter
- Don't show when collapsed, show divider instead
 - Don't show when no notifications
 - Animate between states while expanding/collapsing
 - Other visual cleanup

Test: visual
Change-Id: I923c963fa70d63601b6a181299b04c5fc49922bb
Fixes: 38199857
Fixes: 38483355
Fixes: 38409326
Fixes: 38417776
2017-05-25 14:22:07 -04:00
Mady Mellor
97d52db854 Merge "Fixes issue where the notification menu was not visible after RTL changes" into oc-dev 2017-05-09 23:41:28 +00:00
Jason Monk
395617fd35 Start drawing QS slashes rather than using AVDS
These need a bit more work like length control and animations, etc.
but this is a decent start.

Test: visual
Change-Id: I750d777b2b4a19f8c586066712f5a3f7e79befd6
2017-05-05 14:25:43 -04:00
Mady Mellor
d9c2232c99 Fixes issue where the notification menu was not visible after RTL changes
- Altered how the menu location is set so that it doesn't depend on RTL
  state
- Also fixes an issue where if you change from landscape to portrait or
  vice versa then the menu wouldn't be visible because the placement is
  based on the width of the notification which changes based on orientation

Test: (1) have notifications and show the menu, toggle the RTL state,
          show the menu, note that it is visible
      (2) have notifications and show the menu, rotate the device, note
          that the menu is still visible
Fixes: 36874498
Merged-In: I33b8f87e53a3393a2802842ad2196c9d089ec7fc
Merged-In: I3a3b688f2b301f5ac0446a55b668db79c323a95c
Change-Id: I3a3b688f2b301f5ac0446a55b668db79c323a95c
2017-05-05 00:15:14 +00:00
Jason Monk
767e2fe523 Merge "Fix QS visibility logs missing some info" into oc-dev am: df9b2e8d80
am: 86cc4bbac5

Change-Id: Ib765a9aa0807ddd074b3ff4b066c8f79eb2751a8
2017-05-03 19:16:35 +00:00
TreeHugger Robot
df9b2e8d80 Merge "Fix QS visibility logs missing some info" into oc-dev 2017-05-03 19:04:35 +00:00
Jason Monk
cb4b31d396 Fix QS visibility logs missing some info
Test: runtest systemui
Change-Id: I6deb71576b137dfbd51f863e88ad939d4f3fab1b
Fixes: 35454347
2017-05-03 10:37:34 -04:00
Adrian Roos
673c07f3da Merge "DozePlugin: Remove" into oc-dev am: b2484f2258
am: 825b574892

Change-Id: I5994fbdd9cc15c1dc42fbecd63792eb2214ab017
2017-05-03 13:55:11 +00:00
Mady Mellor
9d03a5254f Fixes issue where the notification menu was not visible after RTL changes
- Altered how the menu location is set so that it doesn't depend on RTL
  state
- Also fixes an issue where if you change from landscape to portrait or
  vice versa then the menu wouldn't be visible because the placement is
  based on the width of the notification which changes based on orientation

Test: (1) have notifications and show the menu, toggle the RTL state,
          show the menu, note that it is visible
      (2) have notifications and show the menu, rotate the device, note
          that the menu is still visible
Fixes: 36874498
Change-Id: I3a3b688f2b301f5ac0446a55b668db79c323a95c
2017-05-02 14:25:56 -07:00
Adrian Roos
664c9d7d16 DozePlugin: Remove
The DozePlugin has not been able to keep up with the changes to DozeMachine.
At this point it is cleaner to just remove it.

Bug: 30876804
Test: make SystemUI
Change-Id: Ie8cd1488eb862017c54b92b1fba07537c0143bff
2017-05-02 12:12:57 -07:00
Mady Mellor
4c19760b91 Don't offer snooze for foreground service notifications
Also updates NotificationMenuRow tests to actually check if menu
was created.

Test: Manual, have foreground service, check if snooze is visible
Bug: 37152715
Change-Id: I09cf60598c3e8991f2da731da1ef7e0a718c3435
2017-04-10 18:30:27 -07:00
Jason Monk
e645aee45a QS: Add transient icon for hotspot
Will make the loading time more clear.

Test: visual
Bug: 32270851
Change-Id: I0ea7591da132ff65fb7fc16b03b2891891e66598
2017-03-31 13:49:21 -04:00
George Mount
c7146beabe Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669
Test: I846ef668e3dd7d664cfb56d2b9400467ba9b79f4
Change-Id: Ie202960ada86b25e964f98a639b5f5740c8fdb79
2017-03-29 14:58:42 -07:00
TreeHugger Robot
9d421ba050 Merge changes Ia971b2bc,I0001eb3d,I55a6951e
* changes:
  Remove framework-protos from SystemUI
  Disable proguard for PluginDummyLib
  Enable multidex for dx
2017-03-27 23:37:10 +00:00
Mady Mellor
be976024a8 Merge "Add plugin interfaces to control notification menu / swipe behavior" 2017-03-24 16:54:18 +00:00
Colin Cross
6a8a4d8912 Disable proguard for PluginDummyLib
Proguard fails for jars that contain no class files, disable it.

Test: m -j ANDROID_COMPILE_WITH_JACK=false PluginDummyLib
Change-Id: I0001eb3de7b7cea2fa9f91de0c1e59569d41ae8a
2017-03-23 18:08:41 -07:00
Jason Monk
782cd6711b Create plugin interface for volume dialog
Very few logic changes, mostly just breaking out certain interfaces
and classes to the plugin lib.

Test: make + volume keys
Change-Id: Ieabc6d35f6ef980842849236a0b8ffd5543b3a2c
2017-03-24 00:40:25 +00:00
Mady Mellor
95d743c38c Add plugin interfaces to control notification menu / swipe behavior
1) Updates the notification menu plugin to do more:
- The plugin can now supply the view it wants to display behind a
  notification as the menu
- Touch interaction (i.e. notification translating on top) is piped
  through to the plugin so it can update the view behind the notification

2) Makes NotificationMenuRow an implementor of the plugin which moves
   a bunch of that logic out of NotificationStackScroller

Test: runtest systemui
Change-Id: I8723b96c195ff7311317d5523418cfcbe2a79b52
2017-03-22 19:04:50 -07:00
Jason Monk
361915c727 Move global actions to sysui and add plugin interface
- Move default global actions ui to sysui
 - Add fallback legacy interface in case sysui breaks
 - Switch to fallback if sysui dies or isn't responding

Test: Long-press power
Change-Id: I943522611de5dbbee61e66c67cf3a56379091e97
2017-03-22 09:41:34 -04:00
Jason Monk
e5b770e47d Updated QS UI
- Adds footer to QS which contains the date/alarm info
   and all touch targets (settings, edit, etc.)
 - Swaps out emergency + carrier text on cell tile for a
   standard CarrierText from lock screen in the header
   to make the header only contain status info.
 - Add dividing line
 - Work on animations

Test: runtest systemui
Change-Id: I97dfea1b1ea7006b53eb61ac3a1f942c64dd282d
2017-03-04 20:02:09 -05:00
Jason Monk
702e2ebf9f Add plugin API for individual QS tiles
This will allow prototyping of individual QS tiles and/or their
visual representation without having to write a plugin for the
entire panel. This will allow quick iteration on QS UI + dual
target tiles.

Test: Install plugin using new API
Change-Id: I05ca9d9f5a200a1dad2c3582251a36edb5cb9aba
2017-03-04 16:01:26 -05:00
Jason Monk
4eb01a20c4 Fix NavGesture version
Test: make
Change-Id: Ib9925ac5f01d0d08ef7f37222f0e78321753b464
2017-03-02 14:33:47 -05:00
Jason Monk
ec34da8f6f Add method for plugins to reference global dependencies
The new annotation versioning system allows plugins to share common
global interfaces that can be versioned on their own. To facilitate
this add a static method for plugins to get a hold of dependencies.
To get any dependency a plugin must @Requires it so it can be version
checked.

Test: Plugin that uses the new call.
Change-Id: I8e01260f8fbc14465502d506a7aa08212795ad9b
2017-03-01 13:26:01 -05:00
TreeHugger Robot
e4b106b1aa Merge "Fix notification shelf icon showing on top of snooze leave behind" 2017-02-16 18:34:59 +00:00
Jason Monk
d7937b3488 Merge "New system for versioning sysui plugins" 2017-02-15 20:49:05 +00:00
Mady Mellor
434180ce51 Fix notification shelf icon showing on top of snooze leave behind
Also fixes an issue where the guts closed listener would always call
onHeightChanged because the notification isn’t marked as removed
until after the listener gets called.

Fixes: 34866027
Test: Manual - have one notification, snooze it
Change-Id: Ic67bdb353b8bb5df8bdaaf6d3e71ade7da05ee46
2017-02-13 17:04:27 -08:00
Geoffrey Pitsch
df44b606f3 Updated Inline Notification Controls
Removed old xml resources, strings, dimens, etc
Different behavior when sent from the default channel.
Display how many notification categories are used by the app.
Group label when channel is associated with group.
Add package icon.
Fix tap-away-to-save behavior

Test: runtest systemui
Change-Id: Ib41a536a5c4e7c7747a2453eddc3b4b4b99ffa7a
2017-02-10 13:24:54 -05:00
Jason Monk
ca2156890a Fix tinting and sizing of tuner lock screen shortcuts
Test: visual
Change-Id: I13f0281d38cd4d73322e9752d9bca36be2412917
2017-02-09 20:25:20 -08:00
Jason Monk
5bec68fbea New system for versioning sysui plugins
Use annotations to handle the multi-dimensionalness of interface
versions, but still maintain compile time inclusion of current
versions.

Test: runtest systemui
Change-Id: I0789a72112cf6630a6406f76020071c8a6d9e24c
2017-02-09 09:32:20 -08:00
Jason Monk
421a9410b4 SysUI: Add method for plugins to keep status bar full screen
Lots of things detect overlays these days (installing apps) and the
only way to avoid the problems associated with this is to live in
the status bar window. So allow plugins to hold the window open
when they want to so they can have overlays be in that.

Move StatusBarWindowManager to Dependency to make things easier
as well.

Test: Install the example plugin, test can access QS and interact
      with apps

Change-Id: Ib2288bf56704960847217bad01a480ab407e0ffe
2017-02-07 18:58:14 -05:00
Geoffrey Pitsch
580f32d7b0 Merge "SystemUI uses Builder API with NotificationChannel" 2017-02-02 20:25:48 +00:00
Geoffrey Pitsch
1dc93bc407 SystemUI uses Builder API with NotificationChannel
Some changes to channels based on UX feedback.

Test: runtest systemui
Change-Id: I1b2f661ba145d6926035f992231dc3c2f8cbf844
2017-02-02 11:12:05 -05:00
Jason Monk
de850bbcaa Fix leaks in sysui
Add support for testing for PluginManager and TunerService leaks
and add tests for the known leaks and fix them. Also port PluginManager
and TunerService to Dependency to make them easier to handle in
tests.

Test: runtest systemui
Change-Id: I5642539ee24dd72f802905106decd0c87b41b4eb
Fixes: 34846972
2017-02-02 10:58:18 -05:00
Jason Monk
2a6ea9c2a1 Delete BaseStatusBar
It is a relic of a more complex time, but has passed out of all
knowledge for too long.

Test: manual testing on phones and TV
Change-Id: I62a15d9413ea4bda3ac82bf6f7d22c096e2c1cdc
2017-01-26 15:17:45 -05:00