27763 Commits

Author SHA1 Message Date
Teng-Hui Zhu
96fae5e088 Support full screen back to back playing using javascript
bug:5766427

Change-Id: I0117e50a3e547ac8c33cf966bef18e6d75f98660
2012-01-18 15:53:01 -08:00
Christopher Tate
6de74ff2a4 Fix edge cases leading to backup hanging forever
Plug a couple of apparent code paths (one not obviously reachable, but
fixed here on general principles) that could lead to a backup pass
getting confused partway through and simply never properly completing.
In this state it would leave its wakelock held forever until next
reboot.  Bug 5828859.

Those fixes are a total of two lines of code. The rest of the patch
adds a textual journal of the most recently completed (or ongoing!)
backup pass's progress, with an eye to being able to isolate any such
issues that may crop up in the future.

Change-Id: If8a5e8aba11db5a1e618d8b9c9ba3038dd5377a1
2012-01-18 15:44:47 -08:00
Glenn Kasten
ee7fea9f2f Remove dead setRingerMode(mode, mask)
Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
2012-01-18 15:10:31 -08:00
George Mount
3d09531f89 Add cut and paste to ContentEditable.
Bug 5806267
 Use visual selection to determine the webkit selection.
 The webkit selection can be used to cut text from an editable
 area. It can also be used to do better complex character text
 copy.

 Webkit change: I194c6d9e2add67151b97092a1a54f5c081296000

Change-Id: I56543d17670a8c98484314c89c7fa6a94cb809e4
2012-01-18 14:59:21 -08:00
Adam Powell
ea77ed02e4 am a6a0d134: am 04f38489: Merge "Fix DeviceDefault theme/style bugs where parent styles were incorrectly specified." into ics-mr1
* commit 'a6a0d134ebfb0931473c5e54f21ff543e08b4a91':
  Fix DeviceDefault theme/style bugs where parent styles were incorrectly specified.
2012-01-18 14:51:35 -08:00
Adam Powell
a6a0d134eb am 04f38489: Merge "Fix DeviceDefault theme/style bugs where parent styles were incorrectly specified." into ics-mr1
* commit '04f3848986efda8cf006f575d2e4990f120a1bc8':
  Fix DeviceDefault theme/style bugs where parent styles were incorrectly specified.
2012-01-18 14:49:30 -08:00
Jeff Brown
2a16b13744 Merge "Improve heuristics for orientation detection." 2012-01-18 14:43:16 -08:00
Gilles Debunne
c171402318 Touch slop added to double tap detection
Similar to what is done in GestureDetector

Removed all gesture constants. Only one one them is used on MOVE
(added an early exit test), the 2 others on UP or DOWN where
performance is not such an issue.

Change-Id: Icd58ead5078f94f86786f934ddf81aa5ec9bf549
2012-01-18 14:40:53 -08:00
Michael Kolb
d9fdd9fd78 Merge "Prevent IME from popping up on startup" 2012-01-18 14:00:52 -08:00
Martijn Coenen
1ad65e7054 Merge "Remove LlcpPacket from public namespace." 2012-01-18 13:09:55 -08:00
Michael Kolb
17146c7cc0 Prevent IME from popping up on startup
Bug: 5869028

Change-Id: Ie5c7004def16eeac4147d19fb00fc9631a17579e
2012-01-18 11:20:01 -08:00
John Reck
955fdda057 Add tapHighlightColor support
Change-Id: I419eb3d8f1050efd05bb989a6b353ad45ee77acf
2012-01-18 09:36:43 -08:00
Jean Chalard
96c804af0b Add methods to support shortcuts in user dict.
Adds the new interface to the user dictionary, which includes
a clean way of inserting words in any locale and support for
shortcuts.

Change Ib318c047 implements the provider part of this.

Bug: 4646172
Change-Id: Id3ca792f2555fac46728f9d404ab0199971f6503
2012-01-18 18:54:34 +09:00
Pin Ting
1c423b81de Fixes some javadoc.
Change-Id: I4ad1f1452e2c8e004865853247e0b34b78bb1616
2012-01-18 11:21:06 +08:00
Jim Miller
93c518e4f8 Fix 5863053: Add method to lock screen immediately.
This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.

The change allows DPMS to directly invoke screen lock, bypasssing the screen state.

Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
2012-01-17 18:11:05 -08:00
Romain Guy
fb9ffe0260 Merge "First pass at implementing Canvas.drawPosText() in GL" 2012-01-17 17:40:24 -08:00
Romain Guy
eb9a5367e8 First pass at implementing Canvas.drawPosText() in GL
Change-Id: Ia3ac347e95d57eb86c63045156c8dbc0572b03cb
2012-01-17 17:39:26 -08:00
Eric Laurent
1be4afecb7 Merge "audio framework: manage stream volume per device" 2012-01-17 17:35:03 -08:00
Romain Guy
d33f97f196 Merge "Free optimization" 2012-01-17 17:33:15 -08:00
Romain Guy
d1d4bb7070 Free optimization
Using the TextLayoutCache with the GL renderer should help...

Change-Id: I73a19be040165212839e2a40d4183e998f9dfb7f
2012-01-17 17:31:27 -08:00
Svetoslav Ganov
0764dee89c Merge "AccessibilityEvent/AccessibilityNodeInfo class name property should be set to only framework classes." 2012-01-17 17:25:56 -08:00
Jeff Brown
5aa73ae58f Improve heuristics for orientation detection.
1. Except as otherwise indicated, orientation change happens once
   the predicted rotation has been stable for 40ms.  Noise is
   suppressed by a low-pass filter with a 200ms time constant which
   seems to be about as small as is practical given the quality
   of the sensor data.

2. If the magnitude exceeds a threshold (excessive noise or freefall),
   resets the predicted orientation.
   Doesn't happen very often even when shaking the device.
   This heuristic mainly protects the detector from spurious tilt due
   to inaccurate determination of the gravity vector.

3. If the device was previously in a flat posture (on a table for at
   least 1000ms), then it must move out of that posture for at least
   500ms before the next orientation change will happen.
   This heuristic suppresses most spurious rotations that happen while
   picking up the device.

4. If the device is tilted away from the user by 20 degrees within
   a span of 300ms, the device is said to be swinging and at least
   300ms must elapse after the device stops swinging before the
   next orientation change will happen.
   This heuristic suppresses some but not all spurious rotations that
   happen while putting down a device.  Unfortunately, this heuristic
   sometimes triggers a false positive when turning the device very
   rapidly due to accelerometer noise.  The 300ms pause is a compromise
   so that occasional mispredicted swings don't significantly delay
   the rotation.

Bug: 5796249
Change-Id: Id7b36c4c563e35b70d6a7ac36d04f3c3d6ea5811
2012-01-17 17:07:10 -08:00
Tadashi G. Takaoka
fa326d1c46 Merge "Use EditorInfo.IME_FLAG_FORCE_ASCII instead of privateImeOptions" 2012-01-17 16:57:56 -08:00
Teng-Hui Zhu
48592a3d21 Merge "Support javascript to exit full screen video." 2012-01-17 15:35:04 -08:00
Glenn Kasten
29a0909c5f Replace run-time stream types by compile-time
Use the AUDIO_STREAM_* constants defined in <system/audio.h> instead of
dynamically looking up stream types from AudioManager.

Replace a series of "if" statements by a switch.

Change-Id: I6d015bc151c9ab97a02492e84c63298b1f6f31ac
2012-01-17 15:33:20 -08:00
Adam Cohen
792840d48a Merge "Hinting RemoteViewsAdapter as to which views are visible" 2012-01-17 15:25:22 -08:00
Teng-Hui Zhu
d7678a1684 Support javascript to exit full screen video.
When javascript request exit full screen, WebViewCore need to handle the
message from webkit thread and hide the custom view.

Webkit part:
https://android-git.corp.google.com/g/#/c/158652/

Change-Id: I9edbb5a4059f330fb29df116ae076ec52f81a1af
2012-01-17 15:21:42 -08:00
Adam Cohen
b967392e01 Hinting RemoteViewsAdapter as to which views are visible
-> This prevents collection widgets from flashing loading
   views when they are updated with new content

Change-Id: I1241ff9a09edfd990ad03f76449d18b9359246b4
2012-01-17 15:21:34 -08:00
Eric Laurent
9bc8358dda audio framework: manage stream volume per device
Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.

The main changes are:
- AudioService now keeps tracks of stream volumes per device:
 volume indexes are kept in a HashMap < device , index>.
 active device is queried from policy manager when a volume change request
 is received
 initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.

Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
2012-01-17 15:15:04 -08:00
Michael Jurka
73d27c3d46 Merge "Check if View's alpha must be updated in setter" 2012-01-17 15:05:23 -08:00
Romain Guy
11d06a73df Merge "Fix text encoding when drawing with drawPosText in software" 2012-01-17 14:54:45 -08:00
Romain Guy
62b6eaa7f3 Fix text encoding when drawing with drawPosText in software
Change-Id: I0cd8ee526189c38c50953a1a08b50e0b31c55d8c
2012-01-17 14:53:26 -08:00
Svetoslav Ganov
8a78fd4d95 AccessibilityEvent/AccessibilityNodeInfo class name property should be set to only framework classes.
AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source
Java class. This is problematic since leads to leaking private classes which would allow an
accessibility service to load classes from other packages. This is strongly undesirable since
not trusted code can be loaded, and hence executed, in the accessibility service. To address
that the class name is set to the most concrete framework class extended by the info/event
source.

bug:5878943

Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
2012-01-17 14:51:45 -08:00
Adam Powell
c8fcde2b6b Fix DeviceDefault theme/style bugs where parent styles were
incorrectly specified.

This affected search bars and alert dialogs spawned from activities
using Theme.DeviceDefault.Light as a base.

Change-Id: I219d38d486498db5b4b283560256afd7d6051535
2012-01-17 12:58:23 -08:00
Michael Jurka
a7a7eedee5 Check if View's alpha must be updated in setter
Change-Id: I91094b43dbacbd637e04ce4074d8df6a27ddf6fb
2012-01-17 12:41:31 -08:00
Fabrice Di Meglio
c7c09960ff Merge "Fix bug #5870701 Thai text can be clipped when there are more glyphs generated than the initial number of code points" 2012-01-17 11:51:22 -08:00
Glenn Kasten
fb6b5bdcea Merge "Use audio_mode_t consistently" 2012-01-17 11:32:53 -08:00
Romain Guy
f56945e06a Merge "Improve GLES20Canvas clip support" 2012-01-17 11:30:22 -08:00
Romain Guy
7677d8f006 Improve GLES20Canvas clip support
Remove UnsupportedOperationException
Add primitive support for clipPath/clipRegion
Add support for quickReject(Path, EdgeType)

Change-Id: Ie7a80df7f380f488710bac31103772a9eab21612
2012-01-17 11:22:42 -08:00
Gilles Debunne
185b8256f5 Fixed doc typo and removed warning
Change-Id: I9c9e45837037a77df5852ff4ea3ad596952e4507
2012-01-17 11:12:27 -08:00
Gilles Debunne
c478c171e9 Unbalanced batch edit begin and end leave TextView unresponsive
This is a fix for http://code.google.com/p/android/issues/detail?id=17508

Adding some logs and a forced GC, I'm now reliably able to reproduce it. Here is the scenario.

1. The IME handles an event. It retrieves the current InputConnection (IC) using
   ic = getCurrentInputConnection() and calls ic.beginBatchEdit();
2. The call is propagated to the UI thread and TextView's mBatchEditNesting
   is correctly increased through beginBatchEdit()
3. A listener calls setText(), which imm.restartInput(this);
4. As a result, the InputMethodManager creates a new ControlledInputConnectionWrapper
   with a new InputConnection from the TextView
5. A GC happens at that point. The previous InputConnection is no longeri
   referenced by the InputMethodManager's mServedInputConnection.
   The weak reference in the previous ControlledInputConnectionWrapper is nulled.
6. The IME thread finishes its process and calls ic.endBatchEdit(); on its version
   of the original InputConnection.
7. The message is passed through the InputConnect, but when the weak reference in the
   original IInputConnectionWrapper is dereferenced, we get a null InputConnection in
   executeMessage().
8. As a result, the TextView's endBatchEdit() method is not called, leaving this TextView
   with a non zero mBatchEditNesting.
9. From now on, all edit actions on this TextView will be considered part of a nested edition
   and no invalidation is performed, which is the visible manifestation of this bug.

The core problem is that the begin/end batch edit contract is broken when:
1. These are initiated by the IME thread (as opposed to the UI thread)
2. The input connection is reset between these calls
3. A GC happens in the mean time and the WeakReference is lost (otherwise
   calling endBatchEdit on a no longer active InputConnection is fine

Solution to keep TextView's mBatchEditNesting balanced:

- The IMM should notify the IC when it is no longer used. We're using the
existing FINISH_INPUT_CONNECTION to do that.
- The InputConnection should keep track of its nesting contribution to the TextView.
When finished the IC makes sure its contribution is reset to 0.
Moreover, further asynchonous calls to begin/endBatchEdit that may arrive from the IME
should be ignored. This is achieved using a negative value as a flag.

Notes:

- finishComposingText may be too broad of a method to perform such a cleaning step
but is seems to only be called in cases where the IC will not be used anymore.
If that's too broad, we have to introduce a new method in the IC interface.

- This is has been implemented in EditableInputConnection and not in a more general
BaseInputConnection because this is where we have a notion of TextEdit, and the
nesting problem is here specific to TextView.
However, the same unbalanced begin/end problem will happen in these classes. They
should override finishComposingText as has been done here if that matters.

- We cannot re-use the TextView's mBatchEditNesting since it may take into account
batch edit from various sources and resetting it on InputConnection close could
then lead to an inconsistent negative count value.

Patch Set 2: added synchronized blocks around mBatchEditNesting

Change-Id: I1ec5518fdc16fb0551fbce9d13f5d92eb4bc78c0
2012-01-17 10:52:20 -08:00
Teng-Hui Zhu
01cc1d1e8c Merge "Document update for WebView user to support HTML5 video" 2012-01-17 09:06:02 -08:00
John Reck
c83a666fe6 Merge "Expand WebKitHitTest and do some preliminary caching" 2012-01-17 09:00:49 -08:00
Glenn Kasten
cc767191cf Fix build for SDK on Mac
Change-Id: If99541e3537edbe3636e06b1766aa31d877a2fc8
2012-01-17 08:38:51 -08:00
Glenn Kasten
3c6b9cca79 Merge "Use audio_stream_type_t consistently" 2012-01-17 07:25:36 -08:00
Glenn Kasten
a7f6562065 Merge "Add android.os.Process.setThreadScheduler" 2012-01-17 07:20:47 -08:00
Tadashi G. Takaoka
b91b2682c3 Use EditorInfo.IME_FLAG_FORCE_ASCII instead of privateImeOptions
This change overrides I59bb56f6.

Bug: 5850605
Change-Id: Iac92a3f618df2a20c5b45698780815cedbec723a
2012-01-17 15:05:48 +09:00
Fabrice Di Meglio
03e250aefa Fix bug #5870701 Thai text can be clipped when there are more glyphs generated than the initial number of code points
- compute total advances correctly by iterating on the advances array for up to mShaperItem.num_glyphs
- update unit tests

Change-Id: I00af68bef88702215e9222ed80dbffcc81df51a7
2012-01-13 19:49:46 -08:00
Dianne Hackborn
dda932005b am d4d68fe2: am cc7bd5ab: Merge "Update notification documentation to follow current guidelines." into ics-mr1
* commit 'd4d68fe20259e2d6aaae8bc4a38b360aa0b57081':
  Update notification documentation to follow current guidelines.
2012-01-13 18:25:31 -08:00
Dianne Hackborn
d4d68fe202 am cc7bd5ab: Merge "Update notification documentation to follow current guidelines." into ics-mr1
* commit 'cc7bd5ab550855c14c76701709b35d12a9677eb2':
  Update notification documentation to follow current guidelines.
2012-01-13 18:23:34 -08:00