8605 Commits

Author SHA1 Message Date
Marco Nelissen
6cd6110773 Fix printf format
Change-Id: Ied2f10bb59fe0e13b23bf1f9913ab3b081348a28
2015-01-27 12:17:48 -08:00
Marco Nelissen
e74da38e21 Merge "Make SoundPool use MediaCodec" 2015-01-27 17:49:02 +00:00
Elliott Hughes
35af2c3534 Add missing <string.h> includes.
Change-Id: I188bfe1388fa49f6f79d247aa0d0f4fb089de503
2015-01-25 08:33:36 -08:00
Marco Nelissen
372be8970c Make SoundPool use MediaCodec
Bug: 18239054
Change-Id: Ia144fc1bbb0d2787638ee972e2224339b4965310
2015-01-23 12:49:36 -08:00
Jean-Michel Trivi
6a64a9cd26 Merge "Prevent AudioService dead lock issue." 2015-01-16 17:23:36 +00:00
seunghwan.hong
4fe7795347 Prevent AudioService dead lock issue.
Dead lock sequence:
 1. called onSetA2dpConnectionState()
  1-1. synchronized(mConnectedDevices)
 2. called onServiceDisconnected()
  2-1. synchronized(mA2DPAvrcpLock)
 3. waiting to lock(mConnectedDevices) in onServiceDisconnected()
 4. waiting to lock(mA2DPAvrcpLock) in onSetA2dpConnectionState()

========================================================================================
- watchdog issue
----- pid 3306 at 2014-10-14 16:15:12 -----
Cmd line: system_server

"main" prio=5 tid=1 MONITOR
  - waiting to lock <0x4343e9b0> (a java.util.HashMap) held by tid=46 (AudioService)
      at android.bluetooth.BluetoothA2dp$2.onServiceDisconnected(BluetoothA2dp.java:529)

"AudioService" prio=5 tid=46 MONITOR
      - waiting to lock <0x42ab7a58> (a java.lang.Object) held by tid=1 (main)
========================================================================================

Signed-off-by: Seunghwan Hong <seunghwan.hong@lge.com>

Change-Id: I99e061c07be01aabcd26786ef2ebb71f46717b93
2015-01-13 08:22:26 +09:00
Lajos Molnar
7f94b52fc7 Merge "MediaCodec/Image: handle null cropRect correctly" 2015-01-10 01:12:33 +00:00
Lajos Molnar
98840f2bd2 Merge "media: add support for 160-byte image info in MediaCodec" 2015-01-10 01:10:24 +00:00
Narayan Kamath
5137415e39 Merge "Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod." 2015-01-06 10:06:06 +00:00
Haitao Feng
8bd6a203ca Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod.
CallStaticVoidMethod is varargs function, and calling it with
a literal 0 like CallStaticVoidMethod(..., 0) will treat the
argument as a 4 byte int in both 32 and 64 bit processes.

This is incorrect for pointer arguments where NULL should be
used instead.

Reviewed-by: Liao, Bruce <bruce.liao@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>

Change-Id: I9d700d3790a80dbee6826f64baf9ef5d81ca390f
2015-01-06 09:57:13 +00:00
Narayan Kamath
ea4cdd4454 Merge "Race-condition in SoundPool during release" 2015-01-05 17:57:27 +00:00
Ying Wang
34db51cdd7 Cleanup Obsolete LOCAL_PRELINK_MODULE.
Bug: 18675947
Change-Id: If4909c5f8495136d381b289a3d55e811313abccc
2014-12-16 12:45:49 -08:00
Chih-hung Hsieh
4c23a0ec16 Merge "Adjust format strings to work on both 32-bit and 64-bit builds" 2014-12-11 20:49:30 +00:00
Lajos Molnar
9d6fa062a5 Merge "media: fix isSupportedFormat for integer frame rate" 2014-12-08 18:02:41 +00:00
Bernhard Rosenkränzer
46c82b4cd2 Adjust format strings to work on both 32-bit and 64-bit builds
Adjust format strings to not produce Clang warnings in both 32-bit and
64-bit builds

Change-Id: I76c29d8d5d0fb4b5e9d9518077652370ffe9e871
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-12-05 16:14:07 -08:00
Lajos Molnar
24ffac0135 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-12-04 16:33:57 -08:00
Lajos Molnar
32d8cc1429 media: fix isSupportedFormat for integer frame rate
Bug: 18473065
Change-Id: I670cc043d3cb117c26921cb639ff9eecc8f14b0a
2014-12-04 16:29:30 -08:00
Lajos Molnar
cea639cf3f 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-12-04 16:28:33 -08:00
Lajos Molnar
0ca248599c media: allow full range of Vorbis sampling rates
Bug: 18615604
Change-Id: I51f0c5c81145b94626f2b7e4505b905b63a572bf
2014-12-04 16:27:39 -08:00
Chih-hung Hsieh
ccce6e0f9f Merge "Add -Wno-unused-parameter to LOCAL_CFLAGS" 2014-12-04 01:04:09 +00: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
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
Andreas Gampe
ed368be792 Merge "Frameworks/base: Wall Werror in media/tests" 2014-11-21 17:39:33 +00: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
Marco Nelissen
97069dd4fd Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 10:05:31 -08:00
Dan Albert
ff1d8a6635 Move frameworks/base over to libc++.
Bug: 15193147
Change-Id: I96109d2d383f0c8a4aaa611f29fcf887afb3c69e
2014-11-12 11:22:20 -08:00
Dariusz Iwanoczko
ed86e19af2 Race-condition in SoundPool during release
There is race between SoundPoolThread and SoundPool / AudioManager
threads during releasing SoundPool.
AudioManager deletes a global reference before setting SoundPool
callback to NULL. If, at that time, a call to the SoundPool::notify
fuction happens then mCallback is valid but mUserData is not.

The following log will show up to indicate the problem:
  JNI ERROR (app bug): accessed deleted global reference 0xXXXXXXXX

This fix is to clear the SoundPool's callback before releasing global
reference.

Change-Id: I5e6d647edc0444340db879428048e2c0a068a8b4
2014-11-11 13:12:53 +01:00
Andreas Gampe
a4a13480dd Frameworks/base: Wall Werror in media/tests
Turn on -Wall -Werror in media/tests. Fix warnings.

Change-Id: I7177e795d4896f62dfa0b0a5990386e564763384
2014-11-10 18:44:43 -08:00
Andreas Gampe
6957369d13 Merge "Frameworks/base: Wall Werror in media/jni" 2014-11-11 02:30:00 +00:00
Andreas Gampe
5a15d0d31b Frameworks/base: Wall Werror in media/jni
Turn on -Wall -Werror in media/jni. Fix warnings.

Change-Id: I9da54ad379d8172ee535b52ee2b0637a2533f4e3
2014-11-10 18:19:40 -08:00
Andreas Gampe
e5160e7e59 Frameworks/base: Wall Werror in media/mca
Turn on -Wall -Werror in media/mca. Fix warnings.

Change-Id: I2a43df1d0639babe240b91942a5ea3f8babdef93
2014-11-10 17:49:02 -08:00
RoboErik
e55300b14a am 2fa604fc: Merge "Add missing break to switch statement" into lmp-dev
* commit '2fa604fc59ded63a416066a0bc66f63069cae7f3':
  Add missing break to switch statement
2014-10-20 22:13:58 +00:00
RoboErik
59759903a9 Add missing break to switch statement
the skip to queue item case was falling through when it shouldn't.

bug: 18058515
Change-Id: Ica20b59efad12a58ad16501146fc9a0d4595e184
2014-10-20 14:56:32 -07:00
RoboErik
c0d8bc38e1 am 578fbe89: Merge "Set the metadata rating correctly in RCC" into lmp-dev
* commit '578fbe898f1652b3166bd4e20647572dec9dfb14':
  Set the metadata rating correctly in RCC
2014-10-20 19:10:42 +00:00
RoboErik
38696ba77d Set the metadata rating correctly in RCC
We weren't setting the ratings in the new MediaMetadata from RCC.
This adds some code to set them correctly.

bug:18051829
Change-Id: I358eeb2b25b3fb9bd9a5d207eb3314bb2cdff25e
2014-10-20 09:48:13 -07:00
Marco Nelissen
9e93d37154 am 36c931b3: Merge "Also consider secondary storage when verifying paths" into lmp-dev
* commit '36c931b31a15b4ed740c861ec34b7e6573cfd32e':
  Also consider secondary storage when verifying paths
2014-10-16 00:42:04 +00:00
Marco Nelissen
36c931b31a Merge "Also consider secondary storage when verifying paths" into lmp-dev 2014-10-16 00:38:03 +00:00
John Spurlock
67541eada7 am b2344c81: Merge "Leave zen when apps set ringer-mode = non-silent (normal/vibrate)." into lmp-dev
* commit 'b2344c81bcf49129d303a2919cfffd7a720c261b':
  Leave zen when apps set ringer-mode = non-silent (normal/vibrate).
2014-10-15 23:57:50 +00:00
Marco Nelissen
c1fda12823 Also consider secondary storage when verifying paths
Bug: 17673184
Bug: 17982103
Change-Id: Ief14c7776b02983191c46774fa7e4c76380de58d
2014-10-15 15:36:50 -07:00
John Spurlock
e5b42d97f6 Leave zen when apps set ringer-mode = non-silent (normal/vibrate).
Apps can end up in priority mode by setting ringer-mode = silent.

Now they can leave priority mode by setting ringer-mode = non-silent.
  (normal or vibrate)

Bug: 17884168
Change-Id: I54c853885f4ae9ee618041dd7ac6ab0663fc7b37
2014-10-15 13:32:31 -04:00
Chong Zhang
c81cccf8ab am a6ae8ba4: MediaHTTPConnection: do not use proxy for localhost
* commit 'a6ae8ba4a59f3f893fe8893335e7517388123c10':
  MediaHTTPConnection: do not use proxy for localhost
2014-10-09 12:52:00 +00:00
Chong Zhang
a6ae8ba4a5 MediaHTTPConnection: do not use proxy for localhost
Bug: 17681512
Change-Id: Iba25d89636d8f96efc0eb90e0dd7a135c82ff16a
2014-10-09 02:07:40 +00:00
Jon Eklund
318f0fe43b AudioService: Fix monitorRotation for landscape applications
Current implmentation only sends rotation updates on orientation
changes, so does not handle direct 0<->180 or 90<->270 transitions.

Update rotation based on an OrientationEventListener instead of
Intent.ACTION_CONFIGURATION_CHANGED

Bug 17606902

Change-Id: I01dfcd1c587f5b2e8a96365c2389782ad77936ef
2014-10-08 01:06:15 +00:00
Jean-Michel Trivi
77bea65432 am dce7a427: Merge "Full volume on remote submix for apps that need it" into lmp-dev
* commit 'dce7a427593c6e11277d9e3075ab027512923276':
  Full volume on remote submix for apps that need it
2014-10-07 16:16:49 +00:00
Jean-Michel Trivi
ba5270b887 Full volume on remote submix for apps that need it
If an AudioRecord is created with the "fixedVolume" tag
  when recording from REMOTE_SUBMIX, treat the
  device DEVICE_OUT_REMOTE_SUBMIX as a fixed full volume
  device during the recording. Also register a death
  handler during the recording.
  Otherwise this is a no-op.

Bug 17635294

Change-Id: I8d26fe777047126f34308e1e1b7ac28ba269ad89
2014-10-07 09:09:41 -07:00
RoboErik
1178efb62c am 7a60cdbd: Merge "Fix regression in RCC.editMetadata(false)" into lmp-dev
* commit '7a60cdbd0989fdc262f7838b26c551a3417b7edb':
  Fix regression in RCC.editMetadata(false)
2014-10-03 21:02:51 +00:00
RoboErik
51c07bc0bf Fix regression in RCC.editMetadata(false)
Found a very simple fix. Just set the cached metadata so we have
it to copy over when editMetadata(false) is called.

bug:17796693
Change-Id: Ib27f0c3d28e7f2a3c7d9495697f36c8045e2bcf6
2014-10-03 12:45:58 -07:00
Glenn Kasten
e27002d77f resolved conflicts for merge of 1c92912b to lmp-dev-plus-aosp
Change-Id: I5a57218e81dff86f46af7067d47f7af816e2d12c
2014-10-02 10:19:12 -07:00