8927 Commits

Author SHA1 Message Date
Marco Nelissen
375e21f811 Merge "Sometimes the application context is null" 2015-04-28 15:26:54 +00:00
Marco Nelissen
29f16933a8 Sometimes the application context is null
when called from systemui.

Bug: https://code.google.com/p/android/issues/detail?id=152173
Change-Id: I27153a48d7edce7006517507d813e24ce6f63a7d
2015-04-22 13:11:30 -07:00
Marco Nelissen
ba43f7e914 Merge "Revert "Sometimes the application context is null"" 2015-04-22 20:08:38 +00:00
Marco Nelissen
360f2ab62d Revert "Sometimes the application context is null"
This reverts commit d86281cb3da685672d89f964228980f6753adcae.

Change-Id: Icaf8e1e4812f64060066331f9000be15c134d1d2
2015-04-22 20:07:15 +00:00
Marco Nelissen
0601a280e5 Merge "Sometimes the application context is null" 2015-04-22 19:06:47 +00:00
Marco Nelissen
d86281cb3d Sometimes the application context is null
when called from systemui.

Bug: https://code.google.com/p/android/issues/detail?id=152173
Change-Id: Ic7b98e39fd9ad2436b855cf9f7f53d3e7a1948c0
2015-04-21 08:28:04 -07:00
Alex Klyubin
6db04b369e Make MediaPlayer fail fast on UnknownServiceException.
This makes MediaPlayer's network streaming code fail fast when an
UnknownServiceException is encountered. This currently occurs when the
application declares that it does not perform cleartext network
traffic and tries to load media over cleartext HTTP. Without this CL,
MediaPlayer blocks for 30 seconds because it treats this error as
recoverable and goes into a ten retry loop with a three second delay
before each retry.

The result at MediaPlayer client level is
MediaPlayer.MEDIA_ERROR_UNKNOWN error. This error code is used for
non-recoverable situations such as when an invalid redirect is
encountered or the destination is unreachable.

Bug: 20026006
Change-Id: I10f0dadb7740902f8c7c73d0df96cfff31f08ada
2015-04-20 10:11:57 -07:00
Andreas Gampe
3d33314e03 Merge "Frameworks/base: Use equals for Integer comparison" 2015-03-16 19:10:40 +00:00
Andreas Gampe
5c5978985a Frameworks/base: Use equals for Integer comparison
Integer == is dangerous, as equal objects may not be identical
objects. In fact, MediaFormat.setInteger was creating a new object
every time.

Change MediaFormat.setInteger and setLong to use valueOf, which
may reuse returned objects.

Change-Id: Iedcc6003adbf05c0c870aa4b3ada7f181a5b870e
2015-03-15 15:45:15 -07:00
Jeff Tinker
62632e25f5 Merge "Handle NULL keys and NULL values in MediaDrm JNI HashMap" 2015-03-13 18:20:43 +00:00
Marco Nelissen
926ebb860a Fix context leak
Using an activity context with AudioManager could cause that context
to be held on to longer than desired, for example if the caller
acquired audio focus but never abandoned it. Fix acquire/abandon in
VideoView, and use the application context in AudioManager to mitigate
the issue for other misbehaving code.

Bug: https://code.google.com/p/android/issues/detail?id=152173
Change-Id: I0fb8390207422c784800dda25b1f2c03d4574bcd
2015-03-11 10:00:28 -07:00
Narayan Kamath
c2826fb922 am 3d333c74: Merge "Fix typos in AudioManager javadoc"
* commit '3d333c745f928ca1595aca111d9938fa3cf3e282':
  Fix typos in AudioManager javadoc
2015-03-10 15:23:06 +00:00
Eemi Haukkala
bc68256fea Fix typos in AudioManager javadoc
The ACTION_HDMI_AUDIO_PLUG constant's description
had spelled "HDMI" as "HMDI" and was missing a
period. Fixes issue 93726.

Change-Id: Idfd5352dba022afcd81bc9e50864fc6e95c661db
Signed-off-by: Eemi Haukkala <eemi.haukkala@gmail.com>
2015-03-10 15:10:05 +00:00
Marco Nelissen
fb14e77f45 am 6da3cc59: am 396f131d: Merge "Fix memory leak"
* commit '6da3cc59a0e77e723a8413d2443b0f1bc5821b03':
  Fix memory leak
2015-02-11 00:00:57 +00:00
Marco Nelissen
06524dccbc Fix memory leak
Change-Id: Id691f9b32f9daeb23a01b17c5418b4d74a294cda
2015-02-10 15:45:23 -08:00
Chong Zhang
3968f0c2df am 6cad6513: Merge "reset col position to 1 on row PAC" into lmp-mr1-dev
automerge: eceae03

* commit 'eceae03f6a21b36baddabe4ca5a2c1d9d238240a':
  reset col position to 1 on row PAC
2015-02-06 03:17:36 +00:00
Chong Zhang
6cad6513e0 Merge "reset col position to 1 on row PAC" into lmp-mr1-dev 2015-02-06 02:06:24 +00:00
Chong Zhang
6286f8ec05 reset col position to 1 on row PAC
bug: 19284568
Change-Id: I7d439027ab6411bcd5c149580babee80dc5f9478
2015-02-05 16:46:06 -08:00
Elliott Hughes
4c49b1fb77 am b2d7ca7c: am fd2c1307: Merge "Fix build."
* commit 'b2d7ca7c6ffbb460dd8a8f8cbac8b627a3e27718':
  Fix build.
2015-02-04 20:37:59 +00:00
Elliott Hughes
f953ca2ec8 Fix build.
Change-Id: Ic14b6de7e7e58ce42ae4cc5ca945e4896e3b7b8f
2015-02-04 12:24:21 -08:00
Wonsik Kim
b86a45588a am 015fdf39: Merge "audio: allow audio port cache update even when audio patches contain invalidated sources/sinks" into lmp-mr1-dev automerge: d7310bd
* commit '015fdf392388f1bed3298f9f44012c1a82d7c1a1':
  audio: allow audio port cache update even when audio patches contain invalidated sources/sinks
2015-02-03 23:52:42 +00:00
Wonsik Kim
b561ccedd8 audio: allow audio port cache update even when audio patches contain invalidated sources/sinks
When an audio device disconnects from Android, custom audio patches
containing the device become invalidated.
AudioManager::updateAudioPortCache() used to fail in that case, but
it causes onAudioPortListUpdated() event never gets called so that
the creator of the custom audio patch cannot update it. Let
updateAudioPortCached() succeed even in the case so that the entity
that created the audio patch can get notified.

Bug: 18909299
Change-Id: If4f6ed73f69213d792117fb42aec103ae2e50b79
2015-01-31 01:51:28 +00:00
Lajos Molnar
df876a110c Merge "ImageReader: add support for compatible flexYUV buffers" into lmp-mr1-dev automerge: 8514766
automerge: 2a8dc00

* commit '2a8dc00eedeb2b8a9fa3560d8afa4cfd7c17d395':
  ImageReader: add support for compatible flexYUV buffers
2015-01-29 08:02:53 +00:00
Lajos Molnar
4fb442617c ImageReader: add support for compatible flexYUV buffers
Bug: 17906609
Change-Id: Ia21aff632b9a92f4e391b3917a7774af46fd81a0
2015-01-28 17:34:23 -08:00
Jae Seo
49801634e4 am 4b1e5814: am 71191442: TIF: Do not call session callbacks when the session is already released
* commit '4b1e5814d18dae8f2581cf702da4b4e1de0c3eb4':
  TIF: Do not call session callbacks when the session is already released
2015-01-29 00:46:25 +00:00
Jae Seo
7119144218 TIF: Do not call session callbacks when the session is already released
Bug: 19146382
Change-Id: I5592d4bf033478e5e5e1013bd2ad5ea572df44dd
2015-01-28 15:50:08 -08:00
Marco Nelissen
2c2415a552 am 3ea395dd: am 4e853598: Merge "Fix printf format"
* commit '3ea395ddc7785bf8fb6df1e5e6ed142c9336a7eb':
  Fix printf format
2015-01-27 20:33:09 +00:00
Marco Nelissen
6cd6110773 Fix printf format
Change-Id: Ied2f10bb59fe0e13b23bf1f9913ab3b081348a28
2015-01-27 12:17:48 -08:00
Marco Nelissen
6e14c5705c am 99985d98: am e74da38e: Merge "Make SoundPool use MediaCodec"
* commit '99985d98c23b32acc0014031d7b88ee4eed21a4b':
  Make SoundPool use MediaCodec
2015-01-27 18:28:53 +00:00
Matthew Xie
e213c6813e am 46c3304a: am 485813a0: Merge "Delay the second message for 30ms more than the last message for a2dp" into lmp-mr1-dev
* commit '46c3304aed2cabb592e499b0b3de56a312e1d67f':
  Delay the second message for 30ms more than the last message for a2dp
2015-01-27 18:22:57 +00:00
Matthew Xie
485813a00c Merge "Delay the second message for 30ms more than the last message for a2dp" into lmp-mr1-dev 2015-01-27 18:13:40 +00:00
Marco Nelissen
e74da38e21 Merge "Make SoundPool use MediaCodec" 2015-01-27 17:49:02 +00:00
Mike Lockwood
2d1e078ac4 am 5ac22aa6: am 2b144a16: Merge "MTP: Fix partial implementation of 5 new audio specific properties" into lmp-mr1-dev
* commit '5ac22aa60f773917981f42e64fbc28615871fd3e':
  MTP: Fix partial implementation of 5 new audio specific properties
2015-01-26 19:10:44 +00:00
Elliott Hughes
f51d65ade0 Merge "Add missing <string.h> includes." automerge: 82a1a2c
automerge: 86b48b3

* commit '86b48b3f8056a8efa6857d87dd4f30495e8b0464':
  Add missing <string.h> includes.
2015-01-25 19:27:25 +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
Mike Lockwood
7182774810 MTP: Fix partial implementation of 5 new audio specific properties
In change Ic5b3fb75309893caae1a4f4b56068a543847f1f7, we added partial
support for the MTP properties:

MTP_PROPERTY_AUDIO_WAVE_CODE,
MTP_PROPERTY_BITRATE_TYPE
MTP_PROPERTY_AUDIO_BITRATE
MTP_PROPERTY_NUMBER_OF_CHANNELS
MTP_PROPERTY_SAMPLE_RATE

However we were not returning any values for these properties in the result
of the MTP GetObjectPropList command. Strangely, this triggers a nasty bug
in Windows 7 that results in data loss.  When copying a directory containing
several MP3 files from one location on the device to another, Windows will
copy only some of the files to the new location, but delete all of the originals.
Finishing the implementation of these new object properties for some unknown
reason stops this bad behavior in Windows 7.

Bug: 19018427
Change-Id: I5fd3b91a89b31827d3100686445cef6795fe0f3f
2015-01-23 10:58:38 -08:00
Matthew Xie
c525cf7a33 Delay the second message for 30ms more than the last message for a2dp
In function setBluetoothA2dpDeviceConnectionState, current code calculate
the delay of the second state update message to be exactly the same as the
last delayed messages. This causes a problem that the sequence of the
messages may be altered.
Bug: 19036411

Change-Id: I35762873fd3341ec098dd229ac96bd42d6f34195
2015-01-22 20:54:54 -08:00
Christopher Tate
ebdec3e092 am 77c96dd8: Merge "Don\'t launch broadcast receiver processes during boot" into lmp-mr1-dev
automerge: 8192670

* commit '8192670937e3dee8e2c521a9ed1118a5782a2912':
  Don't launch broadcast receiver processes during boot
2015-01-20 23:55:00 +00:00
Christopher Tate
267603f3bb Don't launch broadcast receiver processes during boot
Broadcasts that might be sent before the boot process has completed must
be restricted to registered receivers, at least while still in the
middle of booting.

Bug 19060618

Change-Id: Ib4e0990cf252f34344f7a0bd19a0e72919013e0f
2015-01-20 14:21:21 -08:00
Jean-Michel Trivi
c2230a9d1a am ef417bb7: am 6a64a9cd: Merge "Prevent AudioService dead lock issue."
* commit 'ef417bb7a06b0d58faa21f42599d7dd4fd9e3ff2':
  Prevent AudioService dead lock issue.
2015-01-16 17:37:29 +00:00
Jean-Michel Trivi
6a64a9cd26 Merge "Prevent AudioService dead lock issue." 2015-01-16 17:23:36 +00:00
Eric Laurent
c3fb94caf0 am 4772f8b8: am 16cfa8dd: Merge "AudioManager: make AudioPortEventHandler static" into lmp-mr1-dev
* commit '4772f8b841dc1ad50999e2cca3f1d366b325b915':
  AudioManager: make AudioPortEventHandler static
2015-01-15 22:21:58 +00:00
Eric Laurent
f076db4070 AudioManager: make AudioPortEventHandler static
Make AudioPortEventHandler and audio port and patch caches
static members of AudioManager. There is only one callback
per process in AudioSystem for audio port updates
and having those non static would not work when more than
one AudioManager instance exists in one app.

Bug: 18727023.
Change-Id: I4c1041dc6441d168be4efa066e14289cc5f41872
2015-01-15 10:13:52 -08:00
Eric Laurent
e5a25a7689 am ad58ca67: Merge "AudioService: handle stream mute by stream alias" into lmp-mr1-dev
automerge: 50085fb

* commit '50085fbccfd08038ba5ec888621d960dbbe21405':
  AudioService: handle stream mute by stream alias
2015-01-13 23:25:05 +00:00
Eric Laurent
4fb3b60215 AudioService: handle stream mute by stream alias
Handle stream mute/unmute requests at the stream
alias level (like is done volume changes) to be consistent.
E.g a request to mute/unmute a stream will affect all streams
sharing the same alias for volume management.

Bug: 18844550.
Change-Id: Ie2e463c58df0371589150f0ebb9b36c38b14e1be
2015-01-13 12:19:53 -08: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
Eric Laurent
fe254b6ed2 am 695233fe: Merge "AudioService: send connection intent for HDMI ARC device" into lmp-mr1-dev
automerge: f672783

* commit 'f67278306b7f4c48f92113a8f1c1ace39c9b62e7':
  AudioService: send connection intent for HDMI ARC device
2015-01-12 16:29:59 +00:00
Eric Laurent
695233fe83 Merge "AudioService: send connection intent for HDMI ARC device" into lmp-mr1-dev 2015-01-12 15:39:45 +00:00
Rachad
2a7991ee2f am 6d3cff12: Merge "MediaCodec: Added E-AC3 mime type (@hide)." into lmp-mr1-dev
automerge: b60bb35

* commit 'b60bb35650c7075bc66bf2b8f5c0fbe428092010':
  MediaCodec: Added E-AC3 mime type (@hide).
2015-01-10 01:31:01 +00:00