Commit Graph

630 Commits

Author SHA1 Message Date
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Amith Yamasani
0d723a2a4d Merge "Multi-window assist callback" into nyc-dev 2016-04-14 19:06:40 +00:00
Amith Yamasani
e8222e551f Multi-window assist callback
Introducing a new callback in VoiceInteractionSession to
provide assist data for additional activities in the
foreground in a multiwindow setup.

PIP, docked windows and free-form windows (top-most)
will be queried for assist data and passed through the
new API to the Voice Interaction service.

Bug: 27718385

Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
2016-04-13 17:12:29 -07:00
Jonathan Basseri
b1a43484d5 Add toString to CarrierIdentifier.
This is so that objects can be logged and included in dumpsys.

Bug: 26778049
Change-Id: Iace574e40e7a7a7a06289592de9a51455b6acb18
2016-04-13 21:36:52 +00:00
Bryce Lee
196a05724d Merge "Add granular control over disabled effects." into nyc-dev 2016-04-08 20:59:10 +00:00
Julia Reynolds
3898db9e15 Merge "Allow the ranker to autobundle notifications." into nyc-dev 2016-04-08 20:13:45 +00:00
Jason Monk
aa336f8926 Merge "Allow mode of TileService to be changed" into nyc-dev 2016-04-08 19:37:55 +00:00
Julia Reynolds
e46bb37acf Allow the ranker to autobundle notifications.
Bug: 26709317
Change-Id: I5017a471604e513a7b582cdc2f3472441e108fae
2016-04-08 13:55:03 -04:00
Bryce Lee
7219adadb0 Add granular control over disabled effects.
Currently, we can only wholesale disable effects outside of zen mode.
There are some devices that require long running suppression of features.
Effects disabling was added previously to support this. However, calling
suppression was broken recently on a device where we needed notification
suppression, but not calling suppression.

This CL remedies this problem by adding more granular disabled effects
hints. The NotificationManagerService has been updated to handle these
request types and present ZenModeHelper with a unified map of what should
be suppressed.

Bug: 27992763
Change-Id: I38b4706446dfd6e1c3eb97266dbc3332b250adda
2016-04-08 10:54:23 -07:00
Jason Monk
97d2272be0 Allow mode of TileService to be changed
Since the mode of a tile service was set in onTileAdded, it couldn't
be controlled by developers if they updated their tile.  To handle
the mode has been moved to a boolean meta-data flag to indicate
a tile should be an active tile.

Bug: 28043969
Change-Id: I6403d34f8cb70809edc07769389d5a1f835c1ab3
2016-04-08 11:42:57 -04:00
Chris Wren
5717bd6ddb add an onListenerDisconnected() callback to NLS
Also block all callbacks if the listener is not connected.

Also update the documentation to make lifecycle restictions
more clear.

Bug: 27582839
Change-Id: I029304e1fb87bd8d754cfb4641ba8cc095fc2b2e
2016-04-07 13:12:21 -04:00
Ruben Brunk
c7be3beced Add VrManager AIDL interface for use by system apps.
Bug: 27884853
Change-Id: I6de0d291deafe5003070d60866c60d6599312e79
2016-04-06 12:29:40 -07:00
Clara Bayarri
89203de878 Remove unused import for KeyboardShortcutGroup
Left it in accidentally when removing default method.

Change-Id: I6af0712624ffaefff4cb4ad2a9e5a86d7104d2e7
2016-04-01 14:40:34 +01:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Ruben Brunk
c7354fe2d4 Notify VrListenerService when VR activity changes.
Bug: 27536964
Bug: 22855417

Change-Id: I67e1f8e6595332b3d768a99735bbd5fd38dffdc9
2016-03-18 16:00:38 -07:00
Jason Monk
1c2fea8df7 Fix QS FBE-ness
- Get service info for encryption-unaware apps
 - SysUI assumes tiles in unavailable state when waiting for
   binding
 - Attempt rebind after unlock is complete
 - Fix random crash that was making testing hard

Bug: 26940789
Bug: 27556723
Change-Id: I0b3600d35d4c74bb0d6c47a34a7d267bb9731bc4
2016-03-18 14:31:42 -04:00
Chris Wren
b7c810957f revert recent changes around system listener registrations
also guard against the ranker calling the self-service registration functions.
"why do we even have that lever?"

Bug: 27577115
Change-Id: I8a01cfdd801320e53d56bcbf515b9ba17e677166
2016-03-10 11:41:10 -05:00
Chris Wren
a82662e3f5 Merge "add a ranking service to the rocket" into nyc-dev 2016-03-09 16:26:56 +00:00
Chris Wren
0efdb88ccc add a ranking service to the rocket
Bug: 22960980
Change-Id: Ic0e911a2f048a4b47171b338c3de13125852be43
2016-03-08 17:23:33 -05:00
Julia Reynolds
1d6d16d699 Condition cleanup.
Change-Id: If978bebac52c0b1438e86339669f409b4b17c6fc
2016-03-08 10:41:31 -05:00
Chris Wren
be3696d425 Merge "rename the asisstant service for the ranker" into nyc-dev 2016-03-08 14:13:45 +00:00
Ruben Brunk
e24b9a6cfa Add a VR listener service.
Bug: 22855417
Bug: 26724891
Bug: 27364145

- Add an API for VrListenerService, which is bound/unbound
  from the framework when the system VR mode changes.
- Allow only a single bound VrListenerService at a time.
- Monitor allowed VrListenerService implementations from
  VrManagerService and evict services as needed when packages,
  users, or settings change.
- Remove previous VR functionality in NotificationListenerService.
- Add component target to Activity#setVrMode to allow
  explicit selection of the running VrListenerService from
  the current VR activity.

Change-Id: I776335f4441be0e793d3126f2d16faf86a8c621a
2016-03-07 15:54:12 -08:00
Chris Wren
e0ba7eb365 rename the asisstant service for the ranker
Bug: 22960980
Change-Id: Ibe57933303a488b01c43a7621a488d425d6f707d
2016-03-07 16:50:27 -05:00
Ji Yang
456b9620f0 Merge "New CarrierMessagingService API for sms filtering" into nyc-dev 2016-03-03 21:10:46 +00:00
Ji Yang
a8c9c6c593 New CarrierMessagingService API for sms filtering
Add a new sms filtering method to let the carrier app tell
the platform to keep the message while keep it invisible to
the end user.

BUG: 27292180
Change-Id: I306a7dbde6dcb9929e358b3d1bbda9807ef35943
2016-03-03 13:07:13 -08:00
Julia Reynolds
2319dd3a66 Merge "Api review: AutomaticZenRule" into nyc-dev 2016-03-01 15:05:36 +00:00
Svet Ganov
b8f53ee812 Notification listener and ranker callbacks on binder threads.
The callbacks for the notification listener and notification
ranker were delivered on binder threads which is problematic
becuase: 1) permission checks and app ops checks would fail
unless the app developer knows to clear binder calling id and
restore it after that; 2) developers need to synchronize their
implementation as they get callbacks on different threads (
arguably callbacks should not be concurrent); 3) this doesn't
follow the pattern in the platform;

Also the code delivering callbacks was catching Throwable which
we shouldn't do in general and also masks bugs in the listener
or ranker implementation. Now that the callbacks are offloaded
to the main listener/ranker thread system code should not be
guarding against Throwable to handle exceptions propagated
over binder calls.

bug:26704777

Change-Id: I171fb41bbe25e6105dd05e4166193dbcec594f82
2016-02-29 16:26:17 -08:00
Ruben Brunk
b77f9ec93a Merge "Revert "DO NOT SUBMIT: Hide VR features for preview."" into nyc-dev 2016-02-29 19:50:37 +00:00
Ruben Brunk
e5d76e8276 Revert "DO NOT SUBMIT: Hide VR features for preview."
This reverts commit cfa66a2a45.

Change-Id: Ibf36092205b14c29935d1f28be5f5b5f64b1d16c
2016-02-29 19:50:15 +00:00
Ruben Brunk
8ccb68af89 Merge "DO NOT SUBMIT: Hide VR features for preview." into nyc-dev 2016-02-29 19:43:55 +00:00
Jeff Sharkey
f8880561e6 When system server goes down, crash apps more.
Similar to first patch, but now using new "rethrowFromSystemServer()"
method which internally translates DeadObjectException into
DeadSystemException.  New logic over in Log.printlns() now
suppresses the DeadSystemException stack traces, since they're
misleading and just added pressure to the precious log buffer space.

Add some extra RuntimeInit checks to suppress logging-about-logging
when the system server is dead.

Bug: 27364859
Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
2016-02-27 17:17:01 -07:00
Adrian Roos
5081c0de54 Fix crash with decorated custom notifications
Clones notifications before adding them to remote views so
the original stays parcelable on its own.

Also prevents the compatibility inflation from triggering when
an app uses a decorating style to prevent recursive wrapping.
Those styles only exist on N and later anyways.

Also fixes the compatibility inflation in listeners.

Bug: 27368615
Change-Id: Iedf3036bf315dd9c7b476c7e8bcce57de5b5c9c8
2016-02-26 17:11:29 -08:00
Julia Reynolds
361e82d399 Api review: AutomaticZenRule
Bug: 27364144
Change-Id: I17fec34d7a277173820bed7829baf5bf905f327a
2016-02-26 18:44:32 -05:00
Ruben Brunk
cfa66a2a45 DO NOT SUBMIT: Hide VR features for preview.
Bug: 26945446
Change-Id: I37e2f9f6ffc65be60bcbef4bdf87da89561ef313
2016-02-26 15:32:40 -08:00
Julia Reynolds
0edb50c4bf Api review: NotificationManager
Bug: 27365672
Change-Id: Ic0fd82fb9442d10d6b308182a3859497aa882d07
2016-02-26 15:44:41 -05:00
Julia Reynolds
3b84812271 Api review: Notification.Builder
Bug: 27364889
Change-Id: I95cee3336f1adb64e37e71a9ab40e68feb1d9c5b
2016-02-26 15:44:02 -05:00
Julia Reynolds
f0f629ffe4 Introduce IMPORTANCE_MIN.
Allow HUNs for >= IMPORTANCE_HIGH.
Allow full screen intents for IMPORTANCE_MAX.

Bug: 22960980
Bug: 26918284
Change-Id: Id4d2b90ea2e21563dbc716db411060d826e73699
2016-02-26 10:54:08 -05:00
Arunesh Mishra
7dbef2da93 Merge "Fix AlwaysOnHotwordDetector recognition event bug." into nyc-dev 2016-02-24 23:12:12 +00:00
Arunesh Mishra
f47f173b06 Fix AlwaysOnHotwordDetector recognition event bug.
Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.

Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.

Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576
2016-02-24 12:57:01 -08:00
Jorim Jaggi
0ffd49cbe0 Always consume bottom insets when navigation bar is force shown
When an app requests SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION but we
force show the navigation bar, we need to treat for the app like
there is no virtual navigation bar on the device. Because if you
combine it with FLAG_HIDE_NAVIGATION, you'd expect the navigation
bar gets hidden but it doesn't, so there could be content that
overlaps with the navigation bar.

Bug: 27157904
Change-Id: I088e02eae2e723c35e9cb4873de6b1325458533b
2016-02-24 18:15:17 +00:00
Andres Morales
f1af917c14 Merge "Add SystemApi for retrieving device flash lock state" into nyc-dev 2016-02-24 17:30:26 +00:00
Andres Morales
74e9b18b2d Add SystemApi for retrieving device flash lock state
Bug: 26039090
Change-Id: Ib51c4862d897cc91a0788379c761ed49a2adf271
2016-02-23 10:53:49 -08:00
Jason Monk
724214a878 Add TileService settings API
It will be used for long-clicks on TileServices when available.
Otherwise will default back to app info for the app providing the
tile.

Bug: 27269699
Change-Id: Iaf1ee1e6fe6e1357cda32c74bfdc0c26af0f5901
2016-02-19 16:43:00 -05:00
Julia Reynolds
ef37f28436 Remove Notification Topics.
Bug: 23220370
Change-Id: Ifbcdbab1cf6974c192483091512f75762784a98e
2016-02-18 08:55:33 -05:00
Julia Reynolds
1998ee5628 Alarm can end time-based rule.
Bug: 21069008
Change-Id: I857d85a32eb44ca873da4a9f19323c48a922ab9f
2016-02-17 08:44:26 -05:00
Julia Reynolds
d560729ce3 Update DND visual interruption choices.
Change-Id: I7050264839c566dcef1dd01d155dda694a8d1ec0
2016-02-08 15:20:02 +00:00
Chris Wren
10c63d8a12 move assistant to system API
Bug: 26693581
Change-Id: I7e29b8521e2c33683b8032e63da734cfde1dfcc9
2016-02-05 14:55:35 -05:00
Chris Wren
3b543ca859 Revert "move assistant to system API"
This reverts commit c441856bb6.
2016-02-05 10:49:22 -05:00
Chris Wren
c441856bb6 move assistant to system API
Bug: 22455414
Change-Id: I2fbb37fceef3058bc70d540a58fdcd8af5e7a76d
2016-02-05 08:22:18 -05:00
Julia Reynolds
3588e597d2 Merge "Re-SystemApi some fields/method that aren't in use." 2016-02-01 20:37:41 +00:00