1645 Commits

Author SHA1 Message Date
Mathias Agopian
c6c3e77d4d am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb
* commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7':
  fix [3408713] Dialog window invisible sometimes
2011-02-10 15:08:33 -08:00
Glenn Kasten
8b4b97a14a Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
2011-02-10 14:37:42 -08:00
Mathias Agopian
37c2a37501 fix [3408713] Dialog window invisible sometimes
weak pointer comparison operators were implemented wrong,
they were using the internal "unsafe" pointer. We could end up
with two "equal" weak pointer pointing to different objects.

this caused KeyedVector keyed by weak pointer to work incorrectly, in
turn causing a window that just got added to a list to be immediately
removed.

Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
2011-02-09 18:38:55 -08:00
James Dong
f6a2bff0c9 Reduce blocking time in file write
bug - 3418787

Change-Id: I4723662bf46ed07271be8468f84ae5d93cb793fa
2011-02-09 15:44:32 -08:00
Andreas Huber
5ed9a80571 Merge "Handle some edge cases when seeking while starting up OMXCodec" 2011-02-08 13:15:37 -08:00
Andreas Huber
b928983334 Handle some edge cases when seeking while starting up OMXCodec
These were exposed by the new preview-seekframe while paused code.
In particular, the codec may have been in state RECONFIGURING when attempting
to seek, or we may have initiated flushing of the output port and this may not
have completed yet by the time we want to reconfigure the output port.

Change-Id: Id7640ade11dbc7205a22f648ea0b5e3e9b49cf4b
related-to-bug: 3392259
2011-02-08 13:10:25 -08:00
Gloria Wang
c2dc4729e3 - Do not use global DrmManagerClient
- Release the DrmManagerClient and DecryptHandle in DataSource
Fix for bug 3429811

Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f
2011-02-07 15:10:33 -08:00
Andreas Huber
6760f9832d Improvements/fixes to ACodec.
- Make sure ACodec reverts its state when it's shutdown
- Defer "resume" to after handling the OutputPortSettingsChange

- If the OMX_EventPortSettingsChanged event comes in while we're flushing, defer it
  and make sure the output port can be disabled by deleting all buffers not already
  owned by the component.

Change-Id: I1f8cdffa71237b57d4275a48b834647a7b263e8b
2011-02-04 10:12:26 -08:00
Eric Laurent
2e8fbebff4 am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycomb
* commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836':
  Fix issue 3371080
2011-02-03 17:18:46 -08:00
Glenn Kasten
f9f223edb4 Bug 1804058 FLAC extractor
Note: dependent on external/flac for libFLAC

Implemented and tested:
 * FLAC container
 * mono and stereo
 * standard sample rates
 * standard bit depths
 * sniffer
 * media scanner
 * Vorbis comment metadata including album art
 * random access seeking with "torture test"
 * web browser integration for audio/flac (not audio/x-flac), but
   note that most web servers don't correctly report the MIME type

Not implemented:
 * 24-bit to 16-bit dither or noise shaping in AudioFlinger
 * 96 kHz to 44.1 or 48 kHz downsampling low pass filter in AudioFlinger
 * replay gain is better done in AudioFlinger
 * multi-channel, would need AudioFlinger support
 * Ogg container, does not seem to be very popular yet

Change-Id: I300873e8c0cfc2e95403d9adb5064d16a2923f17
2011-02-03 13:39:10 -08:00
Eric Laurent
6f1bd261b7 am 9c0a1003: Merge "Fix issue 3371080" into honeycomb
* commit '9c0a1003bd676121cf9b1c942ecebd5b486290d5':
  Fix issue 3371080
2011-02-03 10:28:24 -08:00
Eric Laurent
25101b0b9a Fix issue 3371080
Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
2011-02-03 09:26:24 -08:00
Jamie Gennis
a257be1895 am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit '421d94c20321e1de528416b279bf148baba47b39':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 16:21:24 -08:00
Jamie Gennis
421d94c203 am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit 'ecb4b3f02340e21eefabbea78559e85ec7ee0089':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 15:56:20 -08:00
Jamie Gennis
83bac216a7 Pass the IGraphicBufferAlloc to SurfaceTextureClient.
This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects.  When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
2011-02-02 15:31:47 -08:00
Jamie Gennis
4453b1a5b6 am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:05:42 -08:00
Jamie Gennis
09443aeb64 am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '628845056282a0c5b1a212ce5aeeaac092b91ec8':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:03:03 -08:00
Dianne Hackborn
0e87a19bec am 371de969: am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit '371de9695508073fbbde8181eb230e99cb045206':
  Normalize output from aapt d
2011-01-29 23:10:33 -08:00
Dianne Hackborn
371de96955 am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234':
  Normalize output from aapt d
2011-01-29 23:07:48 -08:00
Dianne Hackborn
a1f5e82f37 am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a30063d80c08434ac3c7316f338c6d54110449ab':
  Normalize output from aapt d
2011-01-29 23:04:50 -08:00
Dianne Hackborn
25eb04642c Merge "Normalize output from aapt d" 2011-01-29 22:53:20 -08:00
Jamie Gennis
2ece4cdc3f Reset ANativeWindow crop on buffer geometry changes.
This changes the ANativeWindow API and the two implementations to reset
the window's crop rectangle to be uncropped when the window's buffer
geometry is changed.

Bug: 3359604
Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
2011-01-28 18:21:54 -08:00
Glenn Kasten
d6f5bde96b Protected surface API
To be used by DRM framework, implemented by display HAL

Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
2011-01-28 08:04:00 -08:00
James Dong
804d8798d5 am 8bea1d55: am 7fb232c4: Merge "Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source." into honeycomb
* commit '8bea1d5585822bb62996e789f59c7629dfd9ac50':
  Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source.
2011-01-26 14:49:23 -08:00
James Dong
8bea1d5585 am 7fb232c4: Merge "Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source." into honeycomb
* commit '7fb232c40cde91d0958be1694db2d97a126b95f9':
  Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source.
2011-01-26 14:45:41 -08:00
Jean-Michel Trivi
1155efdc71 am 2ba92c71: do not merge bug 3370834 Cherrypick from master
* commit '2ba92c71b5684dce700cf848bf157153c156df1d':
  do not merge bug 3370834 Cherrypick from master
2011-01-26 14:05:18 -08:00
James Dong
5f3ab06e90 Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source.
This will fix the stop failure issue where we have to wait n * time_interval before a key frame can be received by the file writer, where
 o n is the actual number of buffers advertised by the video encoder
 o time_interval is the interval settings for timelapse video recording
   specifying the time distance between neighboring input video frames

The fix includes two parts:
o OMXCodec will not submit all n buffers at one time, but instead submit one input
  frame at one time if it become available.

o Timelapse camera source made available the first two input frames and do not skip
  them so that the first compressed output frame data can be received regardless
  the specified time_interval

bug - 3367659

Change-Id: Ia68cc2cb0d71aa7dc54540e9ad82fae911ad530b
2011-01-26 12:11:22 -08:00
Andreas Huber
c397566492 am e328d1c0: am a9f27fa6: Merge "Protect notification callback parameters with a mutex." into honeycomb
* commit 'e328d1c0bea62f4dc28210dbcab0da40f4449bf2':
  Protect notification callback parameters with a mutex.
2011-01-26 11:48:12 -08:00
Andreas Huber
e328d1c0be am a9f27fa6: Merge "Protect notification callback parameters with a mutex." into honeycomb
* commit 'a9f27fa631ab21d52c75842ccaacc1cbcd75fca0':
  Protect notification callback parameters with a mutex.
2011-01-26 11:44:17 -08:00
Andreas Huber
2ffbb18053 Protect notification callback parameters with a mutex.
This avoids the race condition where notifications are dispatched to a NULL receiver
after notifications have been disabled.

Change-Id: I6d351ffbee97616e2c35559c132a6c5e6a66948a
related-to-bug: 3394139
2011-01-26 11:20:42 -08:00
Jean-Michel Trivi
2ba92c71b5 do not merge bug 3370834 Cherrypick from master
Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
2011-01-26 11:20:01 -08:00
Jeff Brown
ab2f096030 am 12b2dc90: am b1e0a870: Merge "Fix crashes caused by some input devices." into honeycomb
* commit '12b2dc90883ef4f930a17907acdef3677b0598a5':
  Fix crashes caused by some input devices.
2011-01-25 18:22:50 -08:00
Jeff Brown
12b2dc9088 am b1e0a870: Merge "Fix crashes caused by some input devices." into honeycomb
* commit 'b1e0a870e4099490127bb917bb4fc7a8f48db893':
  Fix crashes caused by some input devices.
2011-01-25 18:20:35 -08:00
Jeff Brown
b1e0a870e4 Merge "Fix crashes caused by some input devices." into honeycomb 2011-01-25 18:18:05 -08:00
Mike Lockwood
2c91b5699e am c80daa1b: am f10d9404: Merge "StagefrightMediaScanner: Close metadata retriever after we are done scanning" into honeycomb
* commit 'c80daa1b05b8f1d2873df23821ae2c5344e76fb8':
  StagefrightMediaScanner: Close metadata retriever after we are done scanning
2011-01-25 16:20:56 -08:00
Jeff Brown
58a2da843f Fix crashes caused by some input devices.
The touch screen sometimes reports more than 10 pointers even though that's
all we asked for.  When this happens, we start dropping events with more
than 10 pointers.  This confuses applications and causes them to crash.
Raised the limit to 16 pointers.
Bug: 3331247

The default behavior was to identify all touch devices as touch screens.
External devices that are plugged in are more likely to be touch pads
not attached to a screen.  Changed the default to be a touch pad
and renamed some internal constants to avoid confusion.

A certain mouse happens to also behave like a touch pad.  That caused
problems because we would see multiple concurrent traces of motion events
coming from the same input device so we would batch them up.
Added code to ensure that we don't batch events unless they come from
the same *source* in addition to coming from the same *device*.

Due to batching or misbehaving drivers, it's possible for the set of
pointer ids to be different from what we expect when it comes time to
split motion events across windows.  As a result, we can generate motion
events with 0 pointers.  When we try to deliver those events, we cause
an error in the InputTransport so we tear down the InputChannel and kill
the application.
Added code to check out assumption about pointer ids and drop the
event gracefully instead.

Patched up the tests to take into account the change in default behavior
for identifying touch screens and touch pads.

Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
2011-01-25 16:02:22 -08:00
Mike Lockwood
c80daa1b05 am f10d9404: Merge "StagefrightMediaScanner: Close metadata retriever after we are done scanning" into honeycomb
* commit 'f10d940413000732f1cd35bcb113c41019c7e3b7':
  StagefrightMediaScanner: Close metadata retriever after we are done scanning
2011-01-25 15:48:06 -08:00
Mike Lockwood
8151dc3229 StagefrightMediaScanner: Close metadata retriever after we are done scanning
This prevents the mediaserver from leaking a file descriptor after
the media scanner runs

BUG: 3373546

Change-Id: I82a8bae82306de3da56a5c7da5b03ecf106a4efc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-25 15:20:04 -08:00
Mathias Agopian
df8368925a am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)" into gingerbread
* commit '239fd805ef7c0e4116b0a89e20caaf287e91f017':
  fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
2011-01-25 14:46:40 -08:00
Mathias Agopian
88bccab35c am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread
* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
  minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
2011-01-25 14:46:22 -08:00
Mathias Agopian
21956040a7 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
728d849fc9 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Chet Haase
3873da3c6e am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '2acb67ec9fe34316231519373f59dfb76c03d57b':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 13:30:37 -08:00
Chet Haase
2acb67ec9f am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '67005b05cc76a38a5b3bf6e83957dd03619e9126':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 11:15:51 -08:00
Chet Haase
daf98e941e Use optimized display lists for all hwaccelerated rendering
Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
2011-01-24 08:43:20 -08:00
Jeff Brown
c3563eb9e7 am 265cf2e7: Merge "Fix getSwitchState."
* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef':
  Fix getSwitchState.
2011-01-22 21:32:58 -08:00
Andreas Huber
0bb0b8b356 am 3564d9ea: am 63d64a14: Merge "Properly rotate video that\'s marked as such and decoded to a surface." into honeycomb
* commit '3564d9eada7ae3f40bc4c80272fbbb867f04e018':
  Properly rotate video that's marked as such and decoded to a surface.
2011-01-21 14:47:15 -08:00
Andreas Huber
3564d9eada am 63d64a14: Merge "Properly rotate video that\'s marked as such and decoded to a surface." into honeycomb
* commit '63d64a14790ae21db31b60747864b4a7565b33c3':
  Properly rotate video that's marked as such and decoded to a surface.
2011-01-21 14:44:21 -08:00
Andreas Huber
5e9dc94a3c Properly rotate video that's marked as such and decoded to a surface.
Change-Id: I1e9144db3447e58c99aac3f47702ad471678789c
related-to-bug: 3378148
2011-01-21 14:32:31 -08:00
Andreas Huber
149234e91e am 9a62d902: am 05aa0827: Merge "Some tweaks to HTTP live / nuplayer behaviour" into honeycomb
* commit '9a62d902ead8f94fa0ce071300e3767bfb976d8b':
  Some tweaks to HTTP live / nuplayer behaviour
2011-01-21 13:19:42 -08:00