1931 Commits

Author SHA1 Message Date
Jeff Brown
9704e78418 Merge "Refactor SensorManager to move non-API bits into a subclass." 2012-04-16 15:46:47 -07:00
Jeff Brown
25157e458d Refactor SensorManager to move non-API bits into a subclass.
Changed the SensorManager class so that it only contains API-related
bits including what's needed to support legacy sensors.  Mostly just
moved stuff around.  Making the class abstract is safe because
it does not have a visible constructor in the API.

One minor change is that the cache of sensor type to sensor lists
is now per instance of SensorManager instead of being static.
We can fix this if desired.

Another small change is that we bail out early from registerListener
if the listener has already been registered for the particular
sensor.  This happened for both legacy and standard listeners.
The problem is that the ListenerDelegate maintains two lists of
sensors, one is a Map and the other is a List.  Adding a sensor
twice causes one entry to be added to the Map and two entries to be
added to the List, but when the sensor is removed the next time, only
one entry is removed from the List, leaving it in an inconsistent
state.

Removed Sensor.getLegacyType() since the value it provides is only
needed in LegacyListener and we don't really save any significant
computation by caching it.  Removing the field makes support for
legacy sensors a little more self-contained.

Bug: 6339552
Change-Id: I50d41ac97cf535924f2bfa2026d28547a4d00286
2012-04-16 13:03:55 -07:00
Jeff Sharkey
123328778e Merge "Move TrafficStats iface counters to xt_qtaguid." 2012-04-16 12:11:21 -07:00
Jamie Gennis
721bfaa63d SurfaceTexture: fix updateTexImage JNI
Sigh...

Change-Id: I0271bed44c58e0c9a03eda4886eb2c1ee76e041f
2012-04-13 19:14:37 -07:00
Jamie Gennis
dbed083ff0 Merge "SurfaceTexture: update API docs" 2012-04-13 18:02:28 -07:00
Jeff Brown
a47425a13c Add support for input devices that have vibrators.
Added a getVibrator() method to InputDevice which returns a Vibrator
associated with that input device.  Its uses the same API as the
system vibrator which makes it easy for applications to be modified
to use one or the other.

Bug: 6334179
Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e
2012-04-13 17:01:15 -07:00
Jamie Gennis
2b4bfa5efe SurfaceTexture: update API docs
This change updates the SurfaceTexture API docs and modifies the behavior of
the updateTexImage to produce an IllegalStateException when not attached to a
GLES context.

Change-Id: I5a0875927785108960985c567d571d5f7033256a
2012-04-13 16:04:15 -07:00
Jeff Brown
882735972e Merge "Notify applications when input devices change." 2012-04-12 18:55:57 -07:00
Jeff Brown
af9e8d3818 Notify applications when input devices change.
This change allows the InputManager to keep track of what input
devices are registered with the system and when they change.
It needs to do this so that it can properly clear its cache of
input device properties (especially the key map!) when changes
occur.

Added new API so that applications can register listeners for
input device changes.

Fixed a minor bug in EventHub where it didn't handle EPOLLHUP
properly so it would spam the log about unsupposed epoll events
until inotify noticed that the device was gone and removed it.

Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
2012-04-12 18:54:54 -07:00
Irfan Sheriff
d4fecc2567 Merge "Pre-association service discovery support" 2012-04-12 18:33:05 -07:00
Irfan Sheriff
21ba815332 Pre-association service discovery support
Add UPnp, Bonjour and vendor specific support for discovering services on
Wi-Fi direct before establishing a connection.

Change-Id: I1c1f3427180abdc80a4e682e713adc7f0326c5ef
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
2012-04-12 17:50:29 -07:00
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 Sharkey
234766a36a Move TrafficStats iface counters to xt_qtaguid.
Use xt_qtaguid iface_stat_all counters, which are monotonic during
a single boot.

Track all ifaces associated with mobile networks since boot, and
move TrafficStats to using these ifaces.  This will include usage of
networks omitted from config_data_usage_network_types, specifically
on devices that recycle network interfaces across APNs.

Split wildcard template matching, and move NetworkStatsService to
use mobile wildcard when logging stats.

Bug: 5324515
Change-Id: I2211c374c05d1b598cc647f2f873630538955ffe
2012-04-12 14:53:32 -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