An AudioAttributes instance can either be built through the
Builder, or from unmarshalling: the mFormattedTags field
should always be in sync with the array of tags.
In toString() method, use the more compact mFormattedTags.
Change-Id: Ie06cd7758bf4f2d2693fedaa8c3ba4245802d921
This change addresses the following API council feedback.
- Remove all constants from TvContentRating. Instead this class becomes a
general parser for a tuple of "rating domain"+type+subtype(s).
- Instead of constants in the API, the rating definitions should come from
parsed XML meta-data tied to a TvInputService entry in the AndroidManifest.
This XML should define a ranked order of the rating constants along with
@string references for displaying in the Settings UI. Mention that the
"rating domain" should be scoped similar to a package name, for example
"com.youtube.ratings".
- For system-defined rating types (like US, Korea, etc) we should parse this
same XML format, but it may come from a hard-coded XML resource (since they
aren't tied to a single TvInputService.)
- Thoroughly document the built-in supported types in javadoc on TvContentRating.
Change-Id: I0a9526c73c8ca67fd0eeac63f3c63c05657a45e3
This change addresses the following API council feedback:
TvTrackInfo:
-- Remove all KEY_/VALUE_ constants, and replace with explicit,
strongly-typed accessor methods.
-- Add additional Bundle getExtras() method (in addition to the explicit
types); most of the time this Bundle will be null.
Bug: 16542165
Change-Id: Ie48cb170b2bbf07d9460fdc8ed77d7db01799772
This change addresses the following API council feedback.
TvParentalControlManager:
-- Replace the listener interface with a broadcast Intent with well-known
action, something like ACTION_BLOCKED_RATINGS_CHANGED.
-- TvParentalControlManager goes away, and two remaining methods move to
TvInputManager.
== Implementation changes ==
-- The user-selected rating preferences should be stored in an XML file, and
loaded at boot by your internal system service. It should _not_ be stored in
a Secure/Global setting.
Bug: 16542165
Change-Id: I278df963576652ec9163a66c1ef99419fcdb36c2
Add audio recording source in AudioAttributes.
New AudioRecord constructor with AudioAttributes and
AudioFormat.
Legacy AudioRecord constructor is calling into the new
constructor.
Bug 16009464
Change-Id: I69d81f9e71bdf946c4cfbda6d3d8552ffac6b5c2
* changes:
Add context to MediaController constructor
Add getPackageName to MediaController
Expose a way to set a PendingIntent for restarting playback
Finish plumbing for launch intents in sessions
This also adds a convenience method to MediaSession to allow getting
a controller instead of having to create and cache your own.
bug:16561220
Change-Id: I87f551a7474e71f1cf2f07e0e541c3a4515cd977
This removes the MediaSessionInfo class and adds a method on the
controller to get the package name. This also converts code that
depended on the session's UUID to use the token for comparison or
the Tag in the case of test code that needs a string identifier.
Change-Id: Icb8dc76c70e23e897da8fd07651c524b96372bf9
This is to allow apps to set a PendingIntent to restart playback. This
is not persisted across reboots but will allow music to start playing
again for the life of the system. Only the most recent priority app with
a PI set will be cached. This also deprecates methods in AudioManager
that do this and unhides the unregister method in MediaSessionManager.
Change-Id: I66fbf5856333468d8cb8a3022809778ba00d426e
This finishes out the plumbing for setting a launchable PendingIntent
on a session and getting it from a controller to launch an app's UI.
Change-Id: I0c9506e7c3f0ebf57070ca7e0d91324eb3fdd1e1
getFlags was hidden, should have been public. Also added getSessionToken
as a convenience method for apps to get the token used to create a
controller.
bug:15408392
Change-Id: Icb19b43ebb7e01727eec1a4e667dafcfc3b8d4eb
Instead of warning after every reboot, remember the
playback time after a user confirmation and only
reset after the 20 hour playback threshold.
Bug:16543104
Change-Id: I783358d97b88302a28fe77a8eb88bcd338ef1c87