8207 Commits

Author SHA1 Message Date
Sungsoo Lim
2d99826605 Merge "TIF: Use XML file for representing TvContentRating" into lmp-dev 2014-07-24 16:04:26 +00:00
Sungsoo Lim
5c5b83fcd5 TIF: Use XML file for representing TvContentRating
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
2014-08-01 13:47:28 +09:00
Sungsoo Lim
1a6b25eabc TIF: Add a parameter (Bundle params) of tune method
- tune(Uri, Bundle) is added as a system API.

Bug: 15809017
Change-Id: I50bc9b510f469ac3c157f095ccfe27d1cd1d9854
2014-08-01 15:33:32 +09:00
Mike Lockwood
2754fd0cd3 Add toString() methods to some audio classes to help with debugging.
Change-Id: I2b61d8cdfbcaa7671705771325205b074c50ab1e
2014-07-31 16:50:02 +00:00
Jae Seo
d5ce975952 TIF: Make TvTrackInfo methods more explicit.
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
2014-07-31 16:15:51 +09:00
Wonsik Kim
8750dbca94 Merge "TIF: fix TvInputHal bug for multiple devices" into lmp-dev 2014-07-25 11:19:20 +00:00
Lajos Molnar
bacc82a509 MediaCodec: clean up image/buffer caching
- cachedBuffers will be null in async mode
- track dequeued buffers in a map
- free dequeued buffers & bytebuffers

Bug: 14297827
Bug: 11990118
Change-Id: I9f8255921de25d05bf2c11fdaeda45cc185b9dd7
2014-07-30 23:06:11 -07:00
Wonsik Kim
21aa3467cd TIF: fix TvInputHal bug for multiple devices
In addition, add toString() method to TvStreamConfig for easier
debugging.

Bug: 16561829, Bug: 16666251
Change-Id: Ic192aef30f4d193b73bac7bc93a1563aa9af4377
2014-07-31 11:05:34 +09:00
Yao Chen
4056871031 Adds toString() in MediaBrowserItem
Bug: 16676746
Change-Id: I61152dca66e6715807868a5c72a1fdf06c78d7ab
2014-07-30 15:36:25 -07:00
Chong Zhang
cad266aad9 fix for MediaCodecList bitrate range exception
Bug: 16627391

Change-Id: I8c5ba580d7b875d1e2a0ebbf398cf65dd5c4555f
2014-07-30 20:15:03 +00:00
Youngsang Cho
71b282fad4 TIF: Reset SurfaceView whenever TvView tunes to a channel of different TV input
Bug: 14254494
Change-Id: Ieb6b0cb95a366995c7b85beea7eb9ca8507d5531
2014-07-31 13:29:31 +09:00
Youngsang Cho
9bae97685b Merge "TIF: Add a system api TvInputInfo.isCecDeviceConnectedToSwitch" into lmp-dev 2014-07-24 16:04:26 +00:00
Youngsang Cho
d6f7666c77 TIF: Add a system api TvInputInfo.isCecDeviceConnectedToSwitch
Change-Id: Ib178cc7362eb82c0a9f777a1616c9e2943fee7a8
2014-07-30 16:23:07 +09:00
Jae Seo
783645e99f TIF: Merge TvParentalControlManager into TvInputManager
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
2014-07-30 15:39:39 +09:00
Jae Seo
6e62a1508c TIF: Use more consistent constant names
Change-Id: Iee7cbbba621e4174c9fdaedc86d3830ca9f46cfe
2014-07-30 11:46:41 +09:00
Ying Wang
546f3bf5fe Fix docs build.
Change-Id: I735f5b5a3fe36a454e384d5060d9273a9aabf3aa
2014-07-29 16:23:15 -07:00
Robert Shih
05ad96e9a3 Merge "MediaPlayer: scanInternalSubtitleTracks in synchronous prepare" into lmp-dev 2014-07-28 22:45:16 +00:00
Robert Shih
c42a96dba4 MediaPlayer: scanInternalSubtitleTracks in synchronous prepare
Bug: 16385674
Change-Id: I56d205ad2fe33bd64ea2251440c88fd4ecfa13ad
2014-07-29 11:55:46 -07:00
Robert Shih
3cdf7c5b62 MediaPlayer: support external timed text in java
Bug: 16385674
Change-Id: I7c2bf7a7d88c8396c3e228e3cf500998a3fa9db8
2014-07-29 14:00:13 -07:00
Michael Wright
9469cdde2c Add paragraph tags to MediaProjection docs
Change-Id: Ia881f9bcf3b93bd699f9ddf80d51ec7d0e74d2ed
2014-07-29 20:46:40 +00:00
Jean-Michel Trivi
339567d5c9 Optional AudioService debug logs for setMode()
Add log option to help debug routing / volume issues due to
  improper use of audio mode.

Change-Id: I6c2dde61b6b42ea9b45825ba7e10a17a61991c98
2014-07-29 19:25:58 +00:00
Jean-Michel Trivi
c1601f73b9 Restore missing usage assignment in AudioAttributes
A bad merge caused the usage field assignment in
  setLegacyStreamType() to disappear. Restore it.

Change-Id: I2c72e09a2c4a394483b8a4521b72d5edcc346e23
2014-07-29 18:14:21 +00:00
Eric Laurent
fdaed9dcb6 Fix capitalization on AudioPort callback method names
Change-Id: I87963ea7290989333781bf8905c9ae640c34d943
2014-07-29 09:30:34 -07:00
Mike Lockwood
9e61436424 Merge "android.media.AudioPatch: update comment" into lmp-dev 2014-07-24 15:36:21 +00:00
Mike Lockwood
31b2d8ee43 android.media.AudioPatch: update comment
Change-Id: Ic5470c49be4b4f4dcda8db8f2d1153afe2e84ad1
2014-07-28 14:40:12 -07:00
Jean-Michel Trivi
701d6ff12f AudioAttributes and AudioRecord.
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
2014-07-28 21:30:13 +00:00
Yao Chen
c2c0bdc10a Merge "s/thumbnail/icon in the browsing api." into lmp-dev 2014-07-24 20:48:02 +00:00
Yao Chen
5f3e1f2a2d s/thumbnail/icon in the browsing api.
Change-Id: I73bf76ed9628872094db74aef48a8e68864d6b4d
2014-07-28 11:35:36 -07:00
RoboErik
e0b8c378b7 Merge changes I87f551a7,Icb8dc76c,I66fbf585,I0c9506e7 into lmp-dev
* 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
2014-07-25 21:16:23 +00:00
RoboErik
031149cd5f Add context to MediaController constructor
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
2014-07-28 11:02:15 -07:00
RoboErik
aa4e23bbb3 Add getPackageName to MediaController
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
2014-07-25 16:22:59 -07:00
RoboErik
b214efbb91 Expose a way to set a PendingIntent for restarting playback
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
2014-07-25 16:22:18 -07:00
RoboErik
e34c09daf8 Finish plumbing for launch intents in sessions
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
2014-07-25 16:22:17 -07:00
RoboErik
76fca4e177 Add getFlags and getSessionToken to MediaController
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
2014-07-25 16:22:16 -07:00
Zhijun He
4c4064fa66 ImageFormat: update raw10 spec to allow row padding
Change-Id: Id191b92037487f16538d111fc6171d3be9a02acf
2014-07-28 18:42:10 +00:00
RoboErik
30674e91a2 Merge "Add getFlags and getSessionToken to MediaController" into lmp-dev 2014-07-24 20:48:02 +00:00
John Spurlock
aa5ee4d65f Volume: Persist unsafe volume playback time.
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
2014-07-25 17:00:25 -04:00
John Spurlock
543650bb10 Merge "Volume: Show safe media warning in settings." into lmp-dev 2014-07-24 23:36:47 +00:00
John Spurlock
351346092a Volume: Show safe media warning in settings.
If the safe media warning is enabled, make sure
we display it from the new inline slider preference in
Settings (without showing the volume dialog itself).

Also:
 - Update the warning dialog to the new sysui theme.
 - Separate the warning sentences with an additional line.
 - Fix the auto-dismiss timeout.
 - Add a system property to additionally enable the safe
   media warning for testing
 - Add more information to audio service dumpsys.

Bug:15434662
Change-Id: I95fec12c9049bbfdb7ebdf246160e4b12c0c5be3
2014-07-25 11:27:51 -04:00
Dongwon Kang
cfec0fbacb Merge "Remove COLUMN_CONDITIONAL_ACCESS from TvContract." into lmp-dev 2014-07-24 16:04:26 +00:00
Dongwon Kang
94a509b123 Remove COLUMN_CONDITIONAL_ACCESS from TvContract.
It turned out that having this flag in Channels table does not
make sense for some European countries because they scremble the signal
per program basis. Also, the current flag does not fit to the use-case
like 'pay per view'. Decided to remove this in L release because it's not
clear how we will handle the cases raised at this moment.

Change-Id: Ibbf829f331a307ac89a553e00ece18d5958e72b5
2014-07-25 10:19:12 +09:00
Terry Heo
b6437cd0ed TIF: Add @SystemApi to TvStreamConfig
To fix broken build of xts

Change-Id: Iefb94c1a7211e6b0a9ae64b78ba6b3999dd8d366
2014-07-25 10:10:47 +09:00
Zhijun He
86c545ea8c MediaFormat: add capture rate key
Change-Id: I2f7dd244d41d52aab6a172ae5df3e1fce3edd694
2014-07-25 00:52:42 +00:00
Sungsoo Lim
f0452adb43 Merge "Call removeOverlayView() before onRelease()" into lmp-dev 2014-07-24 16:04:26 +00:00
Eric Laurent
212532b58e AudioService: implement TV system volume
Implement volume policy for TV devices:
- No ringer mode: never silent
- All stream volumes are synchronized: changing any
stream volume will change the volume for all sources.
- Volume is maintained per output device.
- If a CEC capable HDMI sink is connected, digital volume
is maxed out and volume controls are sent to HDMI sink.

Bug: 15759753.

Change-Id: Ic4c38c749ef0440def9635a1669068ccef02a323
2014-07-24 23:24:26 +00:00
Jeff Davidson
d127367c40 Merge "Fix system API stub build." into lmp-dev 2014-07-24 22:43:15 +00:00
Jeff Davidson
2302049679 Fix system API stub build.
TvInputManager.captureFrame is @SystemApi and depends on
TvStreamConfig which must also be made @SystemApi.

Change-Id: I8a4a10d77d4cfb80674c4ac8aa7a8ed119881aa0
2014-07-24 18:06:56 -07:00
Yao Chen
80bb169d0f Use a sequence number for thumbnail callback.
Change-Id: I27888cd0437b4f654cb29371b7d86b9341d84ae9
2014-07-24 21:40:40 +00:00
Jean-Michel Trivi
f2bbad1e76 Remove MediaFocusControl persisting media button receiver
MediaFocusControl doesn't handle media button receivers anymore,
 so it should read and persist a receiver, and monitor
 package addition/removals.
Also involved a security vulnerability, see bug

Bug 15428797

Change-Id: Ia2be01b20dc4a9820cc0cd3d0605ac03770b266b
2014-07-24 10:06:13 -07:00
Yao Chen
8470857ee4 Fix build
Change-Id: Ia2a09417451dd9cdca0a6351b8ddd00f9195f361
2014-07-25 11:01:45 -07:00