1919 Commits

Author SHA1 Message Date
Fabrice Di Meglio
62901af52a Merge "Add Paint.setTextLocale()" 2012-04-12 17:37:44 -07:00
Fabrice Di Meglio
f98c8b32e8 Merge "Add new Arabic font for SystemUI" 2012-04-12 17:36:18 -07:00
Fabrice Di Meglio
517825f1a9 Add Paint.setTextLocale()
- will be used for better shaping CJK and other goodies

Change-Id: If64945a337edd915f5ebb88f04b6fd18e92ca587
2012-04-12 17:31:17 -07:00
Fabrice Di Meglio
276de3e1eb Add new Arabic font for SystemUI
- still work in progress
- bug #5987379

Change-Id: I0a7f7437c9061eab0abc9d5979c947eb5511992a
2012-04-12 16:40:56 -07:00
Elliott Hughes
3f177d7c9a Bump the interpreter stack size for the main thread.
Bug: 6315322
Change-Id: I8d84e7c2e0eeb5314530b8a8b141f44014b8c646
2012-04-12 16:02:56 -07:00
Jeff Brown
3bdcdd8531 Be more careful about exceptions in input callbacks.
consumeEvents() may be called reentrantly so we need to be
careful when handling exceptions.  When called directly
through JNI, the exception should be allowed to bubble up
to the caller.  When called from a Looper callback, the
exception should be recorded on the MessageQueue and bubbled
when the call to nativePollOnce() returns.

Bug: 6312938
Change-Id: Ief5e315802f586aa85af7eef1bd6e9bea4ce24ab
2012-04-10 20:36:07 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -07:00
Jesse Hall
9d873d439f Merge "Avoid waking EGL in getInitCount" 2012-04-09 22:43:34 -07:00
Jeff Brown
603b445896 Ensure that apps crash if they throw exceptions.
Previously, if an app threw an uncaught exception in an input,
vsync or native activity callback, it would log the exception then
continue limping merrily along.  In the case of input, it
could result in an ANR occurring because we had not drained
all of the pending input events and marked them as finished
(we only marked the most recent one finished).

Bug: 6304124
Change-Id: I87d76f7fd605e1a8af1237c66d8d62973080277e
2012-04-06 18:25:09 -07:00
Jesse Hall
9847f311f6 Avoid waking EGL in getInitCount
Change-Id: I5e0423b090c27fa4262e2a76ce4d232f8fbb8755
2012-04-05 18:37:43 -07:00
Jamie Gennis
c6d9930777 SurfaceTexture: add GL context attach & detach
This change adds Java API support for detaching a SurfaceTexture from one GLES
context and then attaching it to a different one.

Change-Id: I8eed4b0d0e339c11598cb0408d9f4f2d99b3aa06
2012-04-05 16:11:43 -07:00
Amith Yamasani
1da8f00a4c Merge "Embed layout padding in nine patch images" 2012-04-04 13:49:05 -07:00
Amith Yamasani
ec4a50428d Embed layout padding in nine patch images
- Added a new custom PNG chunk that carries the layout padding ints.
- Extract the padding ticks from .9.png images and store in the chunk.
- Load the padding information at runtime into Bitmap and NinePatchDrawable.

- The new chunk is ordered first so that it doesn't cause a problem in older
  versions of the platform.

Bug: 6087201

Change-Id: I5de46167a1d44b3ec21065b0c165e594b1dc8399
2012-04-04 12:05:59 -07:00
Chet Haase
db8c9a6a4d Optimization of alpha with DisplayList properties
Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
2012-04-03 14:02:17 -07:00
Chris Craik
b6a80077dc Merge "Allow fine-grained control over functors execution" 2012-04-02 17:07:21 -07:00
Chet Haase
9420abd56a Re-enable DisplayList properties.
Re-enabling DisplayList properties last week caused some app
errors due to the way that some transforms were being handled (specifically,
those coming from the old Animations and ViewGroup's childStaticTransformation
field). This change pushes *all* transform/alpha data from View.draw() into
the view's DisplayList, making DisplayLists more encapsulated (and correct).

Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
2012-04-02 15:31:24 -07:00
Romain Guy
8f3b8e3299 Allow fine-grained control over functors execution
Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
2012-04-02 15:15:07 -07:00
Jeff Brown
3e09cc98f4 Merge "Info logs should be loggable by default." 2012-04-02 11:03:36 -07:00
Jeff Brown
d56feb91b4 Info logs should be loggable by default.
Bug: 6265031
Change-Id: I6f10818c1d28fa71f434d4b372c764d04967d213
2012-04-02 10:53:17 -07:00
Romain Guy
6db53c34a7 Fix builds without USE_OPENGL_RENDERER
Change-Id: I84b8dfb57dcc7de700d481774efded88e51d361a
2012-04-02 10:52:52 -07:00
Eric Laurent
3d275af3c3 Merge "implemented synchronous audio capture" 2012-03-30 16:00:26 -07:00
Romain Guy
7687882800 Detect surface resizes
HardwareRenderer normally relies on the window manager to be notified of
surface dimension changes. It is however possible to execute a drawing pass
before receiving the window manager notification. We must therefore compare
the actual size of the target surface to the window size and perform a full
redraw when they are not the same.

Change-Id: Idccc8592f3f777edee1ef67a98a4c2a825dcfba7
2012-03-30 14:54:22 -07:00
Eric Laurent
505e5c8859 implemented synchronous audio capture
Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.

Also added a method to query the audio session from a ToneGenerator.

Change-Id: I4e47f5108c7cbbd3bd334a7fad9b3b6c5ba55d88
2012-03-29 19:48:40 -07:00
Jeff Brown
58a40a3e92 Merge "Refactor DisplayEventReceiver read loop." 2012-03-29 15:13:21 -07:00
Jeff Brown
bec0a8682c Refactor DisplayEventReceiver read loop.
Change-Id: I98ef802ec0ca48f768e3b0920e1b4b4f7f141050
2012-03-29 13:10:56 -07:00
Romain Guy
001dd0cb78 Merge "Refactor GLES20Canvas/HardwareRenderer JNI layers" 2012-03-28 16:48:34 -07:00
Romain Guy
244ada1d35 Refactor GLES20Canvas/HardwareRenderer JNI layers
GLES20Canvas defined several JNI functions used only by HardwareRenderer.
Now that we have a JNI layer dedicated to HardwareRenderer we should
host the renderer related methods there.

Change-Id: I0bcb4ad0bcc1c4a37290df10c1685f2cfe5504ca
2012-03-28 16:41:26 -07:00
Fabrice Di Meglio
b2a331eae9 Merge "Fix bug #6248364 Tamil and Denavagari text crash in Google+" 2012-03-28 16:10:06 -07:00
Fabrice Di Meglio
43e4985abf Fix bug #6248364 Tamil and Denavagari text crash in Google+
- fix initialization of variables

Change-Id: Ibda4e1e6f55f867385eaf9a4c7a754c16815bbf0
2012-03-28 16:05:36 -07:00
James Dong
ba4d043331 frameworks base Android.mk file changes
Change-Id: I7459b9e959a60751b8fa6e0d893cb2c820c064ce
2012-03-28 11:03:25 -07:00
James Dong
d927a1d996 Deleted the media, camera, drm related files since they are relocated
Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
2012-03-28 10:42:44 -07:00
Romain Guy
6554943a1d Use a status_t return type for GL functors
WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
2012-03-26 16:45:05 -07:00
Colin Cross
a982dc05d7 frameworks/base: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
2012-03-22 18:43:07 -07:00
Romain Guy
0084322750 Merge "Pre-scale bitmaps on the native heap" 2012-03-19 18:52:09 -07:00
Romain Guy
7b2f8b8fb7 Pre-scale bitmaps on the native heap
Change-Id: I9819b532b89a997ab775b31ffee46445f1d16e20
2012-03-19 18:47:06 -07:00
Glenn Kasten
ae75f994cc Add libmedia_native
Change-Id: Ib8cff8abd73723b793f08da99ad59549f219e0e7
2012-03-16 11:51:30 -07:00
Jeff Brown
543ec1c808 Merge "If an application calls System.exit() terminate it immediately." 2012-03-16 11:01:20 -07:00
Jeff Brown
c1ac23db26 Merge "Delete useless JNI methods." 2012-03-16 11:01:04 -07:00
Wu-cheng Li
8d3c318b2d Merge "Add a new camera open API that allows taking the ownership." 2012-03-15 21:23:24 -07:00
Jeff Brown
4280c4a93e If an application calls System.exit() terminate it immediately.
There is no graceful way to kill Android application processes.
They typically have many threads running doing various things
When System.exit() is called, those threads just keep going
while the cleanup actions run until the process finally.

Performing shutdown actions can easily cause more harm than good.
For example, closing the Binder driver's file descriptor may
cause other threads waiting on Binder to wake up and then crash
in nasty ways after receiving EBADF.

So when an Android application exits, skip the cleanup and just
call _exit() to end it all.

Bug: 6168809
Change-Id: I29790c064426a0bf7dae7cdf444eea3eef1d5275
2012-03-15 19:59:23 -07:00
Romain Guy
caf813fe1e Remove unused private API
Change-Id: Iec9c2bc275fc7376f4e0b0b9c44059c56a9dd173
2012-03-15 18:57:48 -07:00
Jeff Brown
16f5f5cc9d Delete useless JNI methods.
Change-Id: Ie7c7638c79fc9c6a43f45604ad9a40ebc58b93c7
2012-03-15 16:58:22 -07:00
Jeff Brown
c0102b7a7d Merge "Port the SQLite locale setting code to Java." 2012-03-15 16:07:08 -07:00
Jeff Brown
1d9f742e00 Port the SQLite locale setting code to Java.
Make the database opening code more robust in the case of
read-only database connections.

Check whether a PRAGMA needs to be issues before doing it.
Mostly it's harmless but it can grab a transaction on the
database unnecessarily.

Change-Id: Iab2cdc96c785e767f82966b00597e19337163f2f
2012-03-15 16:02:58 -07:00
Kenny Root
5461f5e8b9 Merge "Add support for EINTR in BT" 2012-03-15 13:09:28 -07:00
Kenny Root
a0db022419 Add support for EINTR in BT
During normal operation, it's common on a multi-core device to get
EINTR. This is especially noticable during a bugreport where several
services get EINTR even though it's not fatal.

This change adds TEMP_FAILURE_RETRY around the system calls that can
receive EINTR where a retry should happen.

Change-Id: If13d24f57c587392f57961fe2caf46e2a6fa843e
2012-03-15 09:56:14 -07:00
Wu-cheng Li
a1c41e13b5 Add a new camera open API that allows taking the ownership.
The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.

bug:5584464

Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
2012-03-15 14:50:48 +08:00
Glenn Kasten
6940484150 Merge "Use correct syntax for #include <> """ 2012-03-14 13:54:21 -07:00
Glenn Kasten
c81d31c3f8 Use correct syntax for #include <> ""
Change-Id: I943137108668ae66f8eba18dafe069a7951bcd8f
2012-03-13 16:14:19 -07:00
Jeff Brown
9dc348d756 Merge "Fix spurious ANRs in native activities." 2012-03-13 15:15:48 -07:00