2130 Commits

Author SHA1 Message Date
Mathias Agopian
44bfbbe501 Merge "fix the float Rect in OpenGLRenderer to handle NANs" 2011-09-20 14:02:44 -07:00
James Dong
3907c79aeb am 92d0a64b: Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom
* commit '92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0':
  Add QVGA resolution to CamcorderProfile
2011-09-19 20:09:00 -07:00
James Dong
07b9ae3312 Add QVGA resolution to CamcorderProfile
Change-Id: Icebbafb68d8164370f98a2c36699845d10ef081b
related-to-bug: 5145483
2011-09-19 19:32:26 -07:00
Mathias Agopian
83b186a246 fix the float Rect in OpenGLRenderer to handle NANs
- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
2011-09-19 16:50:07 -07:00
Andreas Huber
bcba155942 A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Jeff Brown
93578af23e Merge "Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529" 2011-09-14 21:27:25 -07:00
Jeff Brown
b59ab9f41f Velocity Tracker II: The Revenge of Velocity Tracker
Bug: 5265529

Rewrote the velocity tracker to fit a polynomial curve
to pointer movements using least squares linear regression.
The velocity is simply the first derivative of this polynomial.

Clients can also obtain an Estimator that describes the
complete terms of the estimating polynomial including
the coefficient of determination which provides a measure
of the quality of the fit (confidence).

Enhanced PointerLocation to display the movement curve predicted
by the estimator in addition to the velocity vector.

By default, the algorithm computes a 2nd degree (quadratic)
polynomial based on a 100ms recent history horizon.

Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1
2011-09-14 19:16:37 -07:00
James Dong
1318864fa7 Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications" 2011-09-14 17:42:22 -07:00
Eric Laurent
3f0c821740 Merge "Issue 5298399: Lost speech after a crash in gTalk." 2011-09-13 17:50:31 -07:00
Eric Laurent
7e8626fd75 Issue 5298399: Lost speech after a crash in gTalk.
Fixed problem in AudioTrack::restoreTrack_l() causing a permanent
failure if the IAudioTrack interface to AudioFlinger could not be
restored at the first attempt.

Change-Id: I039d4fe2dca8d3baf71f1a6c51119f27a67b6611
2011-09-13 17:33:29 -07:00
James Dong
0209da1cb1 Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications
Change-Id: I522a994981d86329ccc86c3b536b561dc6e40eeb
related-to-bug: 5300618
2011-09-13 11:00:17 -07:00
Andreas Huber
d41108c91f Turn an another assertion into a runtime error in ACodec's implementation
Change-Id: I6779b29f200b90d088273ab3204724ef3d8d59bd
related-to-bug: 5284760
2011-09-12 14:14:08 -07:00
Ben Komalo
6c048260f3 Merge "Revert encryption mapping for device wipes." 2011-09-11 16:48:32 -07:00
Jeff Brown
0e23c2efb0 Merge "Tweak VelocityTracker. Bug: 5265529" 2011-09-09 17:01:25 -07:00
Jeff Brown
581761d4aa Tweak VelocityTracker.
Bug: 5265529

Calculate the velocity using the most recent touch sample as the
point of reference instead of the oldest.  This change more heavily
weights recent touch samples and reduces the sample time window
used for calculation.  This significantly improves the accuracy
of fling gesture detection.

Change-Id: Ib1940933e786e5f6a731552a99bcd9400741d55f
2011-09-09 16:04:09 -07:00
Guang Zhu
973f553be4 Make MediaScanner skip certain directories
The list of directories to skip are configurable via setprop.
The main motivation is that some test data folder takes long time
to scan, and media scanner may compete for CPU time against perf
tests therefore skewing the results.

Bug: 5263115
Change-Id: I568213e2a4babf6033021c1d336ef0347c0e3315
2011-09-09 15:36:42 -07:00
Ben Komalo
13c7197da8 Revert encryption mapping for device wipes.
External storage volumes that were emulated+encrypted needed to have
their encryption mapping removed so that it doesn't try to encrypt the
volume after formatting them.

This just wires through an argument through vold, and assumes that vold
will do the right thing even if there is no encryption mapping set.

Bug: 5017638
Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad
2011-09-09 14:44:40 -07:00
Dave Burke
fc301b0bb5 Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
2011-09-02 11:26:59 +01:00
Wu-cheng Li
98bb251c8b Add video snapshot camera parameter.
The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
2011-09-01 13:37:14 +08:00
Pannag Sanketi
abf82f9ea4 Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource" 2011-08-31 22:00:35 -07:00
Pannag Sanketi
ffd056fc73 Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource
The buffers in SurfaceMediaSource were 4 earlier, whereas
we need 5 for one of the devices.

Change-Id: I87bf5e28bbb0f7c9661dc01b040baa903d95d2c2
2011-08-31 17:43:24 -07:00
Eino-Ville Talvala
b2c4f0bf11 Merge "Fix SurfaceMediaSource timestamp handling." 2011-08-31 13:41:06 -07:00
Mathias Agopian
c21843a8b5 Merge "fix Surface positions are not floats" 2011-08-30 19:24:04 -07:00
Mathias Agopian
34cb9f2a96 fix Surface positions are not floats
Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
2011-08-30 18:51:54 -07:00
Eric Laurent
0e35c78d25 Merge "226483: A2DP connected, but music out to speaker" 2011-08-30 10:51:54 -07:00
Eino-Ville Talvala
728e08bc3f Fix SurfaceMediaSource timestamp handling.
Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.

Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
2011-08-30 10:49:15 -07:00
Eric Laurent
05ce094164 226483: A2DP connected, but music out to speaker
When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
2011-08-30 10:19:38 -07:00
Glenn Kasten
b4bf90b40e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Pannag Sanketi
b8a9e15c2a Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque" 2011-08-26 20:05:58 -07:00
Pannag Sanketi
4da5660eee Modify enum value of OMX_COLOR_FormatAndroidOpaque
The enum value chosen earlier had a conflict with one of the vendors.

Change-Id: I47832dd1157447f89324d56e8ab146260cd7927c
2011-08-26 19:38:13 -07:00
Andreas Huber
539340fe2c Merge "Support for posting messages and synchronously waiting for a response." 2011-08-26 13:47:26 -07:00
Jean-Michel Trivi
22cb204cbb Bug 4364249 Play position is 0 after flushing AudioTrack
AudioTrack::stop() is not synchronous, so a stop() followed
 by flush(), which is synchronous, will not always report
 a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
 correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
 future, where flush could be made synchronous, to properly
 address bug 4364249.

Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
2011-08-25 17:33:49 -07:00
Andreas Huber
e688257456 Support for posting messages and synchronously waiting for a response.
Change-Id: Id6c7a08c34fd5cb6c4632f78ece9e7898b29e52c
2011-08-25 16:28:18 -07:00
Pannag Sanketi
409f95ff89 Merge "Testing the GL/ CPU encoding w/ Gralloc buffers" 2011-08-24 15:18:07 -07:00
Pannag Sanketi
557b7092cc Testing the GL/ CPU encoding w/ Gralloc buffers
This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:

1. GL based encoding tests added to SurfaceMediaSource_test

2. SurfaceMediaSource ::read() colorformat

The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly

Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
2011-08-24 13:57:46 -07:00
Jamie Gennis
d52c14df02 SurfaceFlinger: use the HWC gralloc usage bit
This change makes SurfaceFlinger always use the
GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be
passed to the HWComposer.

Change-Id: I70362a8ede2b359fb2046853f85149d597465817
2011-08-22 14:56:29 -07:00
Jeff Brown
65fd251c39 Input system bug fixes, particularly for stylus.
Bug: 5049148

Finished stylus support, including support for indirect stylus
and mouse tools.

Added TILT axis.  When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.

Touch devices now only report touch data using a single input
source.  Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one.  The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.

Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact.  It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.

Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset.  This fixes
problems where the input mapper state might have the wrong initial
state.

Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification.  This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.

Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.

Improved the PointerLocation output.

Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
2011-08-19 15:02:26 -07:00
Rajneesh Chowdury
3ced044154 Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)
Also fixes 5118207 add other video codec support for video editor export.

Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
2011-08-19 14:34:47 -07:00
Jamie Gennis
c8f4c6a5d0 Merge "SurfaceTexture: fix queues-to-composer" 2011-08-18 14:31:39 -07:00
Wu-cheng Li
fde00591c6 Merge "Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE." 2011-08-17 22:24:53 -07:00
Jamie Gennis
9b8fc65b03 SurfaceTexture: fix queues-to-composer
This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient.  Surface now uses the inherited
SurfaceTextureClient implementation of this query.  SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).

Change-Id: Iff187e72f30d454229f07f896b438198978270a8
2011-08-17 18:19:00 -07:00
Mathias Agopian
c395530de8 Merge "don't return the current buffer from dequeueBuffer" 2011-08-17 16:45:35 -07:00
Mathias Agopian
8618ebcc5d don't return the current buffer from dequeueBuffer
we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.

Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
2011-08-17 15:49:13 -07:00
Xavier Ducrohet
32f6846516 am ddf155b8: am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit 'ddf155b8338eb894a97612e4cb21257c11d8434a':
  Fix String16 operator+ to actually work
2011-08-17 14:40:57 -07:00
Xavier Ducrohet
ddf155b833 am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit '5dcda1fda53bdc6dfe80cf37e62cacdc216224b1':
  Fix String16 operator+ to actually work
2011-08-17 14:38:15 -07:00
Xavier Ducrohet
5dcda1fda5 am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit '88512f59bc051a42f4dd70acc8af5622f7e99db6':
  Fix String16 operator+ to actually work
2011-08-17 14:35:20 -07:00
Xavier Ducrohet
88512f59bc am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit 'a8313e71fe8b483448d14e22610101c5f3672744':
  Fix String16 operator+ to actually work
2011-08-17 14:31:08 -07:00
Wu-cheng Li
b9ac75d3df Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE.
The API is still hidden.

bug:5086125
Change-Id: I69268a95ad6aae249771d3a8dfb423ffe2d87081
2011-08-18 00:15:40 +08:00
Josiah Gaskin
4d07453ded Fix String16 operator+ to actually work
This change fixes the String16 utility's operator+ function.

Change-Id: Ibed7b07277b50bf178febc72b6ce497893e66f17
2011-08-16 15:16:04 -07:00
Andreas Huber
d84fd7927e Error handling in ACodec and Nuplayer.
Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
2011-08-16 13:48:44 -07:00