8185 Commits

Author SHA1 Message Date
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
Christofer Åkersten
6a1f2649a9 Listen to onVisibilityChanged().
Use onVisibilityChanged() instead of setVisibility() in order to
detect changes in visibility on the TvView. This ensures we detect
visibility changes for ancestors.

Bug: 16618628
Change-Id: I6efd21763ebfdbb59532b837db5627b7ccb0cae0
2014-07-28 20:47:19 +09:00
Jae Seo
91a801d42f TIF: Rename methods in TvInputService
This change addresses the following council feedback.

TvInputService.Session:
-- Rename onRequestUnblockContent() --> onUnblockContent()
-- Change all dispatch* methods to be notify*

Bug: 16542165
Change-Id: Ib9c8dc825665fdf75ebd1d13b1e39c39514132f1
2014-07-28 17:28:15 +09:00
Lajos Molnar
7de28d34f1 Implement MediaCodec.getImage methods
Bug: 10706245
Change-Id: Icbac5538a27ffdb53d974e2e1f8dc5afe02fb391
2014-07-25 19:30:23 -07:00
Zhijun He
f7badff8bb CamcorderProfiles: add high speed profile constants
Change-Id: I8f783466f8c2560820db14488acc1a309d27ab0f
2014-07-25 23:59:06 +00:00
Sungsoo Lim
1295b154c9 Call removeOverlayView() before onRelease()
When the implementation of onRelease() hangs, removeOverlayView()
isn't called. In order to make sure that removeOverlayView() is called,
this CL changes the calling order of removeOverlayView() and onRelease().

Bug: 15097804
Change-Id: I8f998d57488d7bea7c3ba9ece08d6a7adfdebd49
2014-07-24 16:01:58 +09:00
Sungsoo Lim
059e4f6daa Fix typo
Change-Id: Ied87356fae0fff1bc5a0c80223351423a81ea0ce
2014-07-24 17:16:59 +09:00
Ji-Hwan Lee
4c52697dbe TIF: Support HDMI-CEC active source management
Add system API TvView.setMain() and TvInputService.onSetMain().

Bug: 15994065
Change-Id: I60ac24659453ca616380993c4accd8c17e714639
2014-07-24 15:07:43 +09:00
Terry Heo
79124a717c TIF: Enable capturing TV input of TvInputPassthroughWrapperService
Also fixed usage of Log.e() in TvInputService to show stack trace.

Bug: 16441553
Change-Id: I5c160de4a628698907ffd00510d982d597c0ea01
2014-07-24 10:51:23 +09:00
Terry Heo
c086a3df3b Add a frame capture API of TV input
- Added new permission CAPTURE_TV_INPUT

Bug: 15736756
Change-Id: I2ae8b2e3f5b1ad1d525854ed89ab2043cf66acbe
2014-07-24 10:08:45 +09:00
Joe Onorato
69b078599b Allow apps to be slow at loading children and thumbnails by making those functions allowed to be asynchronous.
Change-Id: Ibcaee3f0f8d9ba14f1b002df9c6d4594c6278045
2014-07-23 17:56:57 -07:00
RoboErik
8880157ee0 Merge "Return appropriately scaled artwork to RemoteController" into lmp-dev 2014-07-23 18:56:15 +00:00
RoboErik
a259d35073 Return appropriately scaled artwork to RemoteController
RemoteController has an api to set the artwork size. This adds compatibility
code to do the exclusion or scaling of artwork to be consistent with old APIs.

bug:15618171
Change-Id: I8cc51750c03219d42d5f543419f8b46f9eb5b833
2014-07-23 13:25:02 -07:00
Yao Chen
7e21fe8be9 various fixes in MediaBrowserItem and MediaBrowserService
Change-Id: I57f2a6728eea14ff6243fd68d21886599a5a12f4
2014-07-23 13:15:23 -07:00
Gabriel Peal
f364f94496 Added Action to PlaybackState
Added the ability to discover MediaBrowsers

Change-Id: I925c8738ac73afd0bee3dada2ee7ff2d5047e63f
2014-07-23 11:45:03 -07:00
Gabriel Peal
f0593bc17b Added QueueState, playUri, and playFromSearch.
Added QueueState to MediaSession/MediaController
Added play(Uri) and playFromSearch(String) to MediaController.TransportControls

Change-Id: I1a8ad5c22d05015ab6ff5700dc8a758455f1d89b
2014-07-23 11:45:03 -07:00
RoboErik
9db9bf7034 Switch Session APIs over to AudioAttributes
The session apis were using audioStream in several places. This
updates them to use AudioAttributes instead.

bug:16403289
Change-Id: Ic4da9ca5fbea2536e80c71503bd9a9bf7f346997
2014-07-23 17:08:32 +00:00
Jae Seo
9adf3dfe19 Merge "TIF: Use @SystemApi for APIs that we intend to open to OEMs" into lmp-dev 2014-07-22 16:21:19 +00:00
Jae Seo
15bbf3b220 TIF: Use @SystemApi for APIs that we intend to open to OEMs
Bug: 16374058
Change-Id: Ifdf8188d3791e7e8ab6cc0a30696bde24b16ac5c
2014-07-22 19:58:30 -07:00
Youngsang Cho
008f6d4e32 Block logging watched histories for passthrough inputs
Added a system API TvContract.isChannelUriForPassthroughTvInput

Change-Id: I933482831ae2a8b4d6000c4d16520387b5b6a13f
2014-07-22 22:16:01 -07:00
Youngsang Cho
9d744068f9 Enable customization of TvInputInfo icon/label
TODO: Apply builder pattern to create instances of TvInputInfo

Bug: 16166859
Change-Id: I37ef35e7e463a5ff6612f822fd784b7f299039c9
2014-07-22 22:16:01 -07:00
Lajos Molnar
4b902d72db MediaFormat: add KEY_TEMPORAL_LAYERING
Bug: 14562236
Change-Id: I343d2859e48552d7372fec3b77aea868ff1bfc33
2014-07-22 20:36:05 -07:00
Yao Chen
319f9a979c Add thumbnail related api.
Change-Id: Ifcb06bbaf8f37df367f130124cbcef065fa25766
2014-07-22 17:05:04 -07:00