3589 Commits

Author SHA1 Message Date
Michael Wright
dae3912b3e am eb26c8ee: am 4de2ab4c: am 7081a5d1: Merge "Correctly iterate through MediaProjection callbacks." into lmp-mr1-dev
* commit 'eb26c8ee2a25e37eab4a34d772e9e7d90ae71fe4':
  Correctly iterate through MediaProjection callbacks.
2014-12-03 17:19:01 +00:00
Mike Lockwood
0927c43c38 Merge "Remove obsolete AudioManager audio dock plugged Intents" 2014-12-03 13:39:26 +00:00
Dongwon Kang
b0bbaec8be Merge "TIF: call tune() in HardwareSession" into lmp-mr1-dev 2014-12-03 02:22:12 +00:00
Michael Wright
7081a5d1ae Merge "Correctly iterate through MediaProjection callbacks." into lmp-mr1-dev 2014-12-03 01:14:22 +00:00
Mike Lockwood
008dfadb31 Remove obsolete AudioManager audio dock plugged Intents
We have no code that listens for AudioManager.ACTION_ANALOG_AUDIO_DOCK_PLUG
and AudioManager.ACTION_DIGITAL_AUDIO_DOCK_PLUG

Change-Id: I96a746c84e5a4b17df1b9fbdbb5de77e6bc39714
2014-12-02 12:23:04 -08:00
Jean-Michel Trivi
2a1cdd4d4f am 8e74a8a7: am 874e4502: am 57457b98: Merge "AudioMix address and type, rule exclusion API, dynamic source" into lmp-mr1-dev
* commit '8e74a8a77e06c93180a5b807c3d9865c89be3dc7':
  AudioMix address and type, rule exclusion API, dynamic source
2014-12-02 17:31:25 +00:00
Jean-Michel Trivi
57457b98cf Merge "AudioMix address and type, rule exclusion API, dynamic source" into lmp-mr1-dev 2014-12-02 17:09:30 +00:00
Jinsuk Kim
59efa5ec9c am f2d68c88: am bfe763d1: am b4355ec3: Merge "audioservice: system audio control in master volume mode" into lmp-mr1-dev
* commit 'f2d68c8811db6fee4650ae5cd310cbe54744d9df':
  audioservice: system audio control in master volume mode
2014-12-02 07:42:56 +00:00
Dongwon Kang
0e7a556844 am b076324c: am 3599af39: am 7cfe00f6: Merge "TIF: fix a race condition when TvInputManager is initialized" into lmp-mr1-dev
* commit 'b076324c64060161e75c35f43c688f7cf067e396':
  TIF: fix a race condition when TvInputManager is initialized
2014-12-02 07:42:50 +00:00
Jinsuk Kim
b4355ec3d0 Merge "audioservice: system audio control in master volume mode" into lmp-mr1-dev 2014-12-02 07:26:41 +00:00
Dongwon Kang
7cfe00f693 Merge "TIF: fix a race condition when TvInputManager is initialized" into lmp-mr1-dev 2014-12-02 07:26:07 +00:00
Sungsoo Lim
f8225d3dd5 am 628e5214: am 1f35568d: am 5a7445b0: Merge "Missing Javadoc update while API review" into lmp-mr1-dev
* commit '628e52147bf2df00f180b4c9157398edaffb2b19':
  Missing Javadoc update while API review
2014-12-02 06:47:08 +00:00
Sungsoo Lim
5a7445b00d Merge "Missing Javadoc update while API review" into lmp-mr1-dev 2014-12-02 03:29:10 +00:00
Zhijun He
1b536b8d93 am 0fb8fbd2: am c8d1b107: am 217814bf: Merge "ImageReader: free direct byte buffers once Image is returned" into lmp-mr1-dev
* commit '0fb8fbd2dd782b6d18d7f1f40aef2ec77fbfb62a':
  ImageReader: free direct byte buffers once Image is returned
2014-12-02 01:59:52 +00:00
Dongwon Kang
993f81e238 TIF: fix a race condition when TvInputManager is initialized
Currently, TvInputManagerService notifies the initial state of each
input via TvInputManagetCallback#onInputStateChanged after TvInputManager
is created. However, this is racy because the client may call methods
like getTvInputState() before the initialization.

This patch makes sure that the client gets the control when the initialization
finishes completely.

Bug: 18419452
Change-Id: I5d8141c20984013e68f2809120710c670557c9ad
2014-12-02 09:30:57 +09:00
Zhijun He
e09dcdba71 ImageReader: free direct byte buffers once Image is returned
This can prevent apps from accessing an image byte buffer when it is closed.

Bug: 12528089
Change-Id: I04dccf1832204be2ae3aeb3bbe04f616886447e6
2014-12-01 23:57:11 +00:00
John Spurlock
aac7a9f4c7 am 34c9ee1a: am 23a99a3a: am 21d68f48: Merge "Volume: Improve inline volume controls used in settings." into lmp-mr1-dev
* commit '34c9ee1af8980594df096e7759c50277270e658c':
  Volume: Improve inline volume controls used in settings.
2014-12-01 19:54:45 +00:00
Wally Yau
7d64195e50 am 4b187a28: am 5b4e2e02: am da392904: Set stream volume to max when userMasterVolume is set to true.
* commit '4b187a28106257638cac25360b8bb59cbf497582':
  Set stream volume to max when userMasterVolume is set to true.
2014-12-01 19:53:55 +00:00
John Spurlock
21d68f4808 Merge "Volume: Improve inline volume controls used in settings." into lmp-mr1-dev 2014-12-01 17:06:14 +00:00
Jinsuk Kim
336cdb488f audioservice: system audio control in master volume mode
Volume control in master mode should be transformed to
CEC commands if system audio is activated to delegate
the control to the connected AV receiver.

Refactored to use the interface to CEC service for
both master and stream type volume control.

Bug: 18560079

Change-Id: I2aefdc94a1bc3091c14fab849f899a0dc37c47bc
2014-12-01 07:17:17 +00:00
Jean-Michel Trivi
1b3541d5ee AudioMix address and type, rule exclusion API, dynamic source
- Simplify API for defining an exclusion-based rule: don't define
  an exclusion rule, add instead a way to exclude a rule.
- API for defining rules for dynamic sources (rule match on capture
  preset).
- Verify mix type when creating AudioRecord or AudioTrack for a mix.
- Use hashcode of mix for generating the device address.
- AudioService dump prints info about registered policies.
- Annotate as SystemApi the audio policy-related APIs.
- Express mixing match and exclude rule constants as flags for
  future-proofness

Bug 16006090
Bug 16009464

Change-Id: I0dabe71204501acaffea7ef0ddbbab9700e1bd87
2014-11-30 14:33:29 -08:00
Wally Yau
da39290460 Set stream volume to max when userMasterVolume is set to true.
When useMasterVolume is set, we don't want to apply the volume
attenuation twice, once at the stream mixer and once at the master
volume control. It should only be applied once at the master volume
control.

Change-Id: Id5b1cf97571733515b5680c638f11cde8824cfc0
Fixed: b/18460548
2014-11-28 12:40:30 -08:00
John Spurlock
bcc1087af4 Volume: Improve inline volume controls used in settings.
- Make the system internal ringer mode change signal available to
   other system components via a standard intent, instead of a
   volume-controller-only binder call.
 - Update sysui to use new intent for icon policy.
 - Add proper muting state to the volumizer, to look more like
   the associated volume panel slider.
 - Add basic ringer mode state tracking for the notification-ring
   slider setting.

Bug: 17899613
Change-Id: Ie2df52edb070055ef59c74039162a0e785d2fdbb
2014-11-28 15:29:21 -05:00
Dongwon Kang
266143e1fb TIF: call tune() in HardwareSession
Background: The underlying passthrough TV input expects tune() command
to show video on the screen and call notifyVideoAvailable().

Bug: 18551619
Change-Id: I257db321c09d621e6bd3c0e69bfe0abfca5742a9
2014-11-28 19:40:36 +09:00
Sungsoo Lim
4e389e557e Missing Javadoc update while API review
Bug: 18550989
Change-Id: I766986fd429d58064fca6262a1c650cbcb19bddf
2014-11-28 16:57:16 +09:00
Jinsuk Kim
b62d4ee785 am f657463a: am c69c8dc1: am bc3226e2: Merge "Do not perform forceVolumeControlStream in master volume mode" into lmp-mr1-dev
* commit 'f657463a500e90acb2fa9991cd67629199ef7ab4':
  Do not perform forceVolumeControlStream in master volume mode
2014-11-26 21:45:22 +00:00
Jinsuk Kim
bc3226e21d Merge "Do not perform forceVolumeControlStream in master volume mode" into lmp-mr1-dev 2014-11-26 21:27:19 +00:00
Andy Hung
c3b7ab50b7 am e3566007: am feeaa0ba: am f32d06d8: Merge "Allow set loop and position before write for static AudioTracks" into lmp-mr1-dev
* commit 'e356600772be85c1170258fff2a516a31f896670':
  Allow set loop and position before write for static AudioTracks
2014-11-26 19:42:02 +00:00
Ryan Lothian
1e88cf0796 Fix broken @see javadoc in android.media.* classes
This CL fixes all android.media.* javadoc that includes an "ERROR(...)"
message when rendered to HTML.

Bug: 18537403
Change-Id: Ic60f7cfe4cf4961da163d955387d65a5d2011905
(cherry picked from commit d550f9028ee7f52018fbed3cfd2d0b18d6a7c4f0)
2014-11-26 18:49:01 +00:00
Ryan Lothian
22d93b599f Merge "Fix broken @see javadoc in android.media.* classes" 2014-11-26 18:48:32 +00:00
Eric Laurent
2706cb804a am 24a9ddde: am 29722231: am e511ddce: Merge "AudioService: use FEATURE_LEANBACK instead of FEATURE_TELEVSION." into lmp-mr1-dev
* commit '24a9ddde72262312d03fe733855660f2e61947b2':
  AudioService: use FEATURE_LEANBACK instead of FEATURE_TELEVSION.
2014-11-26 18:10:09 +00:00
Ryan Lothian
d550f9028e Fix broken @see javadoc in android.media.* classes
This CL fixes all android.media.* javadoc that includes an "ERROR(...)"
message when rendered to HTML.

Bug: 18537403
Change-Id: Ic60f7cfe4cf4961da163d955387d65a5d2011905
2014-11-26 18:04:45 +00:00
Lajos Molnar
fdc9e9de08 am d4604b4f: am c60a5d78: am 3ed95fe2: Merge "media: add support for 160-byte image info in MediaCodec" into lmp-mr1-dev
* commit 'd4604b4fd370fa54d94ec94e6137b093f9f3da8c':
  media: add support for 160-byte image info in MediaCodec
2014-11-26 12:09:56 +00:00
John Spurlock
97abe5040a am a2decb0e: am f74ae93c: am bc6f59a1: Merge "VolumeZen: Introduce internal vs external ringer mode." into lmp-mr1-dev
* commit 'a2decb0e4d50c68391b82e7acf6c425df2f30dd6':
  VolumeZen: Introduce internal vs external ringer mode.
2014-11-26 12:09:18 +00:00
Jinsuk Kim
57d766f533 Do not perform forceVolumeControlStream in master volume mode
The method should be no-op when in master volume mode.

Bug: 18250921

Change-Id: Iaab806db935ef97aa1124c3447e228d3eaef7584
2014-11-26 17:02:18 +09:00
Andy Hung
f32d06d855 Merge "Allow set loop and position before write for static AudioTracks" into lmp-mr1-dev 2014-11-26 02:04:45 +00:00
Eric Laurent
e511ddce43 Merge "AudioService: use FEATURE_LEANBACK instead of FEATURE_TELEVSION." into lmp-mr1-dev 2014-11-25 22:28:17 +00:00
Lajos Molnar
3ed95fe258 Merge "media: add support for 160-byte image info in MediaCodec" into lmp-mr1-dev 2014-11-25 22:09:36 +00:00
RoboErik
583f08d2d6 am 351ab57e: am a9031025: am d9bb296b: Merge "Delay calling onConnected until a session is set in MediaBrowser" into lmp-mr1-dev
* commit '351ab57e2538bbe98455661517bd0e4b7f104605':
  Delay calling onConnected until a session is set in MediaBrowser
2014-11-25 18:50:28 +00:00
John Spurlock
661f2cf458 VolumeZen: Introduce internal vs external ringer mode.
Stabilize mapping between ringer-mode=silent and zen=priority
by keeping track of two ringer modes:
 - Internal ringer mode: Used for underlying stream muting
 - External ringer mode: Reported to clients

The mapping between external ringer mode + zen is:
 - normal = all
 - vibrate = all
 - silent = priority (read-write) or none (read)

Changes include:
 - Remove "zen check" from audio service, back to audio
   service having no knowledge of zen.
 - Maintain a new external ringer mode in audio service,
   this is the ringer mode reported through AudioManager
   to callers, also mapped to the change intent.
 - Introduce a "ringer mode delegate" to the local
   audio manager interface, responsible for observing
   external / internal mode changes, and making changes
   if necessary.
 - Internal ringer mode changes are still interesting
   to the volume dialog, wire up a callback through
   the existing IVolumeController interface.
 - On devices without vibration, the mapping is the same
   but since no ringer mode change is possible, disable
   the icon toggle and remove the mute icon when volume=0.
 - On devices with vibration, volume down presses should
   pulse the vibrate icon (and vibrate) as a hint that this
   is as low as the device can go using the keys.  Since
   the mechanics are similar to the existing zen=none hint,
   pull into shared helper.
 - Log ringer mode changes to the zen log, include calling
   package information for issue diagnosis.
 - Include whether vibration is supported in the audio service
   dump.
 - Update the status bar icon policy to use the internal ringer
   mode, not the external mode (for vibrate icon).
 - Update the "Muted by <x>" logic, include current suppressor
   in dumpsys, ensure suppression icon is enabled & !clickable,
   regardless of zen mode.

Bug: 17884168
Bug: 15471679
Bug: 16824970
Change-Id: Ia7d3bb23ce6d1e37b24fb6521d1c1ab9bb8f60c0
2014-11-25 13:20:46 -05:00
Jean-Michel Trivi
17bee9ca7d am e19bb5c0: am 213472d7: am 8c816096: Merge "Add support for audio focus locking" into lmp-mr1-dev
* commit 'e19bb5c092309fad108e556e2e76ab13c0c17786':
  Add support for audio focus locking
2014-11-25 17:55:48 +00:00
Lajos Molnar
5037f945cd media: add support for 160-byte image info in MediaCodec
Some 64-bit compilers now create 160-byte image structures.

Bug: 18513091
Change-Id: I355714affaac0fde0b03578d13ab8f373dd5aa81
2014-11-24 21:54:27 -08:00
Andy Hung
78bfa6322b Allow set loop and position before write for static AudioTracks
Allow setPlaybackHeadPosition and setLoopPoints in STATE_NO_STATIC_DATA
for consistency with other setters and older Android versions (JB).

Bug: 18217633
Change-Id: Id8ada3056540c4dfcb89f8afa887159e48db0263
2014-11-24 17:29:52 -08:00
RoboErik
d9bb296b56 Merge "Delay calling onConnected until a session is set in MediaBrowser" into lmp-mr1-dev 2014-11-24 23:04:59 +00:00
RoboErik
d64c425f32 Delay calling onConnected until a session is set in MediaBrowser
This will delay all calls to onConnected from the MediaBrowserService
until a session token has been set. This also requires making it an
exception to try setting the session twice.

bug:18052336
Change-Id: Iecf186c53364183e1696af83a855c8db3294a5d0
2014-11-24 12:35:20 -08:00
Jean-Michel Trivi
958876fe55 Add support for audio focus locking
New API for a registered AudioPolicy to lock/unlock the audio
  focus stack and prevent any new grant of focus, similar to
  the way phone calls behave.

Bug 16010554

Change-Id: If34a58ca9bd43d5479e94a2a7b540750b4c6efe9
2014-11-24 10:46:12 -08:00
Lajos Molnar
7d612f0deb am 0b10f9c0: am 63845f1b: am c398f175: Merge "media: fix isSupportedFormat for integer frame rate" into lmp-mr1-dev
* commit '0b10f9c0ab9a6c4003a2a300c2a38f7ca2144fdb':
  media: fix isSupportedFormat for integer frame rate
2014-11-24 18:12:56 +00:00
Michael Wright
9e8d9aca07 Correctly iterate through MediaProjection callbacks.
Bug: 18393320
Change-Id: I81e46b516e4e94b04a1b8363805b8bb633cb822e
2014-11-21 14:27:06 -08:00
Jean-Michel Trivi
29e12f25d8 am c229c393: am 09ff9125: Merge "Convert record channel mask for dynamic mix" into lmp-mr1-dev automerge: 14b9092
* commit 'c229c3935c2b3b3ccee459d84b81d9c84ac8b3ca':
  Convert record channel mask for dynamic mix
2014-11-21 02:58:20 +00:00
Jae Seo
9581094970 am 12c03e33: am f66f3052: Merge "TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView." into lmp-mr1-dev
automerge: cfaac8d

* commit 'cfaac8d1549430cc89e704602504413a5d59352c':
  TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView.
2014-11-21 02:21:15 +00:00