2155 Commits

Author SHA1 Message Date
Jeff Brown
088663e846 am a829e166: Merge "Handle orientation changes more systematically. Bug: 4981385"
* commit 'a829e16681903e6a41901145195f88bf9d952f88':
  Handle orientation changes more systematically. Bug: 4981385
2011-09-21 21:11:37 -07:00
Jeff Brown
01a98ddbdf Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager.  Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out.  For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes.  The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise.  We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened.  We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
2011-09-21 19:26:15 -07:00
Mathias Agopian
62cd6a5d63 am 44bfbbe5: Merge "fix the float Rect in OpenGLRenderer to handle NANs"
* commit '44bfbbe501880f42105c49d479d4c109af420dbf':
  fix the float Rect in OpenGLRenderer to handle NANs
2011-09-20 16:23:18 -07:00
James Dong
0dcba02ecc am 3907c79a: am 92d0a64b: Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom
* commit '3907c79aebf8621a5a4880c9e66db3c49a44f359':
  Add QVGA resolution to CamcorderProfile
2011-09-20 14:13:50 -07:00
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
a5d7b09cb3 am d6790989: Merge "A new API "androidGetThreadPriority""
* commit 'd679098937eabe9dc4ac8ab3bb1235b318c8fa25':
  A new API "androidGetThreadPriority"
2011-09-16 10:52:27 -07:00
Andreas Huber
bcba155942 A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Jeff Brown
1ac36b7729 am 93578af2: Merge "Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529"
* commit '93578af23ecfb8f5b6001346d63c6214cdec5d17':
  Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529
2011-09-14 21:29:11 -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
e4e87dd1be am 1318864f: Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications"
* commit '1318864fa7ce6c85aaf629b1db08c79e4d0cf41e':
  Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications
2011-09-14 17:44:42 -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
56e87004fc resolved conflicts for merge of 3f0c8217 to ics-aah
Change-Id: I6c72eae0add896919f06bf7e0172ddd7fc47e630
2011-09-13 18:24:16 -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
9373c02cb3 am 7fc8f515: Merge "Turn an another assertion into a runtime error in ACodec\'s implementation"
* commit '7fc8f515a0add6837d525b4f2b4baa7ebe37fc7f':
  Turn an another assertion into a runtime error in ACodec's implementation
2011-09-12 14:23:25 -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
4b2efcb26f am 6c048260: Merge "Revert encryption mapping for device wipes."
* commit '6c048260f30d9bba1a83c4f79388cd6b3109be7d':
  Revert encryption mapping for device wipes.
2011-09-11 16:53:00 -07:00
Ben Komalo
6c048260f3 Merge "Revert encryption mapping for device wipes." 2011-09-11 16:48:32 -07:00
Jeff Brown
9b40e9c919 am 0e23c2ef: Merge "Tweak VelocityTracker. Bug: 5265529"
* commit '0e23c2efb03c8eac7e2bcd6aad61cfc4b15340fc':
  Tweak VelocityTracker. Bug: 5265529
2011-09-09 17:03:21 -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
203b5d29be am 973f553b: Make MediaScanner skip certain directories
* commit '973f553be4aabf9656d6c1596b47767896677b0a':
  Make MediaScanner skip certain directories
2011-09-09 15:41:18 -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
1065251c7d am 1d477c53: Merge "Require INTERNET permission for network-based content. Bug #1870981"
* commit '1d477c53bf2f389813d04d5163d210fccf00ceb9':
  Require INTERNET permission for network-based content. Bug #1870981
2011-09-02 03:32:31 -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
7437294555 am 98bb251c: Add video snapshot camera parameter.
* commit '98bb251c8b527600e7a4cca6cc33499710bbfbf1':
  Add video snapshot camera parameter.
2011-09-01 04:17:12 -07: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
e5d99be77a am abf82f9e: Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource"
* commit 'abf82f9ea4960ead8716b183aac1792820cccdd1':
  Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource
2011-08-31 22:02:46 -07: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
235ea3b0a3 am b2c4f0bf: Merge "Fix SurfaceMediaSource timestamp handling."
* commit 'b2c4f0bf11f38fd31d80f1256c89b9db043a2929':
  Fix SurfaceMediaSource timestamp handling.
2011-08-31 13:43:05 -07:00
Eino-Ville Talvala
b2c4f0bf11 Merge "Fix SurfaceMediaSource timestamp handling." 2011-08-31 13:41:06 -07:00
Mike J. Chen
0d2ddec34b Add media/libaah_rtp
RTP library used to broadcast media from one device to a collection
of listeners.  Handles failures/retries/etc.

This is a squashed merge from master-tungsten of the following changes:

commit e1a5101fe627d71739a7c4263bb3a65c7bc44385
Author: Jason Simmons <jsimmons@google.com>
Date:   Fri Aug 12 13:24:21 2011 -0700

    Hold ThreadWrapper in a ref-counting pointer

    Change-Id: Iaf3343182e37bcc0ca99fbaf8f9bbb8c4984072a

commit 89b90d62e164ff3db27c9cba85255fc476d2dd96
Author: Jason Simmons <jsimmons@google.com>
Date:   Wed Aug 10 13:08:25 2011 -0700

    Update the Tungsten TX player to use HTTPBase

    Change-Id: I9f7ecf1b4b496cec1815284dbcdb958a43284169

commit 43be3231034ff8537fdd84422a7954780038671f
Author: John Grossman <johngro@google.com>
Date:   Mon Jun 27 18:59:12 2011 -0700

    Move libaah_rtp over from the vendor directory.

    Also move factor PipeEvent out into utils.

    Change-Id: Id3877c66efe22d771cf3ef4877107e431b828e37

Change-Id: I190ecddf1dc919761c2e4ec740c2f3b2c9541156
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>
Signed-off-by: Jason Simmons <jsimmons@google.com>
2011-08-31 10:05:05 -07:00
Mathias Agopian
4ca738b6f6 am c21843a8: Merge "fix Surface positions are not floats"
* commit 'c21843a8b5c395cbaae6db0f786bdee556075f5d':
  fix Surface positions are not floats
2011-08-30 19:25:50 -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
2e0ae89d18 am 0e35c78d: Merge "226483: A2DP connected, but music out to speaker"
* commit '0e35c78d25a8df8b3bde566ad6c474f9df242ea4':
  226483: A2DP connected, but music out to speaker
2011-08-30 10:53:47 -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
John Grossman
d7f614f831 Make the LocalClock HAL wrapper use a singleton HAL instance.
Change the local clock helper wrapper to hold just a single copy of the local
time HAL instead of having each wrapper hold their own HAL instance.

Change-Id: Ibc365eccc78a98bd2ea6cf1c57a55a84b843bc2a
2011-08-29 16:02:13 -07:00
Glenn Kasten
210b6e996a am b4bf90b4: Merge "Add C++ thread API androidGetThreadSchedulingGroup"
* commit 'b4bf90b40e30096479a4d4cc9cf135e991ef1994':
  Add C++ thread API androidGetThreadSchedulingGroup
2011-08-29 15:39:07 -07:00
Glenn Kasten
b4bf90b40e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Pannag Sanketi
ea77147ee5 am b8a9e15c: Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque"
* commit 'b8a9e15c2aa3d317834555244a90f184b46e1dcb':
  Modify enum value of OMX_COLOR_FormatAndroidOpaque
2011-08-26 20:08:09 -07:00