summaryrefslogtreecommitdiffstats
path: root/cmds/media
Commit message (Collapse)AuthorAgeFilesLines
* Also rely on enabled notification listeners for RemoteController registrationJean-Michel Trivi2013-10-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Registration of a RemoteController may succeed only if: - the caller has the MEDIA_CONTENT_CONTROL permission, - or if the RemoteController.OnClientUpdateListener it registers if one of the enabled notification listeners. For using the "enabled notification listener" functionality, the CL involved: - making OnClientUpdateListener an interface so a 3rd-party application may have its implementation extend NotificationListenerService, which is required for a listener to be enabled by the user. - add the concept of "enabled" status in an IRemoteControlDisplay, so a RemoteController (which encapsulates the IRemoteControlDisplay implementation) may be registered, but later temporarily disabled by the user, as a result of a user action in the security settings, or a user switch. - making MediaFocusControl, the component tied to AudioService, monitor changes in enabled notification listeners, and act upon enable/disable changes. Bug 8209392 Change-Id: Ia8dfa2156c65668b2b0d4ae92048005912652d84
* Have audio service clean up new receivers in crashing processes.Dianne Hackborn2013-04-085-0/+431
The new media button receiver with only a pending intent (no component name) could be left hanging if the process that registered it went away. These semantically need to be tied to the calling process's lifetime; we now clean them up when the calling process goes away. Also added some additional cleanup of media button receivers when packages change (updated, cleared). And on top of that, a new "media" command for doing media things. Currently lets you send media keys and monitor remote display data. Oh and finally added a new BaseCommand base class for implementing these command line utilities. Change-Id: Iba1d56f10bab1eec4a94a7bb1d1c2ae614c8bcf5