In the RemoteController implementation, the inner class that
implements the IRemoteControlDisplay interface must have a weak
link to the RemoteController instance with which it is associated,
as MediaFocusControl and RemoteControlClient hold a strong
reference to this binder object in a different remote process.
Without a weak reference, any object referencing RemoteController
couldn't be independently garbage collected without a garbage
collection in the remote process.
Bug 8209392
Change-Id: I29e4274c45249b3cb0d3d89417c69e8fe8f62fc4
When a RemoteController listener is disabled: send its listener
"blank" information (no artist, "stopped state"...)
When a RemoteController listener is enabled: have the current
RemoteControlClient send the current information.
Bug 8209392
Change-Id: I375bf3c42a425ada94c61453b51669d7e819dde4
There are interface difference between managed and native side for some
metadata, like Face and JPEG format. we need override them when they are set/get
between native and managed sides.
Also fix some issues in the CameraMetadataTest.
Bug: 10406212
Change-Id: Ibd8be0415968445e711b3ea89f45e1edfa193ee2
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
DTMF stream must also be muted by silent mode when following ring
stream volume in order to be properly muted and unmuted when ringer
mode changes.
Also fix a problem in VolumeStreamState.setAllIndexes() when some
devices are not present in the stream state from which indexes
are copied.
Bug: 10932676.
Change-Id: I373d0fd1a475980786d97d97348d46a7e7421461
Switch KeyguardTransportControlView over to using RemoteController
instead of the internal API.
Guard transition animations behind a flag until we can work out some
intermittent issues.
Change-Id: Ie9f41339ce6e735c5d524db88437672f2c9859e2
- Rework camera callback binder interface
- Connect up idle, disconnect callbacks
- A few unit tests for shutter firing and idle use
Bug: 10549462
Change-Id: I8455a8a0561e366b7edeef6b101682be2ec44d79
When a wake lock is aquired while executing a binder call and released
in the message handler, AppOps complains about the uid mismatch.
Clear the binder identity before acquiring the wake lock.
Bug: 10627124.
Change-Id: Ibd5babc1ae699bffde1a659562089eb091879106
Handle MEDIA_SKIPPED event
Prevent notifyTimedEvent events (REFRESH_AND_/NOTIFY_TIME)
to eclipse NOTIFY_SEEK events.
Add automatic seek when time drifts too much. This should
not happen under normal circumstances, but is there to recover
from any unannounced media time discontinuity.
Change-Id: I8d7fdac2b0b6a9e62d2860461e6a25788e77fef8
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10954008
When a new RemoteControlDisplay gets registered, don't cause all
existing RemoteControlDisplays to re-receive RemoteControl
information they already have.
Bug 8417073
Change-Id: Icc8e7104d6870f748fddd702692789dbaef948ac
Allow an app to set the artwork configuration at any point
regardless of the registration state, and cache the width/height
values.
If the RemoteController is already registered, apply them.
If the RemoteController is not registered, use the cached value
when the object gets registered.
Bug 10862527
Change-Id: If633e2b9383e7d59690288d2271113e98b195cd8
Add the concept of an anchor looper.
Allow show/hide/selectTrack/selectDefaultTrack to be called from thread
other than anchor looper.
Change-Id: Iaf2f3d3c46d1b00a0a24156745ec16b301c80c04
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10919206
The existing code would only play a fallback ringtone if the requested
ringtone was one of the three ringtone uris that are defined by settings,
and it wasn't set to "silent".
Now it also plays the fallback for custom ringtone uris.
b/10891718
Change-Id: I79c2298c6497165e6845b98532cce0855347e50b
The problem was: when SurfaceTexture is used, test didn't acquire/release
images when they are produced, then it starves the producer and
cause deadlock. This change replaces SurfaceTexture with ImageReader, release
every image produced immediately.
Bug: 10360518
Change-Id: I9aabaee23013277c2da6f5825ac931bc10511fbc
Fixed rendering of captions in regions and incorrect caption width
measurement. Removes minimum-difference line wrapping, since the
results weren't consistent with StaticLayout's rendering.
BUG: 10917766, 10822229
Change-Id: I55ef28cbf383fd6b945c0be62e440781288364f1
Regardless of the artwork value, always update the metadata.
When updating the metadata, make sure the artwork is stored
in the artwork field, not in the bundle of the MetadataEditor.
Bug 10862527
Change-Id: Iec83fd9bb358a91c852099b30bb6d307a52a034c
Public API to extend the capabilities of the Visualizer audio
effect with measurements of peak and RMS values.
Bug 8413913
Change-Id: Ifc6646e013ec55fde3523fab685add1d043f1272
Extend the visualizer audio effect with the capability to query
peak and RMS values for the currently playing audio.
Values are expressed in mB and are retrieved as an array of
int values in the native layer, and written directly as
object fields for the JNI.
Bug 8413913
Change-Id: I808075a18e61f85c566544a2bdaae10e5c4a644b
Public API, under system|signature permission for access to
currently playing metadata and playback state.
Public API for sending media key events.
Bug 8209392
Change-Id: I39b9309ca3fb1bc305492bad98740df0ae0842b2