3317 Commits

Author SHA1 Message Date
John Spurlock
95ef08b348 Volume: Don't allow ringer volume of 0 exiting ringer mode.
For any device with vibration, not only voice-capable devices.

Bug: 18423530
Change-Id: I0f1a7df884d675e6bc6854dcf044426c07f3d2f7
2014-11-18 10:51:39 -05:00
Dongwon Kang
c918172508 TIF: make the tune request handling more efficient
- Clear the pending tune operations to handle consecutive tune requests
  efficiently.
- Add time out for onTune() to make developers not to handle whole tune
  process in the onTune() method.

Bug: 18179595
Change-Id: I571e55b78d7c4d17c7237c5ce70203941bec2130
2014-11-18 15:49:08 +09:00
Jeff Sharkey
628d2606f7 Merge "Move ringtone redirection to MediaPlayer." into lmp-mr1-dev 2014-11-13 22:16:15 +00:00
Jeff Sharkey
3b566b8470 Move ringtone redirection to MediaPlayer.
Way back in API 1 we defined Settings.System.DEFAULT_NOTIFICATION_URI
which redirects through SettingsProvider before finally ariving at
the real underlying ContentProvider, usually MediaStore.

With new SELinux rules, we're no longer allowing the system_server
to hold open FDs to shared storage devices, which causes these
proxied openFile() calls to fail.

To work around this, teach MediaPlayer to resolve the final ringtone
Uri without going through the system.

Bug: 18226181
Change-Id: I40c68617c952c0bb3e939e5084f5b68a35e31ae3
2014-11-13 13:52:41 -08:00
Jean-Michel Trivi
136f54153e Merge "Support for delayed audio focus" into lmp-mr1-dev 2014-11-13 18:47:34 +00:00
Wonsik Kim
90e733385d TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()
Bug: 18283466
Change-Id: Ibb5d45c02a327e0b3e837ad3ec3603fa1623ff7b
2014-11-12 05:45:03 +00:00
Jean-Michel Trivi
fd6ad747e6 Support for delayed audio focus
New internal API for an audio focus requester to always enter
 the audio focus stack even if audio focus can't be granted
 immediately (e.g. during a phone call).
Remap the "no delay" interface to the new "requestAudioFocus"
 method signature and AIDL.

Bug 16010554

Change-Id: Iff91ddb0beb411cca1f8cf98300a9afc4178dc7f
2014-11-11 17:07:45 -08:00
Chong Zhang
00795e9edd Merge "return error MEDIA_ERROR_UNSUPPORTED when Range request fail" into lmp-mr1-dev 2014-11-11 18:33:21 +00:00
Chong Zhang
8976a0954c return error MEDIA_ERROR_UNSUPPORTED when Range request fail
Bug: 18235751
Change-Id: I4631daf50bb76b70dd740c45b628294ad1aa45e1
2014-11-10 19:32:28 -08:00
Jason Parks
220b65d21d am 94c3e3bf: Merge "Fix NPE for CTS." into lmp-sprout-dev
* commit '94c3e3bfcfe8d91283560082c737cb62e8d06742':
  Fix NPE for CTS.
2014-11-07 00:05:47 +00:00
RoboErik
b1d52e1d20 Merge changes If4c38bfe,Id9878186 into lmp-mr1-dev
* changes:
  Update metadata artwork and uri docs
  skip MediaController callbacks if it's been unregistered
2014-11-06 21:20:19 +00:00
Jason Parks
de709869ae Fix NPE for CTS.
The effect list can be empty and will return null
from native code. This fixes the CTS crash.

Bug: 18256010
Change-Id: Ifa552efc9de216993427115c001c7071c90403f1
2014-11-06 14:08:52 -06:00
RoboErik
a13846ddf3 Update metadata artwork and uri docs
This updates the Javadoc on the bitmap and uri fields to strongly
suggest Uris be used for high res artwork and strongly suggest Uris
use the content: style and support EXTRA_SIZE.

Change-Id: If4c38bfec20d049473457784b1b56fa4d78abe5e
2014-11-06 10:55:06 -08:00
Jeff Tinker
fc4e6f70f6 Merge "Add missing secure stop methods" into lmp-mr1-dev 2014-11-06 02:33:23 +00:00
RoboErik
3e0cfcda31 skip MediaController callbacks if it's been unregistered
This gives slightly better gaurantees around when an app will receive
a callback. As long as they remove a callback on the same thread calls
get posted on they won't receive any callbacks after the remove.

bug:18104724
Change-Id: Id9878186f005bf0b35c0380cd35f8fd7e67d1d90
2014-11-05 13:07:38 -08:00
Andrew Solovay
fbc3bdec7a am 56576838: am d9ceae8f: Merge "docs: Removed broken link to non-existent method." into lmp-docs
automerge: 8d7d7b4

* commit '8d7d7b448f2df7e4fdff6a3ca890b32b83075ead':
  docs: Removed broken link to non-existent method.
2014-11-05 20:22:24 +00:00
Andrew Solovay
8d7d7b448f am 56576838: am d9ceae8f: Merge "docs: Removed broken link to non-existent method." into lmp-docs
* commit '56576838a8e8c4f44f8df13cc40295a918540b86':
  docs: Removed broken link to non-existent method.
2014-11-05 18:52:27 +00:00
RoboErik
9af44ddf03 Merge "Post volume requests to the handler thread in MediaSession" into lmp-mr1-dev 2014-11-05 18:29:32 +00:00
RoboErik
5604a85ac6 Merge changes Ia3bc5b0d,I26e662ff into lmp-mr1-dev
* changes:
  Add extras to the PlaybackState
  Add setRatingType to MediaSession
2014-11-05 18:26:00 +00:00
RoboErik
131e63adaa Add extras to the PlaybackState
This allows apps to include extras that are atomic with play state
changes.

bug:18189125
bug:18103891
Change-Id: Ia3bc5b0dcf29960cb70e2ff3a67ec1fdd48b7a5a
2014-11-04 13:47:45 -08:00
RoboErik
566c1ed18f Add setRatingType to MediaSession
This was missing in L. Needed to tell controllers how to rate content.

bug:18051829
Change-Id: I26e662ff04f77ed7f2922bf9e74acf74c850547b
2014-11-04 13:14:19 -08:00
Eric Laurent
fe91d4e6a2 Merge "AudioService: fix wired headset insertion delay." into lmp-mr1-dev 2014-11-04 17:02:25 +00:00
Dongwon Kang
085329b69a Merge "TIF: Fix a typo and remove an unused method in TvInputService" into lmp-mr1-dev 2014-11-04 02:41:54 +00:00
Eric Laurent
adbe8bf85f AudioService: fix wired headset insertion delay.
Do not systematically delay a device connection
message by 1 second if another message is still in the queue
but calculate delay based on last message insertion time.

Bug: 17882912.

Change-Id: Id86c338488f41eebfa1dfd926032468be0294cec
2014-11-03 18:26:57 -08:00
Eric Laurent
8befd6fd05 Merge "AudioService: fix cross deadlock" into lmp-mr1-dev 2014-11-04 02:00:32 +00:00
Eric Laurent
8fa4d6f585 AudioService: fix cross deadlock
Fix cross deadlock between VolumeStreamState.class and
VolumeStreamState instance synchronization.

Do not synchronize on VolumeStreamState instance anymore.

Also document the locking order for synchronization objects
related to volume management.

Bug: 18159081.
Change-Id: Ibfe0759215cdac778408b95191cf0fd96bf46312
2014-11-03 17:30:41 -08:00
Andrew Solovay
4034546812 docs: Removed broken link to non-existent method.
Doc had included link to method MediaBrowserService.onLoadIcon().
Per bug http://b/17205016 that method was removed before release.

Revised doc is staged to:

http://asolovay.mtv.corp.google.com:9650/reference/android/service/media/MediaBrowserService.Result.html

(Note that the other "See Also" link, which I didn't remove, is badly
formatted because Javadoc seems to choke on links to methods that are
passed generic types. JoeFernandez@, if you can suggest a better way
to format that link I'll make that change too.)

bug: 18229650
Change-Id: Ic55ae8b9edc6dd314cf5acc306abd8a9d5f71134
2014-11-04 01:25:26 +00:00
Jeff Tinker
1b51c72e91 Add missing secure stop methods
b/18053197
b/18076411

Change-Id: Ide9ecab2fd2021f3544491f23ae84c394c48ac14
2014-11-03 16:22:04 -08:00
Dongwon Kang
79d2b4c810 TIF: Fix a typo and remove an unused method in TvInputService
Change-Id: I2c0233678c08a7070ffe507d9671e1ab669fdfd8
2014-11-03 16:04:12 +09:00
Dongwon Kang
4dd56c93e3 TIF: Add more documentation on start/end time of TvContract.Program
Bug: 18163685
Change-Id: Ifcd57330eb341adfbcb7fcf3482a701471bf729f
2014-11-03 10:58:00 +09:00
Jean-Michel Trivi
38b00a63c9 Merge "More AudioPolicy registration" into lmp-mr1-dev 2014-10-31 16:32:53 +00:00
Jean-Michel Trivi
8fdb0d4def More AudioPolicy registration
Define new usage in AudioAttributes to describe "virtual" sources.
Maintain a registration string in AudioPolicy and AudioMix that
 is used for the address of the mix in the native policy manager.
AudioPolicy registration marks the audio policy configuration and
 the audio mixes as registered.
The AudioPolicy class is used as the factory for the AudioTrack
 and AudioRecord objects that are respectively used as the
 source and sink of the mixes created by the policy owner.

Bug 16009464

Change-Id: I8e5bd351495257597c513d22597e273fcabdbc55
2014-10-30 17:22:34 -07:00
Dongwon Kang
ce34c6d308 TIF: handle inputs holding the overlay view even after the session release
Bug: 17336221
Change-Id: I7fb7890039bc3731b62410caa9802db5870ec2e2
2014-10-30 13:37:03 +09:00
Dongwon Kang
c1f26faa2d Merge "TIF: Handle notifyXXX() calls requested before the session initialization" into lmp-mr1-dev 2014-10-30 04:32:30 +00:00
Dongwon Kang
3eefa59e37 TIF: Handle notifyXXX() calls requested before the session initialization
Previously, we relied on a handler by posting runnables when the
session is not initialized yet. However, this trick was broken when we
separated the creation procedure into DO_CREATE_SESSION and
DO_NOTIFY_SESSION_CREATED.

Bug: 17909798
Change-Id: I46f610cb9673f8162266525ac0e343b61c6db9ec
2014-10-30 09:34:56 +09:00
Andre Eisenbach
570cc5302a Fix exception in AudioService when no BT Headset is connected.
If AudioManager.startBluetoothSco() is invoked with no Bluetooth Headset
connected, a NullPointerException will ensue.

Added check to make sure mBluetoothHeadsetDevice is set before accessing
it.

Bug: 17601845
Change-Id: Ia00bfffbea5484230b11a74787fe3309c18f824d
2014-10-29 09:56:41 -07:00
RoboErik
563acea666 Post volume requests to the handler thread in MediaSession
Volume requests should be getting sent on the same thread as other
callbacks, not on the binder thread.

bug:18156755
Change-Id: I35bceb3f8c74ccba35f3d08ff000a254fcbd04bb
2014-10-28 13:26:26 -07:00
Lajos Molnar
5ea17442c5 MediaCodec/Image: handle null cropRect correctly
- allow Media.Image.setCropRect(null) to unset cropRect
- use full image if cropRect is null in MediaCodec$Image

Bug: 18124320
Change-Id: I7abb6175402a1fe913e16c0a682fabee79c55741
2014-10-27 14:58:26 -07:00
Mike Lockwood
ac7d8c5cc8 Merge "Improve toString() methods for audio classes to help with debugging" into lmp-mr1-dev 2014-10-27 21:10:22 +00:00
Mike Lockwood
07cd124b09 Improve toString() methods for audio classes to help with debugging
bug: 18139399

Change-Id: I6076f9f5daa3b485bc80a4ff1b16a583e6c93f67
2014-10-27 14:07:35 -07:00
Eric Laurent
670a82cbb1 Merge "audioservice: fix default stream volume" into lmp-mr1-dev 2014-10-27 19:40:30 +00:00
Eric Laurent
91377de6f2 audioservice: fix default stream volume
When the max stream volume is configurable by
a system property, the default stream volume should
be set accordingly.

Bug: 17507571.

Change-Id: I9d9378292fc7b9c9e32acc55a275cc0ae5b203d4
2014-10-27 10:13:00 -07:00
John Spurlock
e828b6c034 Merge "AudioService: Restore ringer-mode validation check." into lmp-mr1-dev 2014-10-27 13:31:20 +00:00
John Spurlock
9755937ed9 AudioService: Restore ringer-mode validation check.
Ensure the ringer-mode is valid when set, and forward client calls
to service method to centralize validation.

Bug: 17884168
Change-Id: I500f9beefbce5b7a8bc01ca9eb7b4a7a16114160
2014-10-24 16:45:33 -04:00
Jae Seo
6320fc490f TIF: Notify of size change of the video in TvView
Put the necessary plumbing in place to notify of size change of the
video in TvView.
Put together the track related logic in TvInputManager.Session.
Protected track information with a lock.

Also modified debugging messages more consistently and fixed minor
warnings in TvView.

Bug: 17635300
Change-Id: I8d267d8a11056b5ccee1dacbf2d3391be16f811e
2014-10-24 10:19:08 -07:00
Jae Seo
e41d967c5c Merge "TIF: Cache the app private command and send it when connection is made" into lmp-mr1-dev 2014-10-24 17:02:34 +00:00
Jae Seo
887f52144e TIF: Cache the app private command and send it when connection is made
Bug: 17559793
Change-Id: If785d1ffceb5b5152381818efc4d1c8b5115143c
2014-10-24 10:01:06 -07:00
Dongwon Kang
f6df7bff53 Merge "TIF: Define more cannonical genres in TvContract" into lmp-mr1-dev 2014-10-24 02:24:18 +00:00
Wonsik Kim
cfc73237e9 Merge "TIF: fix wrong config comparison & confusing method name" into lmp-mr1-dev 2014-10-24 01:34:05 +00:00
Dongwon Kang
5168a7a0d3 TIF: exclude tuner TV input not having a setup activity in the input list.
By doing this, developers can notice the flaw of the input in advance.

Bug: 17647146
Change-Id: I123a5538566959320a6201a4d7952e205602a28a
2014-10-24 10:23:13 +09:00