9173 Commits

Author SHA1 Message Date
RoboErik
351ab57e25 am a9031025: am d9bb296b: Merge "Delay calling onConnected until a session is set in MediaBrowser" into lmp-mr1-dev
* commit 'a90310256476868d51811eb41c2c7f9b609dc0dc':
  Delay calling onConnected until a session is set in MediaBrowser
2014-11-25 18:43:37 +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
Jean-Michel Trivi
e19bb5c092 am 213472d7: am 8c816096: Merge "Add support for audio focus locking" into lmp-mr1-dev
* commit '213472d7384c9d8096748f3cd9305ef49342dbcf':
  Add support for audio focus locking
2014-11-25 17:49:46 +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
chh
fc54573373 Merge "Remove unused variables and functions, don't warn about unused parameters" 2014-11-25 00:37:12 +00:00
Bernhard Rosenkränzer
99d61edfda Fix class vs. struct mismatch
Don't refer to classes as structs and view versa -- causes warnings in
clang (in code built with -Werror)

Change-Id: I4d7f461bcf6fe4e43a14ad2f28ee0e0ddea95abc
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-24 16:18:15 -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
Lajos Molnar
0b10f9c0ab am 63845f1b: am c398f175: Merge "media: fix isSupportedFormat for integer frame rate" into lmp-mr1-dev
* commit '63845f1b5853aa3a84df4a161f6c8e96b98fba8a':
  media: fix isSupportedFormat for integer frame rate
2014-11-24 18:05:46 +00:00
Bernhard Rosenkränzer
57f637279a Add -Wno-unused-parameter to LOCAL_CFLAGS
Some JNI functions ignore the JNI environment and class information, but
still take the parameters -- causing a build failure with clang (and gcc
with -Wextra enabled). Ignore this.

Change-Id: I049fcf65991b19d2416fce105699311803b43cfc
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-24 03:02:03 +01:00
Bernhard Rosenkränzer
4048a4bcb1 Remove unused variables and functions, don't warn about unused parameters
Remove unused variables and static functions clang complains about,
disable warnings about unused parameters (needed for clang and for gcc
with -Wextra enabled)

Change-Id: I76a22cd0158b3c7375c54e3d4d15bc1ac448591e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-23 22:24:32 +01:00
Michael Wright
9e8d9aca07 Correctly iterate through MediaProjection callbacks.
Bug: 18393320
Change-Id: I81e46b516e4e94b04a1b8363805b8bb633cb822e
2014-11-21 14:27:06 -08:00
Andreas Gampe
5e88177ecb Merge "resolved conflicts for merge of 09910723 to lmp-mr1-dev-plus-aosp" into lmp-mr1-dev-plus-aosp
automerge: 935fd8d

* commit '935fd8d0b1c7953e6e6610aea0c2d09d0fa8ba97':
  Frameworks/base: Wall Werror in media/tests
2014-11-21 18:27:52 +00:00
Andreas Gampe
307218c7f2 resolved conflicts for merge of 09910723 to lmp-mr1-dev-plus-aosp
Change-Id: I4b47723a9314bf9bef08e68ce269038d0d50c5d9
2014-11-21 09:57:52 -08:00
Andreas Gampe
ed368be792 Merge "Frameworks/base: Wall Werror in media/tests" 2014-11-21 17:39:33 +00: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
Jean-Michel Trivi
c229c3935c am 09ff9125: Merge "Convert record channel mask for dynamic mix" into lmp-mr1-dev
automerge: 14b9092

* commit '14b909241fe4f43ca481e9cd367dd641fe395ff1':
  Convert record channel mask for dynamic mix
2014-11-21 02:49:43 +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
Jae Seo
d97dc701ba am 91ab2665: am 52bfa332: Merge "TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()" into lmp-mr1-dev
automerge: 7d97be9

* commit '7d97be9dbc8c220fa56e3665deb9b978a12ed71a':
  TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()
2014-11-21 01:59:00 +00:00
RoboErik
24228295e2 am 3ef3a9bf: am ac4af18b: Merge "Handle volume events on master volume devices correctly" into lmp-mr1-dev
automerge: bbf0f66

* commit 'bbf0f662a8a54e6c8c49a58b7a7273fe8756ff45':
  Handle volume events on master volume devices correctly
2014-11-21 01:49:48 +00:00
RoboErik
fdc7f747f2 am 50b02d61: am 5b881d43: Merge "Scale bitmaps in metadata sent to the system" into lmp-mr1-dev
automerge: 216c089

* commit '216c089834e92733055a17bcade7ca1971677b49':
  Scale bitmaps in metadata sent to the system
2014-11-21 01:48:44 +00:00
Jae Seo
cfaac8d154 am 12c03e33: am f66f3052: Merge "TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView." into lmp-mr1-dev
* commit '12c03e3386db46f2452dd7642771adad1d03ce5c':
  TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView.
2014-11-21 01:37:51 +00:00
Jae Seo
7d97be9dbc am 91ab2665: am 52bfa332: Merge "TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()" into lmp-mr1-dev
* commit '91ab2665ed73a37ac9dda52e7d440784b1d1011e':
  TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()
2014-11-21 00:44:27 +00:00
RoboErik
bbf0f662a8 am 3ef3a9bf: am ac4af18b: Merge "Handle volume events on master volume devices correctly" into lmp-mr1-dev
* commit '3ef3a9bff37d2fbe216110e025f683923c58ddba':
  Handle volume events on master volume devices correctly
2014-11-21 00:43:39 +00:00
RoboErik
216c089834 am 50b02d61: am 5b881d43: Merge "Scale bitmaps in metadata sent to the system" into lmp-mr1-dev
* commit '50b02d61dca310dc8acaf83d25d919b436f6da43':
  Scale bitmaps in metadata sent to the system
2014-11-21 00:43:33 +00:00
Lajos Molnar
a4fcb62a22 media: fix isSupportedFormat for integer frame rate
Bug: 18473065
Change-Id: I670cc043d3cb117c26921cb639ff9eecc8f14b0a
2014-11-20 16:17:43 -08:00
Jeff Tinker
2670d5ad59 Merge "Fix Crash when sending null in HashMap to getKeyRequest" 2014-11-20 23:29:08 +00:00
Dan Albert
47249598cb am 582bdf9a: am d8c169fe: am 0c437fd3: Merge "Add appropriate casts for char16_t."
* commit '582bdf9a5961a32de27556832e23e0611c4d1cbb':
  Add appropriate casts for char16_t.
2014-11-20 23:19:06 +00:00
Dan Albert
582bdf9a59 am d8c169fe: am 0c437fd3: Merge "Add appropriate casts for char16_t."
* commit 'd8c169fedf883491e46b354484909694fd52cfaf':
  Add appropriate casts for char16_t.
2014-11-20 23:00:56 +00:00
Jean-Michel Trivi
09ff91255e Merge "Convert record channel mask for dynamic mix" into lmp-mr1-dev 2014-11-20 22:02:15 +00:00
Jean-Michel Trivi
8dc1031453 Convert record channel mask for dynamic mix
When creating the AudioRecord instance for a dynamic mix, convert
  the output channel mask of the mix to an input channel mask
  to be used by the AudioRecord instance through which the
  mixed audio is rerouted.

Bug 16009464

Change-Id: I3addbe85339f6f06b69acc3f9b8e2a765e5d7305
2014-11-20 12:53:23 -08:00
Dan Albert
6698749dd4 Add appropriate casts for char16_t.
C++11 defines a real char16_t, which is not implicitly convertible to
uint16_t (and by extension jchar). Add casts as needed.

Bug: 18300613
Change-Id: I00752002ef2e938bdb57f70947e8fd53ec103293
2014-11-20 11:47:40 -08:00
Jae Seo
f66f3052a7 Merge "TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView." into lmp-mr1-dev 2014-11-20 19:03:03 +00:00
Jae Seo
52bfa3328f Merge "TIF: enhance documentation for TvInputManager.getAvailableStreamConfigs()" into lmp-mr1-dev 2014-11-20 18:52:16 +00:00
Jeff Tinker
5bec026635 Fix Crash when sending null in HashMap to getKeyRequest
Merge of partner https://android-review.googlesource.com/#/c/115665

Change-Id: I50235dc09be584165155019a70708377ca9688a0
2014-11-20 18:39:59 +00:00
RoboErik
ac4af18bbb Merge "Handle volume events on master volume devices correctly" into lmp-mr1-dev 2014-11-20 17:59:14 +00:00
RoboErik
b9c87fb403 Scale bitmaps in metadata sent to the system
This scales down any MediaMetadata bitmaps that are sent to the system
through MediaSession.

bug:18114918
bug:18084448
Change-Id: Ib7b040cd8245108ad2dd56afe2499290d2b49f51
2014-11-19 17:27:43 -08:00
Dongwon Kang
5f3cb4a584 TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView.
Background: because the hole-punching code lives only in SurfaceView,
the overlay view can be covered by the application if the TV input
changes the position of SurfaceView via Session.layoutSurface().
This change punches a hole as large as TvView so that the underlying
overlayview can be shown properly.

Bug: 18420642
Change-Id: If9a829367083ce2002a4c4a4e4a4bbb623f7ad96
2014-11-19 20:27:55 +09:00
Eric Laurent
0b03f9909b AudioService: use FEATURE_LEANBACK instead of FEATURE_TELEVSION.
Bug: 18271714.
Change-Id: I2fa6f44ef991aec5a980d70f698813468e7540c6
2014-11-18 18:08:02 -08:00
Jae Seo
8923735f28 am e0177a28: am 59f79d9b: am 3a9a53cb: Merge "TIF: make the tune request handling more efficient" into lmp-mr1-dev
* commit 'e0177a28a342bac14edfc4dc502603b886eea193':
  TIF: make the tune request handling more efficient
2014-11-18 20:21:55 +00:00
John Spurlock
1b9057169e am 3e846cb5: am 313ec49f: am ce66d35f: Merge "Volume: Don\'t allow ringer volume of 0 exiting ringer mode." into lmp-mr1-dev
* commit '3e846cb53c6f6983e5309a4a8d5a1b54a1ac3d7c':
  Volume: Don't allow ringer volume of 0 exiting ringer mode.
2014-11-18 20:21:45 +00:00
RoboErik
519c7744b5 Handle volume events on master volume devices correctly
We weren't passing volume events to the master volume correctly on
devices that only use a master volume. This fix checks if the device
only has a master volume and adjusts the master volume instead of the
stream's volume if that's the case.

bug:18305790
Change-Id: Iec35e0a7dc59e6d73c9dfc88da324660bb15b1f3
2014-11-18 11:00:34 -08:00
Jae Seo
e0177a28a3 am 59f79d9b: am 3a9a53cb: Merge "TIF: make the tune request handling more efficient" into lmp-mr1-dev
* commit '59f79d9b2516abdebc99ce2a673fd4411a745f66':
  TIF: make the tune request handling more efficient
2014-11-18 18:22:22 +00:00
John Spurlock
3e846cb53c am 313ec49f: am ce66d35f: Merge "Volume: Don\'t allow ringer volume of 0 exiting ringer mode." into lmp-mr1-dev
* commit '313ec49f32c9a387abdae5157b2b75c31173831f':
  Volume: Don't allow ringer volume of 0 exiting ringer mode.
2014-11-18 18:22:10 +00:00
Jae Seo
3a9a53cb75 Merge "TIF: make the tune request handling more efficient" into lmp-mr1-dev 2014-11-18 18:01:47 +00:00
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