6389 Commits

Author SHA1 Message Date
James Dong
7b996d19af Fix a test case failure when there is no back-facing camera on a device
Change-Id: I427b2e03b266ff2d92c6fe64f732a256d285020e
related-to-bug: 6538628
2012-05-30 20:36:12 -07:00
Eric Laurent
b1fbaaccb6 Send device connection intents from AudioService
AudioService is currently notified of wired headset and A2DP
sink connection states via broadcast intents from WiredAccessoryObserver
and BluetoothA2dpService. This is a problem as there is no guaranty that
AudioService can take actions upon the change before other apps are notified.
For instance, the Play On feature requires the UI to be refreshed when a device
is inserted/removed and we must guaranty that the UI component can read
new A2DP enable state from AudioManager after it receives a device connection state
change intent.

- Added hidden methods to AudioManager so that WiredAccessoryObserver
and BluetoothA2dpService can notify AudioService of device connection directly.
- The wired accessories connection intents are now sent by AudioService.
- The A2DP state change intent is delayed by BluetoothA2DPService when
ACTION_AUDIO_BECOMING_NOISY is sent by AudioService
- ACTION_AUDIO_BECOMING_NOISY intent is not sent when disconnecting A2DP
while a wired headset is present and vice versa.

Bug 6485897.

Change-Id: Ie160b3ee5f451132065530772b868593c90afd94
2012-05-30 14:44:43 -07:00
James Dong
54c40e033e Fixed a buffer overflow issue
The allocated array has one byte less than the required length. Allocating the size one byte larger fixes the issue.
contribution was originally from teng.hong@nxp.com

Change-Id: I3aa2e6b995fd18e30649a34f201646082aab44ee
related-to-bug: 6347465
2012-05-29 18:08:51 -07:00
Ruei-sung Lin
0a10132292 Fix b/6575950 make shader program to support different precisions.
1. In shade code of Vignette and Fisheye, change from
   pixel coordinates to texture coordinates to avoid overflow.

2. Fix bug in ColorTemperature shader code

3. Revise shader code pseudo random number generator (used by
   BlackWhite, Grain, Lomo, Documentary filters) to ensure
   it produces no artifacts among devices with different precisions.

Change-Id: Ifb67f12f114bc9cd7fbfa74f7782f130c5244e5d
2012-05-29 15:52:45 -07:00
Bryan Mawhinney
c3a5cf9aab Actually set the video scaling mode :-)
Change-Id: Ia3e77b68a07651861e9be268ab77cac808b3be79
2012-05-27 17:42:46 +01:00
Jean-Baptiste Queru
735470d202 am 23cad6eb: Merge "stagefright aacenc: Fix reading out of bounds in pow2_xy"
* commit '23cad6eb2b42f023a8f2197cd358de87f9084b99':
  stagefright aacenc: Fix reading out of bounds in pow2_xy
2012-05-25 11:34:02 -07:00
Jean-Baptiste Queru
23cad6eb2b Merge "stagefright aacenc: Fix reading out of bounds in pow2_xy" 2012-05-25 10:38:06 -07:00
Martin Storsjo
9af8cfa60f stagefright aacenc: Fix reading out of bounds in pow2_xy
This fixes cases where x was a large number, causing fPart to
exceed the 32 bit signed integer range (while fitting in an
unsigned 32 bit integer), making the table index a negative
number.

Change-Id: I674047db65f89148a93d218c138b42cd8305f80e
2012-05-25 19:49:59 +03:00
Eric Laurent
90fb2dd673 Merge "AudioManager: restore setBluetoothA2dpOn() method" into jb-dev 2012-05-24 11:39:36 -07:00
Fabrice Di Meglio
0100625bb3 Merge "Fix bug #6522190 MountService should respond to configuration changes ("INTERNAL STORAGE" string should be translated dynamically)" into jb-dev 2012-05-24 10:42:23 -07:00
Jean-Baptiste Queru
f75b605213 am 55536138: Merge "libstagefright/matroska: Fix build with gcc 4.7"
* commit '55536138cc0febbe83608ee0103aaa9a5202e31f':
  libstagefright/matroska: Fix build with gcc 4.7
2012-05-24 07:59:28 -07:00
Jean-Baptiste Queru
55536138cc Merge "libstagefright/matroska: Fix build with gcc 4.7" 2012-05-24 06:53:51 -07:00
Jean-Baptiste Queru
fe34006d6f am 05cd296e: Merge "libmedia: Fix build with gcc 4.7"
* commit '05cd296e713377c216a4ac5b2d421f4ca0343cda':
  libmedia: Fix build with gcc 4.7
2012-05-24 06:43:50 -07:00
Jean-Baptiste Queru
05cd296e71 Merge "libmedia: Fix build with gcc 4.7" 2012-05-24 06:25:55 -07:00
Wu-cheng Li
c1cabdfbbb Merge "Fix bad aspect ratios for recorded effects" into jb-dev 2012-05-23 17:57:23 -07:00
Pannag Sanketi
58acf44b9f Fix bad aspect ratios for recorded effects
Fix b/6530189
Fix b/6535207
Change-Id: I6ef09bd619acc31af53d9991335cda33b7c08908
2012-05-23 16:40:31 -07:00
Fabrice Di Meglio
13fe2a5330 Fix bug #6522190 MountService should respond to configuration changes ("INTERNAL STORAGE" string should be translated dynamically)
- use an ID instead of a String for StorageVolume description
- use this ID for getting the correct localized version of the description string

Change-Id: I30f3080fce2c889be38bfdf9f5121dffcf8a99e8
2012-05-23 16:38:09 -07:00
Marco Nelissen
b4b847866f Handle _ and % in paths
When doing a "like" match on a path, add a second non-like constraint
so that sqlite wildcard characters don't match arbitrary other characters.
b/6501408

Change-Id: I21f9b1c2d8e7c7ef27c0ad5fe24c3e01cd67fb61
2012-05-22 16:30:34 -07:00
Eric Laurent
7847211fb4 AudioManager: restore setBluetoothA2dpOn() method
Remove deprecation on setBluetoothA2dpOn() method so that applications
can override the default audio policy which is to use A2DP
for media whenever connected.

The request is not persistent and the default policy is restored when a
new A2DP i ro wired headset connection occurs.

Bug 6485897.

Change-Id: I2a4b6b6bdba55f7b133e64f86d27c03eb86acfa4
2012-05-22 16:06:21 -07:00
Jean-Michel Trivi
fca91a8e6a Merge "Type of search on headset key long press must depend on device state" into jb-dev 2012-05-21 15:36:55 -07:00
Jean-Baptiste Queru
ce5b506ef7 am 64f77c5e: Merge "stagefright avcenc: Use intptr_t for casting pointers to integers"
* commit '64f77c5e312ff0b45a91853f782f112a99df758f':
  stagefright avcenc: Use intptr_t for casting pointers to integers
2012-05-21 14:52:48 -07:00
Jean-Baptiste Queru
7bce428ccc am 6fd507b9: Merge "stagefright avcenc: Switch tmp variables to use the right type, to avoid casting"
* commit '6fd507b92746481f63922059697226c8ec6ad72b':
  stagefright avcenc: Switch tmp variables to use the right type, to avoid casting
2012-05-21 14:52:45 -07:00
Jean-Baptiste Queru
64f77c5e31 Merge "stagefright avcenc: Use intptr_t for casting pointers to integers" 2012-05-21 14:12:56 -07:00
Jean-Baptiste Queru
6fd507b927 Merge "stagefright avcenc: Switch tmp variables to use the right type, to avoid casting" 2012-05-21 14:12:49 -07:00
Jean-Michel Trivi
3c2711fc28 Type of search on headset key long press must depend on device state
When the user long presses on the headset key, the type of search
 that will launched must depend on the state of the device. The
 following logic is implemented:
 - screen on and device unlocked: action is ACTION_WEB_SEARCH,
 - device locked or screen off: action is ACTION_VOICE_SEARCH_HANDS_FREE
    with EXTRA_SECURE set to true if the device is securely locked.

Bug 6518222

Change-Id: I318770346b8d83e44dfcd4154bcdb517ea7098b5
2012-05-21 10:59:44 -07:00
Pannag Sanketi
850c2c36de Merge "Fixing the weird preview size w/ effects on camera" into jb-dev 2012-05-20 21:26:16 -07:00
Pannag Sanketi
b5af71f2b1 Fixing the weird preview size w/ effects on camera
The aspect ratio sent from the camera app to the SurfaceTextureTarget
filter  does not really matter now since the camera app handles
the re-sizing. Hence, the SurfaceTextureTarget filter needs to be render
in "stretch" mode all the time even though the aspect ratio sent to the
filter might indicate otherwise. The filter still needs the correct
frame size for things other than determining aspect ratio.

Fix b/6430124

Change-Id: Ie7fa5cd2adf2a8d41e6e005418f6c6fd738ed85d
2012-05-17 19:29:33 -07:00
Bryan Mawhinney
9de61ae0ed Merge "Fix video scaling mode validity check." into jb-dev 2012-05-17 16:19:30 -07:00
Bryan Mawhinney
79a9cd40f5 Fix video scaling mode validity check.
Change-Id: Ib7adead2758d50cae67741364801e966a82ad5ba
2012-05-18 00:15:56 +01:00
Jeff Brown
ab624c2fd4 Use FLAG_LONG_PRESS for headset long press interactions.
Handle canceled key events correctly and don't synthesize
key events in that case.

Unfortunately, the state machine was confused by some sequences
of key events that it might receive from the input dispatcher
when new activities take focus during a long-press on the headset key.
The audio service may receive a cancel event intended for the old
window, followed by a repeated down and finally an up for the new window.
Simplified this down to just two booleans.

Bug: 6484717
Change-Id: I9587d0a5e282419ef4d7c17665940682aacea96a
2012-05-17 14:00:34 -07:00
Jean-Michel Trivi
0a95ce9ffb Merge "Handle media button events during phone calls and when ringing" into jb-dev 2012-05-17 11:14:56 -07:00
Jean-Michel Trivi
722b808662 Handle media button events during phone calls and when ringing
Add functionality in AudioManager/AudioService to register a
 media button receiver for telephony that, when registered, gets
 priority for media button key events during a phone call or
 when ringing.

Bug 6484717

Change-Id: I0835fc02cb24d06ca59af5a32c3ba0ae93e54442
2012-05-17 10:38:36 -07:00
Marco Nelissen
d88404d0a1 Merge "Fix .pls playlist parsing" into jb-dev 2012-05-17 09:53:02 -07:00
Marco Nelissen
538d4925b3 Fix .pls playlist parsing
b/6508278

Change-Id: I015ecf3fa599601ba4e9d018be24d0685e153239
2012-05-16 17:10:24 -07:00
James Dong
5ddb19e530 Remove dependency of libvideoeditor_jni.so on static libs from video editor engine
related-to-bug: 6502980

Change-Id: I77aa67dac73ecb6200cfc885c426c23d70929e5d
2012-05-16 01:04:40 -07:00
James Dong
f20e4f4b1a Revert "Remove dependency of libvideoeditor_jni.so on static libs from video editor engine"
This reverts commit cbaa821b7f286a54767cc8bc549504ea2ed86e4d.
2012-05-15 14:51:52 -07:00
James Dong
cbaa821b7f Remove dependency of libvideoeditor_jni.so on static libs from video editor engine
related-to-bug: 6328360

Change-Id: Ifc9ffc671f454135db31590805c38f9635e5c815
2012-05-15 00:31:45 -07:00
Eric Laurent
8c78752f2b Implement new volume display policy.
Whenever a stream type is muted, the progress bar in volume panel
is at 0.
If a stream is muted by ringer mode and does not control ringer mode,
the progress bar is disabled.
Pressing VOL- when in vibrate or silent mode resets the last audible
volume of ringtone stream (music strem on tablets) to 0.

VolumePanel implementation:
 - Always prefer AudioManager APIs over AudioService APIs when available on both.
 - Do not use AudioManager.shouldVibrate() (deprecated).

Change-Id: I57fcb19ada4e8d729b6b41d668496562ebe340c3
2012-05-14 14:13:10 -07:00
Jean-Michel Trivi
d9e587137b Verify AudioTrack only uses a valid multichannel configuration
Enforce the same rules as for HDMI output:
- FL/FR must be present
- paired channels must be used in pairs (e.g. no rear left
   without rear right)

Bug 6392126

Change-Id: I0a39e474dcf509cb7eabd8edd1f0e44852d72b51
2012-05-14 08:49:42 -07:00
Jean-Michel Trivi
2d97a70ff8 Merge "Start voice-based interactions from headsethook key" into jb-dev 2012-05-12 08:06:28 -07:00
James Dong
909c4b855a Merge "Improve notifying TimedText by reducing marshall/unmarshalling." into jb-dev 2012-05-11 16:45:19 -07:00
Jean-Michel Trivi
4294b83927 Start voice-based interactions from headsethook key
Implement the interception of long-press on keys that
 can be used to trigger voice-based interactions (here
 only HEADSETHOOK) only if the long-press hasn't been
 trapped by the foreground application:
 - if the key is not one that is used for voice input, handle
   the event as before.
 - if the key press wasn't long enough, simulate a delayed
   key press.
 - if long press is detected, send
   RecognizerIntent.ACTION_WEB_SEARCH. Long press duration
   is set to 300ms (a typical key press is under 100ms).

Bug 3225090

Change-Id: I5b3adeb91d3c41ccd54d23fdb93d7eaec496eee7
2012-05-10 18:42:31 -07:00
Mike Lockwood
8d8176d41b Merge "AudioService: Fix problem handling USB audio disconnect" into jb-dev 2012-05-10 17:58:47 -07:00
Mike Lockwood
9841818b9a AudioService: Fix problem handling USB audio disconnect
Also broadcast ACTION_AUDIO_BECOMING_NOISY on USB audio disconnect

Change-Id: I46dfcc744df880066aea6bf651334a081c14af0f
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-05-10 17:49:30 -07:00
Eric Laurent
2448201852 AudioService: fix various volume issues.
Fix various issues in adjustStreamVolume() related to stream type aliases
using different ranges.

Always Update last audible index on all streams sharing the same alias.

Add check on setRingerMode() to prevent setting mode to VIBRATE when no
vibrator is present.

Issue 6455831.

Change-Id: Id110e05d2f16e208e1e398922617bf31967b62db
2012-05-10 17:20:26 -07:00
Eric Laurent
24938df9e4 Merge "AudioService: synchronized access to volume index" into jb-dev 2012-05-10 15:20:08 -07:00
Eric Laurent
3172d5e3e7 AudioService: synchronized access to volume index
Add synchronization to prevent concurrent accesses to
volume indexes HashMap in VolumeStreamState.

Use ConcurrentHashMap for VolumeStreamState mIndex and
mLastAudibleIndex.

Issue 6421841.

Change-Id: I6dee805a79aa5e2cd0ba4072014a2fcdda4ed507
2012-05-10 14:55:20 -07:00
Andreas Huber
1bc1b8a5b8 Merge "Make sure crop rect information is visible from java." into jb-dev 2012-05-10 11:42:15 -07:00
Andreas Huber
b842599e51 Make sure crop rect information is visible from java.
Change-Id: Ib914de3d42349efcd7af301d43bec82a21d24ce5
related-to-bug: 6471684
2012-05-10 11:32:15 -07:00
Pannag Sanketi
1870c69693 Merge "Adding disconnect call to the SurfaceTextureTarget" into jb-dev 2012-05-10 11:16:59 -07:00