13072 Commits

Author SHA1 Message Date
Jim Miller
848024f744 Merge "Fix 3201849: Remove builder pattern from DrawableHolder setters" 2010-12-03 14:21:42 -08:00
Wink Saville
17db4067a3 Merge "Cleanup logging." 2010-12-03 12:16:50 -08:00
Wink Saville
ed9c02b56c Cleanup logging.
Change-Id: Ie73c6d97ec19b0d27e58c085b60e885d90066056
2010-12-03 12:01:38 -08:00
Jeff Brown
9f3bdfe3eb Add method for sending wallpaper commands directly to an engine.
This enables the livewallpaper preview activity to send tap commands to the
wallpaper so that the preview is more interactive.

Also add a command for sending secondary pointer taps for multitouch
enabled wallpapers.

Change-Id: I9fa10cc47d92dfa9f1a1208aba44c66943eee3ec
2010-12-03 11:35:42 -08:00
Amith Yamasani
3b7fec8d56 Merge "Use SearchView in SearchDialog for legacy apps using the old model." 2010-12-03 11:22:48 -08:00
Amith Yamasani
968ec93839 Use SearchView in SearchDialog for legacy apps using the old model.
Bug: 3140925

Removed all the code from SearchDialog that is already in SearchView
and moved more stuff into SearchView.

SearchDialog layout changed to be more like a Holo.Light themed action mode.
Search field is right justified and limited to 500dip.

Zero query dropdown added to SearchView (causing some problems with Gmail,
but that may be an existing issue that's only now showing up due to this change)

Holo.Light search views assets still need to be updated, as the contrast is too low.
2010-12-03 11:18:25 -08:00
Teng-Hui Zhu
c99821d01a Fix the stretching issue when viewport change.
When native webkit code ask java to provide the visibleRect,
the calculation should not take the overscrolling into concern.

The original change was added for this issue, http://b/issue?id=2496502,
and we don't have overscroll any more, so it should be safe to
revert the original change.

bug:3212547

Change-Id: I57e3353b3277f83302ccfd9916a38aa691fa15c7
2010-12-03 10:59:19 -08:00
Dianne Hackborn
189ee18d6c Implement smarter sizing of WRAP_CONTENT windows.
This extends the view hierarchy's measure pass to allow view to
propagate up to their parent additional information besides just
their measured size.  They can now report that their measured width
and/or height should be larger than the size their parent is
limiting them to (even though by definition they need to contrain
their reported measurements to the limits imposed by the parent).

ViewRoot uses this information to determine if it should remeasure
the window with a larger size limit to try to make it fit.

Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
2010-12-03 10:46:18 -08:00
Cary Clark
32820249ad abandon long press on scroll; clear hit on keydown
If the application scrolls the webview without allowing
WebView.java to receive the motion event, stop any long
press timer in progress. This prevents select text from
appearing in applications that host webviews and do their
own flinging.

If the cursor is moved with the dpad or trackball,
reset the hit test state used by long press. This allows
cts tests to run reliably; they emulate key presses
to move between links.

bug:3250291 (app fling)
bug:3241830 (cts fail)
Change-Id: Ida364051ffa090455ddc6c3c3dd41baea5615293
2010-12-03 10:52:07 -05:00
Patrick Scott
2f492277ea Attempt to scroll layers everytime the user drags.
This allows the user to continue scrolling a layer even after reaching the end
of it.  Only pin the fling velocity in the direction of the fling.  This is
preparation for flinging layers.

Record the inval region when updating layers so that the new layer will draw.

TODO: Keep track of whether the user started on a layer to prevent scrolling a
layer if the user drags across one.

Bug: 3022562

Change-Id: I25f84497a67dfb1e0fc424207f6c97817715501c
2010-12-03 10:32:57 -05:00
Steve Block
bcdf40b42f Merge "Update WebView.addJavascriptInterface() to ignore null instances" 2010-12-03 03:38:00 -08:00
Bjorn Bringert
1921eab4e7 Merge "Only decrement mRemaining once in read()." 2010-12-03 01:28:05 -08:00
Jim Miller
c002fab06d Fix 3201849: Remove builder pattern from DrawableHolder setters
This removes the builder pattern from DrawableHolder setters
to avoid reflection and unnecessary GCs in Animators.

Change-Id: I8e3485823f30f10d768d0ab447a5ee3281a363f0
2010-12-02 20:43:15 -08:00
Joe Onorato
2e585f7e22 Make AbsSeekBar support having setThumb called after initialization is done.
Change-Id: Ic7c2e1a4ec067f50a95aaff924bbd7bc453a575f
2010-12-02 16:52:17 -08:00
Gilles Debunne
9d5055a2bc Merge "Fix in vertical measurement in text lines with different text sizes" 2010-12-02 16:47:50 -08:00
Gilles Debunne
0bb000931b Fix in vertical measurement in text lines with different text sizes
The last span of the TextLine was defining the FontMetrics, instead of
min/maxing the different values.

Bug 3220698

Change-Id: I7394b1699a15aeee4cc38462d561faf329d3e1f6
2010-12-02 16:18:54 -08:00
Brad Fitzpatrick
bcee0ef7ea Merge "sampling profiler hz -> ms" 2010-12-02 16:10:02 -08:00
Jeff Brown
fddcb06174 Merge "Improve support for external keyboards." 2010-12-02 16:03:05 -08:00
Jeff Brown
9065504a63 Improve support for external keyboards.
Use Vendor ID, Product ID and optionally the Version to
locate keymaps and configuration files for external devices.

Moved virtual key definition parsing to native code so that
EventHub can identify touch screens with virtual keys and load
the appropriate key layout file.

Cleaned up a lot of old code in EventHub.

Fixed a regression in ViewRoot's fallback event handling.

Fixed a minor bug in FileMap that caused it to try to munmap
or close invalid handled when released if the attempt to map
the file failed.

Added a couple of new String8 conveniences for formatting strings.

Modified Tokenizer to fall back to open+read when mmap fails since
we can't mmap sysfs files as needed to open the virtual key
definition files in /sys/board_properties/.

Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
2010-12-02 16:01:32 -08:00
Brad Fitzpatrick
d7ad0d2837 sampling profiler hz -> ms
Goes along with def41ec2e8 / Ifcfc343

Change-Id: Ia5cc90e6f8d83dcdf40802859002507980310d06
2010-12-02 15:30:23 -08:00
Fabrice Di Meglio
ac92fb05ff Merge "Add better SQL exception handling to the Sync framework (see bug #3202693)" 2010-12-02 14:32:20 -08:00
Fabrice Di Meglio
eca53640a8 Add better SQL exception handling to the Sync framework (see bug #3202693)
- do the reply.writeNoException() only if there are NO exceptions
- before, the code could actually generate an exception when asking for the count or the index,
and then the exception could not be unmaarshalled because we previously calling reply.writeNoException()

Change-Id: I241120878c3fc10fea5fbaeb74f9124b1413a3d4
2010-12-02 14:28:32 -08:00
Adam Powell
049dd3d4a4 Fix bug 3248786 - silly monkeys.
Change-Id: I41306cae06a7b4fd3852e0760ae668c8d6eacc5d
2010-12-02 13:45:30 -08:00
Steve Block
544295eebc Update WebView.addJavascriptInterface() to ignore null instances
Bug: 3247571
Change-Id: If6a108fe926e45dc3e298f197f6534c575c560e2
2010-12-02 18:40:06 +00:00
Gilles Debunne
f4dceb1946 Customized text selection action mode.
Refactored to use a custom Callback instance instead.

This instance can be shared by different TextView, which no longer have to
be overloaded.

Change-Id: I4749905d8e2057dab2b3ded62bd7c388d13d4e57
2010-12-02 10:24:03 -08:00
Wink Saville
d66c63e56e Merge "Remove the need for a token parameter from AsyncChannel." 2010-12-02 09:51:05 -08:00
Mike Lockwood
1474c7a2b6 PTP: Add android.provider.Ptp to the public API
This will allow 3rd party apps to access files on digital cameras via the PTP protocol

BUG: 3210830

Change-Id: I06dbf2842a7eea2e0749e2124bb7b7a65e8901c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-02 12:13:37 -05:00
Bjorn Bringert
212799338d Only decrement mRemaining once in read().
In the old code AssetFileDescriptor.AutoCloseInputStream.read()
called super.read(), which calls read(byte[] buffer, int offset, int count),
which decrements mRemaining. Then read() decremented mRemaining again
after super.read() returned.

I'm extending the CTS tests for AssetFileDescriptor.AutoCloseInputStream
to cover this.

Bug: 3240844
Change-Id: I70b945abc773d3ce5c1317dad23a0d797b31f111
2010-12-02 11:36:47 +00:00
Romain Guy
eeb55e673f Don't reset ListView when changing the divider drawable.
Bug #3245172

Change-Id: I36e20bc63e503ffff9c2354e7cc48e5574bb0c4a
2010-12-02 00:12:46 -08:00
Romain Guy
7d69594580 Skip DIRTY_OPAQUE optimizations when ViewRoot changes the dirty region.
Bug #3159481

Change-Id: I97d6517f4648b3efe8b13a277e0374844a4d8455
2010-12-02 00:11:12 -08:00
Michael Jurka
23fe0ce427 Merge "Revert "Re-add performance optimization in View"" 2010-12-02 00:09:28 -08:00
Michael Jurka
67f23ba649 Revert "Re-add performance optimization in View"
Found reproducible cases of Launcher freezing up due to this change

This reverts commit 62490bd358cd001e00cb643cf3879d736c448788.

Change-Id: I1b10e05ee9f0c43566b53c7a11e61fc168d17a75
2010-12-02 00:06:26 -08:00
Adam Powell
fcca00accb Update themes; dialogs, metrics
Add divider attributes to LinearLayout, plus styles for borderless
buttons. Update text field assets.

Change-Id: I673acab1692cc028a0327e8c154069253a4d52e8
2010-12-01 23:23:21 -08:00
Wink Saville
cfce303cbd Remove the need for a token parameter from AsyncChannel.
By returning the channel object it self it is unnecessary
to have a token. Also, no current code needed it, if its
needed in the future it can be added back.

Change-Id: Ie1d2a1e885f9cd74e95663711ccefb760811bf16
2010-12-01 23:20:25 -08:00
Brian Carlstrom
db1a3ba219 Merge "Resurrect SamplingProfilerIntegration" 2010-12-01 16:23:58 -08:00
Dianne Hackborn
30c9bd8955 Implement issue #3189564: New API to create an activity.
Change-Id: I7aef83324d653130eb3b2a148ba089d7347e6ba6
2010-12-01 16:13:44 -08:00
Brian Carlstrom
def41ec2e8 Resurrect SamplingProfilerIntegration
1.) Change from samples per second (persist.sys.profiler_hz) to
    interval between samples (persist.sys.profiler_ms) to match
    underlying SamplingProfiler API.  This allows samples to be taken
    less often than a second, which allows lower overhead for always
    on profiling.

2.) Add persist.sys.profiler_depth to control the number of frames
    kept. Currently defaults to 4 which is the default hprof depth,
    but often 12 is necessary even in benchmarks to get a good idea
    where time is being spent.

3.) Moved SNAPSHOT_DIR creation to initialization time instead of
    checking it on every sample.

4.) Used ThreadFactory to provide human readable name to writeSnapshot
    Executor thread.

5.) Fixed bug where writeZygoteSnapshot was calling wrong variant of
    writeSnapshot causing profiling to prevent zygote startup. Renamed
    underling private writeSnapshot to writeSnapshotFile to try to
    prevent future confusion.

Change-Id: Ifcfc343816b19f13a6eef2cbf25cde334d8adc3b
2010-12-01 15:40:38 -08:00
James Dong
dd0b16c268 Add two methods to Camera.java
o getSupportedVideoSizes() allows us to retrieve the list of the supported
  video sizes from the camera

o getPreferredPreviewSizeForVideoRecording() allows us to retrieve the
  preferred/recommended preview size for camcorder applications

bug - 3237021

Change-Id: I52fc9938d389bb411406320b0309775b6f44f4dc
2010-12-01 15:38:06 -08:00
Christopher Tate
407b4e91fe API CHANGE: drags can now carry an originator-only object payload
When calling startDrag(), the app can now supply an Object to be passed
along in every DragEvent that the app winds up receiving itself.  This
object is *not* passed to any other applications; it's strictly app-
local.  The purpose is to allow state tracking/management to be done
directly through the drag mechanism rather than requiring out-of-band
code.

An example of the utility here might be TextEdit widgets.  A drag that
starts in one TextEdit but ends in a different one should be treated as
a copy/paste operation, where the originating TextEdit is not altered.
However, a drag that starts and ends in the *same* TextEdit is a 'move'
operation within that TextEdit; the text is removed from its original
position and inserted at the drop point.  To support this easily, the
drag/drop code in TextEdit can now pass a pointer to the originating
view as the local state object.  Then, the drop recipient could tell
whether the drag started within the same TextEdit without needing to
implement any other out-of-band state tracking.

This CL (and its accompanying CLs in a few other packages where the
startDrag() API is being used) adds the new local-state parameter to
the API, but does not actually change the behavior of any existing
clients.

Change-Id: Icba73b2ab4a650b7a94485a19633065b0ef9058c
2010-12-01 14:45:06 -08:00
Kenny Root
4da12f07b5 am 1de6ca69: am 938d0972: Merge "Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService" into gingerbread
* commit '1de6ca69cc541ccdd651071c8bd5629af4e09664':
  Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
2010-12-01 14:23:19 -08:00
Kenny Root
1de6ca69cc am 938d0972: Merge "Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService" into gingerbread
* commit '938d097263416ad416ee995e62dab559ea50bf0d':
  Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
2010-12-01 14:20:49 -08:00
Kenny Root
938d097263 Merge "Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService" into gingerbread 2010-12-01 14:18:23 -08:00
Teng-Hui Zhu
a7f76874f5 Use the globalLayout to notify the GlViewport change
Given the fact that our optimization is enforced to avoid sending
the onLayout message down to webView, utilizing the globalLayoutChange
message seems like the best solution here.

http://b/issue?id=3103077

Change-Id: I9a2d5576454641802019a5eeb64908026b40dd9b
2010-12-01 14:11:10 -08:00
Teng-Hui Zhu
e6fb0f1d7c Properly set the viewport for WebView when using GL
This is the first step, get the calculation right.
We still need to get the right message handling to get
the correct animation in Gmail .

http://b/issue?id=3103077

Change-Id: I3ed186b62ddb285e92a71d3ba5c02d4965068282
2010-12-01 14:11:10 -08:00
Gilles Debunne
2825366c56 A double tap starts selection when done on text only.
Change-Id: Id758645d1ebf482a09e35b158e8665d1153db498
2010-12-01 13:53:27 -08:00
Leon Scroggins
2ac445cbb7 Do not remove the embedded title bar when starting Find.
Bug:2927138
Change-Id: I97adb4431aedca172a5951d727ad559de5101924
2010-12-01 16:34:00 -05:00
Gilles Debunne
2226a19f70 Refactor onDrop in TextView
Change-Id: Ied80565852a452c15c7b7a66cbb05965bead04cd
2010-12-01 13:28:49 -08:00
Adam Powell
8515ee846b Fix bug 3240444 - add OnMenuVisibilityListener for action bar.
Fix bug 3180015 - leaking window handles on configuration change for
action bar dropdown menus

Rename ActionBar.NavigationCallback to something more consistent with
the rest of the API.

Change-Id: Ic1fb4c07484c57a72649b30e27d220b18cda6cdf
2010-12-01 13:03:44 -08:00
Gilles Debunne
fff4ab09b6 Refactored OverScroller
Restored the interpolator and a constructor with 4 parameters.

New spline coefficients, spline computation moved to MagneticOverScroller, which has been
renamed SplineOverScroller.

Change-Id: If1ab2653bb998600e9c5d6f46dfd6cd30fa44efc
2010-12-01 11:41:42 -08:00
Kenny Root
1de2eac9d0 Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
Be compatible with the old DownloadProvider behavior of being able to
operate on content URIs returned from .insert()

Bug: 3242328
Change-Id: I7dad15ac0fefa867c3c8a33a579fc9899ac80262
2010-12-01 11:37:53 -08:00