• Home
  • History
  • Annotate
  • only in /frameworks/base/services/jni/
History log of /frameworks/base/services/jni/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0a19d001c4ffbeec7e4e23b7640fff6bd7f11bc7 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix a segfault when there is no power module.

This can happen in the emulator.

Bug: 7315152
Change-Id: I4a3f547127419fcd4dc4fc1c6f7ee869706cf12e
om_android_server_power_PowerManagerService.cpp
9e316a1a2a8d734315bbd56a85308f9657a92913 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Blank or unblank all displays as need.

Ensures that both the internal display and HDMI are blanked
or unblanked in tandem.

Bug: 7309812
Change-Id: Ie8b96d393e8bb20d23c92f3320142d9f7cf42aff
om_android_server_power_PowerManagerService.cpp
94ffe8739e2b0a9a7d2f0daa0bb90652fbdfd33b 28-Sep-2012 Andy McFadden <fadden@android.com> Merge "Pass display arg to blank/unblank" into jb-mr1-dev
bcc046af4ef171aa3aa3c6b64efb5cafc1e46cd3 28-Sep-2012 Jeff Brown <jeffbrown@google.com> Bundle correlated switch changes atomically.

This is a prerequisite for headset jack detection on Manta.

Bug: 6548391
Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
om_android_server_input_InputManagerService.cpp
1081eed9b711333a29db048a492270d791beade1 28-Sep-2012 Andy McFadden <fadden@android.com> Pass display arg to blank/unblank

blank() and unblank() now take a display argument. For now,
just pass the default display in.

Bug: 7240511

Change-Id: I7747732471c9116cb6b3686bd95d5f32a63279a6
om_android_server_power_PowerManagerService.cpp
80cd819a0488d2ce2354e0f11a59e4f01d82ed54 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Use more reasonable warning thresholds for power on/off.

To encourage vendors to make power on/off as efficient
and responsive as possible, we log some warnings whenever it
is too slow. The previous thresholds were a little
unreasonable mainly because we wanted to understand
how long the process tends to take even when it's fast.

Raise the warning limit while still being aggressive about
timings. Ideally we want the screen to turn on/off within
no more than a few frames.

Bug: 7167820
Change-Id: Id28dbf8c91cefa7ae7544b72887104af7aabccff
om_android_server_power_PowerManagerService.cpp
83d616a9c7b9505153d258511eb5c16b552e268d 10-Sep-2012 Jeff Brown <jeffbrown@google.com> Make input system aware of multiple displays.

The input system needs to know about the window that has
focus, even if it is on a secondary display. So now we
send it the list of all windows and indicate which display
they are on. We filter the list of windows as necessary
when delivering touch events.

To keep things simple, monitor input channels and input
filters are not supported except on the main display.
We also do not pass the display id to applications; it is
only used inside the input system for now.

Properly scale touch coordinates based on the viewport.
This will be needed to ensure that touch works on external
display as well as when the internal display is being used
to simulate a different resolution.

Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
om_android_server_input_InputManagerService.cpp
om_android_server_input_InputWindowHandle.cpp
d728bf514f257670fcb9aa22c6eaf97626072c93 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Make display manager tell input system about viewports.

The window manager is no longer responsible for telling the
input system about the display viewport.

Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
om_android_server_input_InputManagerService.cpp
64a55af0ac700baecb0877235eb42caac59a3560 26-Aug-2012 Jeff Brown <jeffbrown@google.com> Add plumbing for new surface flinger display API.

Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
ndroid.mk
om_android_server_display_SurfaceFlingerDisplayAdapter.cpp
nload.cpp
0b722fe9ce98d97dbcb6fefd170b85ab7037e528 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Use new surface flinger API.

Change-Id: Ic888577408a59a36481a48010e19c5e77c24e211
om_android_server_display_SurfaceFlingerDisplayAdapter.cpp
5ad9fc2182116c083f5e59a347ef1b3e487861f7 21-Aug-2012 Scott Anderson <saa@android.com> BatteryService: Fix comment to match code

Change-Id: Ib4e30e7808ff3a2a8a49c000eac719a3a4273fdd
Signed-off-by: Scott Anderson <saa@android.com>
om_android_server_BatteryService.cpp
256237c99f1d7fc32e025861c3ae7bc855db3c5a 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Plumb the switch code into Dalvik." into jb-mr1-dev
5338428ddbe662283bf88171c7ca361d51d78da8 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Plumb the switch code into Dalvik.

Bug: 6548391
Change-Id: If0e918669ba27ca0e6561930d4abc427c34de42d
om_android_server_input_InputManagerService.cpp
37a37f445cbcd64376af153dd79ea2a123d9405d 15-Aug-2012 Brian Muramatsu <btmura@google.com> add wireless charger support

bug: 6879638

- add new enum value BATTERY_PLUGGED_WIRELESS
- check for sys online file with contents "Wireless"

Change-Id: I22dc3c40f50573c98643e7b5cbcb237d0216530d
om_android_server_BatteryService.cpp
9630704ed3b265f008a8f64ec60a33cf9dcd3345 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Power manager rewrite.

The major goal of this rewrite is to make it easier to implement
power management policies correctly. According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed. Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off. At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state. Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once. Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components. For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed. For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready. An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants. Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger). This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep. This change
removes ambiguity around forcing or disabling user activity
for various purposes. To wake the device, use wakeUp().
To put it to sleep, use goToSleep(). Simple.

The power manager service interface and API has been significantly
simplified and consolidated. Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
in previous version of the power manager service pending
an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
for more compactly specifying auto-brightness levels
in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
KEEP_SCREEN_ON_FLAG wake lock instead of talking
directly to the battery stats service.
- Optionally support animating screen brightness when
turning on/off instead of playing electron beam animation
(config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
om_android_server_LightsService.cpp
om_android_server_input_InputManagerService.cpp
om_android_server_power_PowerManagerService.cpp
om_android_server_power_PowerManagerService.h
187019c51fb1f8f79d4d5919facbc8d569ff844e 03-Aug-2012 Mathias Agopian <mathias@google.com> Merge "screen-off animation won't be handled by SF anymore" into jb-mr1-dev
893a0e71a73cf9dddd571ab2a786a0e18c8fee38 03-Aug-2012 Mathias Agopian <mathias@google.com> screen-off animation won't be handled by SF anymore

Change-Id: I66ad02b07b1148c1610e9c29ba80450d49c22806
om_android_server_power_PowerManagerService.cpp
908aecc3a63c5520d5b11da14a9383f885b7d126 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Start moving away from DisplayMetrics.DENSITY_DEVICE.

This puts in most of the infrastructure needed to allow us to
switch between different densities at run time. The main remaining
uses of the global are to initialize the Bitmap object (not sure
what to do about that since it doesn't have anything passed in
the constructor to get this information from), and being able to
load drawables if we need a different density than what was preloaded
by zygote.

Change-Id: Ifdbfd6b7a5c59e6aa22e63b95b78d96af3d96848
om_android_server_display_SurfaceFlingerDisplayAdapter.cpp
b696de5c10ebcc7bf42d8487fc0e56e0e937754d 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Move and rename user activity event type constants.

Change-Id: Ie565808796773b6896e71ddfac6aaaf8031de846
om_android_server_input_InputManagerService.cpp
om_android_server_power_PowerManagerService.cpp
92c6d2fc50ec2a33a2a990fe66cd70090eb461ca 26-Jul-2012 Mathias Agopian <mathias@google.com> update to new getDisplayInfo API

Change-Id: I8051b4f9f23d3ef4791176de1bbcfafacae7d579
om_android_server_display_SurfaceFlingerDisplayAdapter.cpp
fa25bf5382467b1018bd9af7f1cb30a23d7d59f7 24-Jul-2012 Jeff Brown <jeffbrown@google.com> Add display manager skeleton.

The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices. Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
ndroid.mk
om_android_server_display_SurfaceFlingerDisplayAdapter.cpp
nload.cpp
4f8ecd80296508a1dc69d3f3a23fd91e962c2784 19-Jun-2012 Jeff Brown <jeffbrown@google.com> Move power manager to a new package.

Change-Id: I5f5a6435e64354b7d6535e8e9a63934ba7a3f448
ndroid.mk
om_android_server_PowerManagerService.cpp
om_android_server_PowerManagerService.h
om_android_server_input_InputManagerService.cpp
om_android_server_power_PowerManagerService.cpp
om_android_server_power_PowerManagerService.h
dccb2c16e5201e87b0bc7be778f7ef2d9d043783 07-Jun-2012 Colin Cross <ccross@android.com> PowerManagerService: call surfaceflinger blank and unblank through binder

Synchronize with SurfaceFlinger during screen off and on to ensure that
a black frame has been drawn on the display, and then trigger all early
suspend handlers on devices that have early suspend, as well as PowerHAL
operations.

Change-Id: I8a5ad5a84c9e80ce5bb8f7f0b09b064e2b9ad4ef
om_android_server_PowerManagerService.cpp
d232afa003689d87b637cb4525aae9a6af426700 16-May-2012 Jeff Brown <jeffbrown@google.com> Tolerate missing power HAL module.

Bug: 6492793
Change-Id: I092605456e734e3f91ee098a197f208c738a619c
om_android_server_PowerManagerService.cpp
30e5eb4826a2b6880fb8ef3844206cc5ffd13ed9 12-May-2012 Jeff Brown <jeffbrown@google.com> Tell power HAL when user activity occurs.

Bug: 6435382
Change-Id: I78754158b057851fcba807ebbda143899da387ec
om_android_server_PowerManagerService.cpp
7304c343821309dd15f769b18f1de2fa43751573 12-May-2012 Jeff Brown <jeffbrown@google.com> Move power HAL interactions to PowerManagerService.

This refactoring sets the stage for a follow-on change that
will make use additional functions of the power HAL.

Moved functionality from android.os.Power into PowerManagerService.
None of these functions make sense being called outside of the
system server. Moving them to the PowerManagerService makes it
easier to ensure that the power HAL is initialized exactly once.

Similarly, moved ShutdownThread out of the policy package and into
the services package where it can tie into the PowerManagerService
as needed.

Bug: 6435382
Change-Id: I958241bb124fb4410d96f5d5eb00ed68d60b29e5
ndroid.mk
om_android_server_PowerManagerService.cpp
93de746e5554bc9397ca8109f57875d92e64eabc 03-May-2012 Jeff Brown <jeffbrown@google.com> Separate the internal and external display rotations.

When attached to an HDMI touch screen, the input system needs
to know the size and rotation of the external display independent
of the internal display. The size was already being reported
separately but not the rotation. The inconsistency can cause problems
if the internal display's natural rotation is portrait but
the external display's natural rotation is landscape.

Change-Id: Id344f04c1ba032625f6265766be66f9ddaa2cc0b
om_android_server_input_InputManagerService.cpp
daa3753a04699724d2cfe824ac1f5a266d643a05 02-May-2012 Jeff Brown <jeffbrown@google.com> Improve handling of built-in keyboard.

The window manager policy made some incorrect assumptions about the
meaning of the Configuration.keyboard field. We need to be more
careful about distinguishing between built-in and external keyboards.

Most of this change is to move the determination of the parts of
the Configuration related to input devices into the WindowManagerService
leveraging new features of the InputManagerService to good effect.

Then we plumb through the flag that indicates whether a device
is internal or external so that we can be more particular about
how the lid switch effects changes to the Configuration.

Bug: 6424373
Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
om_android_server_input_InputManagerService.cpp
166b05e0ce913711d27ce1a116b3f1fd906822e4 24-Apr-2012 Mike Lockwood <lockwood@google.com> UsbService: Add support for accessory initiating USB audio support

Change-Id: I0e468f4b841de9e1ca7b75a05fc58299dbc78222
Signed-off-by: Mike Lockwood <lockwood@google.com>
om_android_server_UsbDeviceManager.cpp
5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a 21-Apr-2012 Jeff Brown <jeffbrown@google.com> Get alias for Bluetooth devices.

Bluetooth devices can be renamed by the user. Make the
input system aware of the user-specified name and transparently
pass it down to applications. This enables the keyboard
layout picker Settings UI to use device names that are
consistent with what the user set in the Bluetooth UI.

Bug: 6363157
Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
om_android_server_input_InputManagerService.cpp
6ec6f79e1ac1714e3b837796e99f07ff88f66601 18-Apr-2012 Jeff Brown <jeffbrown@google.com> Support loading keyboard layout overlays from resources.

Added the concept of a keyboard layout overlay, which is
a key character map file that has "type OVERLAY".

Added support for loading keyboard layout overlays from
resources dynamically. The layouts are reloaded whenever they
are changed in the Settings application or an application
is installed. This is somewhat more aggressive than necessary
so we might want to optimize it later.

Before system-ready, the input system uses just the generic
keyboard layouts that are included on the device system image.
After system-ready, it considers the user's selected keyboard
layout overlay and attempts to load it as necessary. We need to
wait until system-ready before doing this because we need to
be in a state where it is safe to start applications or access
their resources.

Bug: 6110399
Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
ndroid.mk
om_android_server_input_InputManagerService.cpp
a47425a13c19f95057df78b8bb65bb25657e8753 13-Apr-2012 Jeff Brown <jeffbrown@google.com> 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
om_android_server_input_InputManagerService.cpp
af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b 13-Apr-2012 Jeff Brown <jeffbrown@google.com> 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
om_android_server_input_InputManagerService.cpp
9f25b7fdf216c9ef0bd2322cd223eeaf0d60f77f 10-Apr-2012 Jeff Brown <jeffbrown@google.com> 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
om_android_server_input_InputManagerService.cpp
27fd3420ac0498ff5086f71023f443966541aa04 09-Apr-2012 Jeff Brown <jeffbrown@google.com> Fix lid switch interpretation.

Also remove unnecessary permission check for method that is
only called internally.

Change-Id: I32f63fc3e96b06709d18b046ee2d3c8f310de70d
om_android_server_input_InputManagerService.cpp
603b44589682db3ff33ade172facb0c5e309f1be 07-Apr-2012 Jeff Brown <jeffbrown@google.com> 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
om_android_server_input_InputManagerService.cpp
e38fdfae9196afd1bdc14c5ec6c12793af1e2550 06-Apr-2012 Jeff Brown <jeffbrown@google.com> Add a unique input device descriptor.

The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.

The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.

Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
om_android_server_input_InputManagerService.cpp
4532e6158474a263d9d26c2b42240bcf7ce9b172 05-Apr-2012 Jeff Brown <jeffbrown@google.com> Refactor input system into its own service.

Extracted the input system from the window manager service into
a new input manager service. This will make it easier to
offer new input-related features to applications.

Cleaned up the input manager service JNI layer somewhat to get rid
of all of the unnecessary checks for whether the input manager
had been initialized. Simplified the callback layer as well.

Change-Id: I3175d01307aed1420780d3c093d2694b41edf66e
ndroid.mk
om_android_server_InputApplicationHandle.cpp
om_android_server_InputApplicationHandle.h
om_android_server_InputManager.cpp
om_android_server_InputWindowHandle.cpp
om_android_server_InputWindowHandle.h
om_android_server_input_InputApplicationHandle.cpp
om_android_server_input_InputApplicationHandle.h
om_android_server_input_InputManagerService.cpp
om_android_server_input_InputWindowHandle.cpp
om_android_server_input_InputWindowHandle.h
8335f1ccccedb6655d96d9d5b697a7f0938235dd 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
om_android_server_PowerManagerService.cpp
83c64e6b624a876436d2ef5d2f173b10407e27b4 21-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring

create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
ndroid.mk
b93a03f841d93498bfea6cc92a22faa34bce1337 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

First step. Move libui includes to their new home: androidfw.

Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
om_android_server_PowerManagerService.h
62d1058cc972a8fcb7739547abd3298f5d98a9b1 13-Feb-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove the input dispatcher throttle."
a21e9455027a20c68e31358aaa1c8d9c8c28e357 17-Aug-2011 Mike Lockwood <lockwood@android.com> BatteryService: Don't fail to register native methods if kernel power supply driver is missing

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_BatteryService.cpp
b01e8bf57b7492b77e3445db51471edcbadda75e 30-Aug-2011 Mike Lockwood <lockwood@android.com> New Serial Manager API:

SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_SerialService.cpp
nload.cpp
308028049a75b36d5ed525c0bcef441da850c2a5 03-Feb-2012 Jeff Brown <jeffbrown@google.com> Remove the input dispatcher throttle.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420
Change-Id: Iab33594bc5df8aa05232ef64c64e98fc61c5bf52
om_android_server_InputManager.cpp
ec193dec4d9ca2cfc8295c4becfe950a906a15ed 09-Jan-2012 Steve Block <steveblock@google.com> Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
nload.cpp
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
om_android_server_AlarmManagerService.cpp
om_android_server_BatteryService.cpp
om_android_server_InputManager.cpp
om_android_server_PowerManagerService.cpp
om_android_server_UsbDeviceManager.cpp
om_android_server_UsbHostManager.cpp
om_android_server_connectivity_Vpn.cpp
om_android_server_location_GpsLocationProvider.cpp
nload.cpp
8564c8da817a845353d213acd8636b76f567b234 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
om_android_server_BatteryService.cpp
om_android_server_InputManager.cpp
6215d3ff4b5dfa52a5d8b9a42e343051f31066a5 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
om_android_server_InputManager.cpp
om_android_server_VibratorService.cpp
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
om_android_server_AlarmManagerService.cpp
om_android_server_InputManager.cpp
om_android_server_connectivity_Vpn.cpp
om_android_server_location_GpsLocationProvider.cpp
3f15700a012b1ab0097eaf90caf0540ba6caa529 18-Nov-2011 Mathias Agopian <mathias@google.com> split ComposerService out of SurfaceComposerClient.h

Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
om_android_server_PowerManagerService.cpp
1e08fe90df18930691b0c2ec22e5db25d7fcb4cf 16-Nov-2011 Jeff Brown <jeffbrown@google.com> Eliminate hw.keyboards system properties.

Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.

It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.

Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
om_android_server_InputManager.cpp
98e044a6090fa239eca6736436d6a7efa8028066 29-Oct-2011 Dima Zavin <dima@android.com> BatteryService(jni): properly handle read's return value

Change-Id: I10f5cf3728424e7f5a0c1b460049102fd00a6246
Signed-off-by: Dima Zavin <dima@android.com>
om_android_server_BatteryService.cpp
d5bb82d18cbd95bb9e751d8315b9ed0b69595033 12-Oct-2011 Jeff Brown <jeffbrown@google.com> DO NOT MERGE. Improve screenshot chord debouncing.
Bug: 5011907

Introduce a 150ms delay in handling volume down keys
while waiting to see if a power key will follow.

Don't trigger the screenshot chord if both volume up and
volume down are pressed together.

Don't trigger the long-press power menu if volume keys are
also pressed.

Require the user to press both keys in the chord within
the debounce time and continue long-pressing them in order
to trigger the screenshot action.

Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
om_android_server_InputManager.cpp
cc4f7db698f88b633a286d8ab1105b28a474cd09 31-Aug-2011 Jeff Brown <jeffbrown@google.com> Fix input channel leak.
Bug: 5156144

Input channels could leak or simply live longer than they should
in some cases.

1. Monitor channels (used by the pointer location overlay) are never
unregistered, so they would leak.

Added code to handle failures in the receive callback by closing
the input channel.

2. The DragState held onto its input window and application handles
even after the input channel was disposed.

Added code to null these handles out when they are no longer needed.

3. Input channels previously used as input event targets would stick
around until the targets were cleared (usually on the next
event).

Added code to detect when the input dispatcher is in
an idle state and to proactively clear the targets then
to ensure that resources are released promptly.

4. Native input window handles held onto the input channel even
after the input window was removed from the input dispatcher.
Consequently, the input channel would not be disposed until
the input window handle itself was freed. Since the input
window handle is held from managed code, this meant that the
window's input channel could stick around until the next GC.

Refactored the input window handle to separate the properties
(info) and identify (handle) state into different objects.
Then modified the dispatcher to release the properties (info)
when no longer needed, including the input channel.

7. The pointer location overlay does not actually use its
standard input channel, only the monitor input channel.

Added INPUT_FEATURE_NO_INPUT_CHANNEL to allow windows to
request that they not be provided with an input channel
at all.

Improved some of the error handling logic to emit the status
code as part of the exception message.

Change-Id: I01988d4391a70c6678c8b0e936ca051af680b1a5
om_android_server_InputApplicationHandle.cpp
om_android_server_InputApplicationHandle.h
om_android_server_InputManager.cpp
om_android_server_InputWindowHandle.cpp
om_android_server_InputWindowHandle.h
daf4a127ba2af82a3fb477044b872719a0ab1827 27-Aug-2011 Jeff Brown <jeffbrown@google.com> Add a "show touches" option for demos and presentations.
Bug: 4569045

Change-Id: I8726ea292dd7def790a5e40d7d7e58968974f896
om_android_server_InputManager.cpp
65fd251c3913fc921468a3dad190810db19eb9df 18-Aug-2011 Jeff Brown <jeffbrown@google.com> Input system bug fixes, particularly for stylus.
Bug: 5049148

Finished stylus support, including support for indirect stylus
and mouse tools.

Added TILT axis. When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.

Touch devices now only report touch data using a single input
source. Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one. The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.

Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact. It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.

Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset. This fixes
problems where the input mapper state might have the wrong initial
state.

Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification. This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.

Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.

Improved the PointerLocation output.

Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
om_android_server_InputManager.cpp
89ef0720ee8e0ac6ae1758faa917e4d6c9606fb4 11-Aug-2011 Jeff Brown <jeffbrown@google.com> Add input system to Watchdog.
Bug: 5094994

Change-Id: I153866958efc64ac19bda8b997c1c9f6ad425ec4
om_android_server_InputManager.cpp
2b15cb21b313f83f7cccdc6f9116ba31ddc190ad 04-Aug-2011 Mike Lockwood <lockwood@android.com> Resolve merge conflict for '75f1fdec':

GPS Provider Service changes

GPS engine needs to receive network state changes from Android fw.

Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService

Conflicts:
services/java/com/android/server/location/GpsLocationProvider.java

Change-Id: I33c45027f1571493d3525324f62d199517c4960c
Signed-off-by: Mike Lockwood <lockwood@android.com>
75f1fdec3e95e9c8b5add02ba6e9b14913058f22 04-Aug-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 0b3af353: am a82ee49a: am 8f5dd9ad: Merge "GPS Provider Service changes"

* commit '0b3af353dcf61177158934a11404cf2914038696':
GPS Provider Service changes
a5fe6b2efee02ab11c35e80ec50fec62be227273 05-Jun-2011 Kevin Tang <zhikait@codeaurora.org> GPS Provider Service changes

GPS engine needs to receive network state changes from Android fw.

Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService

Change-Id: I62e35c948d2ac1961771d1a10581a3b8e695c05a
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
b7d95a46dfacf04896d5b084f13bcbe6eab33633 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 21700fed: am 5f7203eb: am 5a27a754: am bd1dee94: Merge "gps: Adding ip address for AGps"

* commit '21700fedfe29f6a0a752d2bea46142038e69136c':
gps: Adding ip address for AGps
21700fedfe29f6a0a752d2bea46142038e69136c 28-Jul-2011 Mike Lockwood <lockwood%android.com@gtempaccount.com> am 5f7203eb: am 5a27a754: am bd1dee94: Merge "gps: Adding ip address for AGps"

* commit '5f7203eb258503bc5d2ba29176bdf483a68a93b8':
gps: Adding ip address for AGps
8efd74dbedb65f69734318d9d6be70767f30b57a 02-Mar-2011 Stephen Li <stephenl@codeaurora.org> gps: Adding ip address for AGps

Change-Id: Ic590187d159853de2f1bd2912e159f0a00d8fb10
om_android_server_location_GpsLocationProvider.cpp
bc68a59c024bdb745dac8e2ec7408a9f30595f1a 25-Jul-2011 Jeff Brown <jeffbrown@google.com> Report the external display size to the input reader.

The input reader needs this information so that it knows how to
interpolate touches on an external touch screen.

Changed Display so that it asks the WindowManager what the real
display size is (as opposed to the raw display size). This means
it now takes into the forced display size set by
adb shell am display-size.

Replaced all calls to getRealWidth() / getRealHeight() /
getRealMetrics() in the WindowManager and replaced them with direct
usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM
doesn't end up making a reentrant Binder call into itself.

Fixed the table status bar HeightReceiver so that it updates the
height on all configuration changes since it is possible that the
display size changed independently of an external HDMI display
being plugged / unplugged.

Improved the Display class documentation to make the distinctions
betweeen the various sizes clearer.

Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
om_android_server_InputManager.cpp
d462ecf8f82076d21c85bdeeefbd16a1a91d2805 21-Jul-2011 Mike Lockwood <lockwood@android.com> USB: Fix handling USB accessory attached when device is booting

Also defer anything that could start an activity from "system ready"
to "boot completed" time.

Bug: 5051683

Change-Id: I69db751cb991dd247bd0ac3c70a0d84c0d71f365
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbDeviceManager.cpp
eb2591f8f71907ded8bac947ba98ae6c24192e5f 15-Jul-2011 Chia-chi Yeh <chiachi@android.com> Merge "VPN: Hook up the new control protocol and network state."
97a61565ea95472e65899070e64853f8c147bb11 15-Jul-2011 Chia-chi Yeh <chiachi@android.com> VPN: Hook up the new control protocol and network state.

1. No more End-Of-Arguments.
2. Daemons close the control socket after they are initialized.
3. No more system properties.
4. ip-up-vpn now creates state to pass the configuration.
5. JNI methods are split again for legacy VPN.

Change-Id: I02fafdf01d425c965345ef712b2bd5fdee3a0cab
om_android_server_connectivity_Vpn.cpp
9302c8796fc4dcda08d4bd1e11733848fd4fafaf 14-Jul-2011 Jeff Brown <jeffbrown@google.com> Refactor input dispatcher use of window/app handles.

This change moves the cached window and application input state
into the handle objects themselves. It simplifies the dispatcher
somewhat because it no longer needs to fix up references to
transient InputWindow objects each time the window list is updated.

This change will also make it easier to optimize setInputWindows
to avoid doing a lot of redundant data copying. In principle, only
the modified fields need to be updated. However, for now we
continue to update all fields in unison as before.

It turns out that the input dispatcher was inappropriately retaining
pointers to InputWindow objects within the mWindows InputWindow
vector. This vector is copy-on-write so it is possible and the
item pointers to change if an editing operation is performed on
the vector when it does not exclusively own the underlying
SharedBuffer. This bug was uncovered by a previous change that
replaced calls to clear() and appendVector() with a simple use
of operator= which caused the buffer to be shared. Consequently
after editItemAt was called (which it shouldn't have, actually)
the buffer was copied and the cached InputWindow pointers became
invalid. Oops. This change fixes the problem.

Change-Id: I0a259339a6015fcf9113dc4081a6875e047fd425
ndroid.mk
om_android_server_InputApplication.cpp
om_android_server_InputApplication.h
om_android_server_InputApplicationHandle.cpp
om_android_server_InputApplicationHandle.h
om_android_server_InputManager.cpp
om_android_server_InputWindow.cpp
om_android_server_InputWindow.h
om_android_server_InputWindowHandle.cpp
om_android_server_InputWindowHandle.h
nload.cpp
c1b9bbb21c8ad5109978a4e9e770cd18b0257434 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_AlarmManagerService.cpp
om_android_server_BatteryService.cpp
bd882b1c8708686d373c56e07e6bb8b1cb6ffd9e 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
ndroid.mk
c2b8aa0b4c822b0e307f62131650f4a6ee89bb66 04-Jul-2011 Chia-chi Yeh <chiachi@android.com> VPN: rename some variables.

Change-Id: I7f15b5ab30f591e26242fca27af25f578809534c
om_android_server_connectivity_Vpn.cpp
8bc003e2f6668c5b6b855593a3a5e3828750fe9a 03-Jul-2011 Chia-chi Yeh <chiachi@android.com> Merge "VPN: merge JNI methods."
3281034c1c458b4eecd867d20b64dc5edd68ec14 03-Jul-2011 Chia-chi Yeh <chiachi@android.com> VPN: merge JNI methods.

Legacy VPN needs to change routes by itself.

Change-Id: I4cf6639f2b00225810f49704ae05797fc70921d9
om_android_server_connectivity_Vpn.cpp
a4d1bc517207d7ca8d56f0004cd04f0f1dd4567d 02-Jul-2011 Jeff Brown <jeffbrown@google.com> Drop obsolete touch screen hacks.

Change-Id: I47354c37ee2cc2b36340eb709bb5043b3ba78ed9
om_android_server_InputManager.cpp
9c0835fd7262c50cf6a91380df1654daffe2c977 01-Jul-2011 Chia-chi Yeh <chiachi@android.com> VPN: correct the netmask for IPv4.

Change-Id: Id6e955af129d55120676d0d9cfe75388671aa367
om_android_server_connectivity_Vpn.cpp
f4e3bf892e593d8c74290739446ac205fe8c66b2 30-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: refactor few JNI methods for the usage of legacy VPN.

Now default routes are handled in JNI instead of VpnBuilder.

Change-Id: Ib026bba6793b64aae0f8356df3d2aaae489d08b4
om_android_server_connectivity_Vpn.cpp
9b9fb5cc08eaa0b66a80eba2f03168531544f65a 29-Jun-2011 Mike Lockwood <lockwood@android.com> GPS: Support for on-demand NTP time injection

Change-Id: I83db0249c13598070ed70b9f90207305b60b468f
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
84bf7390ea6b9a82bbd036b64c41d7c120b7f159 17-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: make the file descriptor non-blocking by default.

Change-Id: I89899b2b6a8ac64a4a052ffd501cc0221fab3ffe
om_android_server_connectivity_Vpn.cpp
474dcb5c3ddff737c4ac9fc44a1f7be569605e5f 15-Jun-2011 Jeff Brown <jeffbrown@google.com> Add support for disabling pointer gestures.

Made it possible for individual windows to disable pointer gestures
while the window has focus using a private API.

Cleaned up the InputReader configuration code to enable in-place
reconfiguration of input devices without having to reopen them all.
This change makes changing the pointer speed somewhat nicer since the
pointer doesn't jump back to the origin after each change.

Change-Id: I9727419c2f4cb39e16acb4b15fd7fd84526b1239
om_android_server_InputManager.cpp
om_android_server_InputWindow.cpp
96c7e7000010cbec8345a2ae8672355080cf1531 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: do not allow zero prefix length in routing rules.

The public API splits default route into two narrower routes.
Add this check in case some one calls the private API.

Change-Id: Ie1fc0155b74415b971380bc8429cd74026c3fda0
om_android_server_connectivity_Vpn.cpp
8ea928945b6a594e7e569613742367a91f01e785 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: do not use gateway in routing rules.

The first release of this API only supports TUN interface, and
so far there is no plan for TAP. TUN works on IP frames which
makes gateway nearly useless. The only value to have a gateway
is that kernel may use it to select the source address. However
currently it does not work in IPv6, and even in IPv4 applications
can bind to any local address on the device. Remove it to keep
the API clear, and it can be added back at any time if needed.

Change-Id: If9086d20d885a3a7f7ab5f07afbcfeecb677bbea
om_android_server_connectivity_Vpn.cpp
23a5e4bcdcf7d3fef9aaa6c4a20f9f08f22ca9a6 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: tolerate duplicated routes.

Change-Id: I0f9efa8c3af3d4859358438745a5cd2c4ad376ca
om_android_server_connectivity_Vpn.cpp
6ddd57491a06da3ee56056b088424500c144063a 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: fix a bad optimization of zeroing ifr_flags lately.

Change-Id: Ib7d89422ef0a9159ba912cf32b678821cb72a25a
om_android_server_connectivity_Vpn.cpp
6224b5ec3857d78e92bbc21075717eaa228ff891 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: set IFF_NO_PI on TUN interface.

Packet info header (struct tun_pi) was required to support IPv6
in kernel prior to 2.6.26. Setting IFF_NO_PI will remove the header
from the packets sent/recieved via TUN file descriptor, so now they
are just raw IP packets.

Change-Id: I0b4ae9db23d3bc10995a00eb053527b499ad6eb6
om_android_server_connectivity_Vpn.cpp
3663227a8be5c6c05bf4adadc378fd69b7ae814c 14-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: add MTU support.

Change-Id: Ia2f06ae1fcf065bde7dafd212b84b37a34f1a47e
om_android_server_connectivity_Vpn.cpp
36673698078cb47e777418cadc4115a65bc5947d 13-Jun-2011 Chia-chi Yeh <chiachi@android.com> VPN: use ParcelFileDescriptor.adoptFd() instead of doing it in JNI.

This removes the dependency of android_util_Binder.h.
This change also removes some redundant zeroing.

Change-Id: Ie9fedd471dfa198f9a3261e03651f945cefbbf61
om_android_server_connectivity_Vpn.cpp
8df5fcfa621ff40fd4a845804b02464dd9db5e86 10-Jun-2011 Mike Lockwood <lockwood@android.com> am 6d60190a: am e502c536: am b3174c46: UsbService: Fix JNI reference leak

* commit '6d60190a3156e0ac69c800bbb10691b70ae9bd54':
UsbService: Fix JNI reference leak
b3174c46ade0be4628813a74b317da538e367bc8 09-Jun-2011 Mike Lockwood <lockwood@android.com> UsbService: Fix JNI reference leak

http://code.google.com/p/android/issues/detail?id=17365

Change-Id: Ice0174e0db2a785d32ac16694ebf3b7ddb1b7fb3
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
ff3bdca31f4cf2bd607519b276dd175763aa1784 24-May-2011 Chia-chi Yeh <chiachi@android.com> The service part of the user space VPN support.

The dialogs will be in another change.

Change-Id: I0cdfd2ef21ffd40ee955b3cbde5ada65dbfdb0bc
ndroid.mk
om_android_server_connectivity_Vpn.cpp
nload.cpp
774ed9d9537c15482e8baca2f2890c5d2f4ffe75 08-Jun-2011 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 8b2c0014 to master

Change-Id: I33a5a2949dc6c2d09e8196ba8c7128caa7ac2361
bb3fcba0caf697f1d238a2cbefdf1efe06eded99 07-Jun-2011 Jeff Brown <jeffbrown@android.com> Touch pad improvements.
Bug: 4124987

Only show one spot per touch point instead of one spot per
finger for multitouch gestures.

Tweaked the pointer acceleration curves.

Dissociated the hover/tap timeouts from the "tap" timeout
since they mean very different things.

Change-Id: I7c2cbd30feeb65ebc12f6c7e33a67dc9a9f59d4c
om_android_server_InputManager.cpp
7218d830e27d81141588cd6e37f206d141a18f62 04-Jun-2011 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of ca2b552d to master

Change-Id: I2f3693a59042ac5aa2d7bcdc3a504c78dc99a18b
f3b57def9345d6d3cac3604d6a970f6d48f345ec 03-Jun-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 7e193916 to master

Change-Id: If06892419319c3a2d4ab6b03dd3ceb99b83803b5
1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c 02-Jun-2011 Jeff Brown <jeffbrown@android.com> Add a preference panel for mouse speed.

Bug: 4124987
Change-Id: I3ce175d268a1d043cf5878481261b1049a15a149
om_android_server_InputManager.cpp
46d0adf8256a42416584765625852b6e48497c90 26-May-2011 Mike Lockwood <lockwood@android.com> UsbService: Refactor USB host and device support into two separate classes

Host support is in UsbHostManager, device support is in UsbDeviceManager

Renamed UsbDeviceSettingsManager to UsbSettingsManager

Change-Id: Ib76e72957c233fa7f08f454d4d9a2a1da6368cc7
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbDeviceManager.cpp
om_android_server_UsbHostManager.cpp
om_android_server_UsbService.cpp
nload.cpp
214eaf48878bba00cbd5831871bcbd82632b6e34 27-May-2011 Jeff Brown <jeffbrown@android.com> Use ViewConfiguration to seed input system configuration.

Fix bug where the pointer presentation would be updated on
any input reader timeout rather than only when a pointer gesture
is in progress.

Bug: 4124987
Change-Id: Ie9bba4a0b3228d55e45e65fa2ede5cd6ba887a08
om_android_server_InputManager.cpp
86ea1f5f521981d075aef56f11693e4f3bc32fdb 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
om_android_server_InputManager.cpp
a6dbfdd3a858aac52cc87f80f91e8eef7d613605 11-Apr-2011 Jeff Brown <jeffbrown@google.com> Add a sprite controller. (DO NOT MERGE)

Refactored PointerController to extract the surface management
code to a new component called a SpriteController so that it can
be used to move finger tracking spots around the screen as well.
The SpriteController is designed to fully decouple the client from
any latency introduced by surface transactions and drawing.
All sprite updates are performed asynchronously on the Looper using
a copy of the sprite state.

Added a stub SpotController implementation for touch pad UX.
It will be implemented in a subsequent patch.

Fixed a little bug in pointer orientation changes when entering
DISPLAY_ORIENTATION_90 the x offset was clobbered.

Change-Id: I6d59d80df9af61e93af50290e7776337d10c9d5a
om_android_server_InputManager.cpp
524ee64b91bc123e1ccfc881a0f1a1e84722251d 30-Mar-2011 Jeff Brown <jeffbrown@google.com> Support chorded fallback keys. (DO NOT MERGE)

Also be more careful about canceling fallback keys during focus
transitions, when the application handles the key, or when the
policy decides to do something different.

Fixed a crash due to JNI CallObjectMethod returning an undefined
value (not null) when an exception is thrown.

Fixed a crash due to the policy trying to create a Dialog for
recent apps on the dispatcher thread. It should happen on the
policy's Looper instead.

Bug: 4187302
Change-Id: I043f82913830f411b3bb4018d6422467b6ca454f
om_android_server_InputManager.cpp
22d789d580a4ab5bed83c0ed698d2f5bc721e176 25-Mar-2011 Jeff Brown <jeffbrown@google.com> Fix focused application handle. (DO NOT MERGE)

Fix a bug where we were always setting the focused application
handle to NULL. This broke ANR processing while starting
applications and caused input events to be dropped while
starting applications.

Bug: 4174573
Change-Id: Ice7ce3a2b65219568a8227fc1383bafb294666b5
om_android_server_InputManager.cpp
5b2b4d9c0a56c4b5e869c828a6c36a1b9e27d61b 15-Mar-2011 Jeff Brown <jeffbrown@google.com> Improve VelocityTracker numerical stability. (DO NOT MERGE)

Replaced VelocityTracker with a faster and more accurate
native implementation. This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation. This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces. The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I95054102397c4b6a9076dc6a0fc841b4beec7920
om_android_server_InputManager.cpp
aa9d84c37e05f696ec158dac98ce38cf41e18314 10-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 05be6d6f to master

Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
e2515eebf42c763c0a2d9f873a153711778cfc17 28-Apr-2011 Dianne Hackborn <hackbod@google.com> Better compat mode part one: start scaling windows.

First step of improving app screen size compatibility mode. When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling. Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling. The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible. It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode. This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well. I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly. There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
om_android_server_InputWindow.cpp
2352b978a3c94cd88f41d0d908f961333fdac1e9 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures.

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
om_android_server_InputManager.cpp
dd66bcbf9d6ef0c50a18d9c4b1b39ce7ef7afcc4 12-Apr-2011 Elliott Hughes <enh@google.com> More native code cleanup.

Don't keep unused global references to classes, don't throw exceptions
when an exception is already pending, and fix a (harmless) misunderstanding
about how GetStringChars works.

Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
om_android_server_AlarmManagerService.cpp
4a1ba21044bfb0a684a4ea3a559e427f2e092e1c 12-Apr-2011 Elliott Hughes <enh@google.com> Merge "You don't need to poke around inside FileDescriptor manually."
a3804cf77f0edd93f6247a055cdafb856b117eec 12-Apr-2011 Elliott Hughes <enh@google.com> You don't need to poke around inside FileDescriptor manually.

We can help you with that.

Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.

Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
om_android_server_UsbService.cpp
5541de9ea3513a12d1ac2ad07e7e04a3aa7741a0 11-Apr-2011 Jeff Brown <jeffbrown@google.com> Add a sprite controller.

Refactored PointerController to extract the surface management
code to a new component called a SpriteController so that it can
be used to move finger tracking spots around the screen as well.
The SpriteController is designed to fully decouple the client from
any latency introduced by surface transactions and drawing.
All sprite updates are performed asynchronously on the Looper using
a copy of the sprite state.

Added a stub SpotController implementation for touch pad UX.
It will be implemented in a subsequent patch.

Fixed a little bug in pointer orientation changes when entering
DISPLAY_ORIENTATION_90 the x offset was clobbered.

Change-Id: Ib25d162d577c9b354cb74d5d761c3c9f9f438d42
om_android_server_InputManager.cpp
46e18c11d46a2bc1a46174f963d0ed1224d94cd2 06-Apr-2011 Brian Carlstrom <bdc@google.com> Don't use local ref for cached jclass reference in JNI code

Change-Id: Id45b2acb358a819f2fd332e99f3a095f6fc7299b
related-to-bug: 4241138
om_android_server_UsbService.cpp
0029c66203ab9ded4342976bf7a17bb63af8c44a 30-Mar-2011 Jeff Brown <jeffbrown@google.com> Add input filter mechanism for accessibility.

This patch adds a mechanism for capturing, filtering, transforming
and injecting input events at a very low level before the input
dispatcher attempts to deliver them to applications. At this time,
the mechanism is only intended to be used by the accessibility
system to implement built-in system-level accessibility affordances.

The accessibility input filter is currently just a stub.
It logs the input events receives and reinjects them unchanged,
except that it transforms KEYCODE_Q into KEYCODE_Z.

Currently, the accessibility input filter is installed whenever
accessibility is enabled. We'll probably want to change that
so it only enables the input filter when a screen reader is
installed and we want touch exploration.

Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
om_android_server_InputManager.cpp
6e923274c593bb52232321fc9ebbd966657e69f8 30-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Support chorded fallback keys."
da3d5a91b6b311ed77f2707d4456c1f18b84d73b 30-Mar-2011 Jeff Brown <jeffbrown@google.com> Support chorded fallback keys.

Also be more careful about canceling fallback keys during focus
transitions, when the application handles the key, or when the
policy decides to do something different.

Fixed a crash due to JNI CallObjectMethod returning an undefined
value (not null) when an exception is thrown.

Fixed a crash due to the policy trying to create a Dialog for
recent apps on the dispatcher thread. It should happen on the
policy's Looper instead.

Bug: 4187302
Change-Id: I659a3fd1bd2325ed36d965f9beb75dacb89790c9
om_android_server_InputManager.cpp
60355780eaa7d80a76a5481ab033606bcfb630fd 28-Mar-2011 Mike Lockwood <lockwood@android.com> am 038c7297: am b115807a: am 7661dd8d: Merge "UsbService: Fix JNI local reference leaks in the USB host support code" into honeycomb-mr1

* commit '038c7297c9e2e4b6cdb490ac9fe7102da434278a':
UsbService: Fix JNI local reference leaks in the USB host support code
8f8c6023f2fad38347cd19af9a81fa485fe3bd82 28-Mar-2011 Mike Lockwood <lockwood@android.com> UsbService: Fix JNI local reference leaks in the USB host support code

Bug: 4175857

Change-Id: I8b385f2257e509b0fb4d5f9516e9813b8165352d
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
696257ccf315a1da042787c5b2d1f80c7146fc94 26-Mar-2011 Mathias Agopian <mathias@google.com> merge libsurfaceflinger_client into libgui

this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
ndroid.mk
a2cc28d732577dd48a02de637c635e9764400248 25-Mar-2011 Jeff Brown <jeffbrown@google.com> Fix focused application handle.

Fix a bug where we were always setting the focused application
handle to NULL. This broke ANR processing while starting
applications and caused input events to be dropped while
starting applications.

Bug: 4174573
Change-Id: Icd7b8c4c49ed73c41978f3ff076c2e5cd839a802
om_android_server_InputManager.cpp
2120617f2fb10035022d1a3e76836a278a0e6a18 18-Mar-2011 James Dong <jdong@google.com> am 14438b81: am 970bad67: am be368de7: Merge "Fix missing AOSP copyright headers for more files" into honeycomb-mr1

* commit '14438b81a1fe4d7ebdf8977f3d80a1dd1867c5ad':
Fix missing AOSP copyright headers for more files
199d1c131d29b5356f71fbd7826a592c1dd8575f 17-Mar-2011 James Dong <jdong@google.com> Fix missing AOSP copyright headers for more files

o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp
because these two files were moved from other places to the current location,
and were actually created in 2010.

bug - 4119349

Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
nload.cpp
843e29d3751017267b96565c543df0301c31a9f7 16-Mar-2011 Jeff Brown <jeffbrown@google.com> Merge "Improve VelocityTracker numerical stability."
2ed2462aa29c564f5231f317c27b3188da875e52 15-Mar-2011 Jeff Brown <jeffbrown@google.com> Improve VelocityTracker numerical stability.

Replaced VelocityTracker with a faster and more accurate
native implementation. This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation. This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces. The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
om_android_server_InputManager.cpp
3c9aa1aa093ff8acc5ec71190a35b9ab04d64fda 15-Mar-2011 Mike Lockwood <lockwood@android.com> am b0976320: Merge "DO NOT MERGE: Backport more USB accessory changes from honeycomb" into gingerbread

* commit 'b09763209980ff9210cc353f2410598220ec0480':
DO NOT MERGE: Backport more USB accessory changes from honeycomb
638d7cb3ee0bb3596b01dc19eca9456fa72a36e0 15-Mar-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE: Backport more USB accessory changes from honeycomb

Change-Id: I8459c5ab9fbf0b3cad752041484a5de44ca9badd
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
688d8412bd027f33c0c56267d26b96ef10599702 15-Mar-2011 Mike Lockwood <lockwood@android.com> am 0958fb10: am 221830b9: Merge "Add support for USB accessory serial numbers" into honeycomb-mr1

* commit '0958fb1068ee1b5e6c40eee16d943a664b1124b4':
Add support for USB accessory serial numbers
015b1ecaec27b7cf5f1a78099d9ae34a0c3169f2 14-Mar-2011 Mike Lockwood <lockwood@android.com> Add support for USB accessory serial numbers

Change-Id: I47b79f091b300ced60bfc61eff2f771139663aae
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
ccdac700df7089a87e6bf284e45a30a7a6a62602 14-Mar-2011 Mike Lockwood <lockwood@android.com> am 78b8e1be: Merge "DO NOT MERGE: backport recent USB accessory changes from honeycomb" into gingerbread

* commit '78b8e1be97c61f7e0b28b145fadd0c646fd1c46b':
DO NOT MERGE: backport recent USB accessory changes from honeycomb
2cc0377200b94b2f68f34e34554f2aa39e09cbce 12-Mar-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE: backport recent USB accessory changes from honeycomb

Bug: 4082651

Change-Id: Ie7c2fc796dd3c64f803acbd14210e5949683f4ed
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
26d7eef69ef064ca716ed76220ca2984995882ed 10-Mar-2011 Mike Lockwood <lockwood@android.com> am 84edf14b: am cc08c439: Merge "UsbAccessory: Add URI string, replace type string with description" into honeycomb-mr1

* commit '84edf14b62eaf3304252bb76b0b2ca3f518c8d54':
UsbAccessory: Add URI string, replace type string with description
cc08c439bc7b0afbdafc5ca18c584d2f7724f3df 10-Mar-2011 Mike Lockwood <lockwood@android.com> Merge "UsbAccessory: Add URI string, replace type string with description" into honeycomb-mr1
ac36d7c715a9cd793b2dce6de547594810101c3a 10-Mar-2011 Mike Lockwood <lockwood@android.com> UsbAccessory: Add URI string, replace type string with description

This is a first step toward adding USB accessory URI support

BUG: 4073248

Modified USB accessory matching logic to look only at manufacturer, model and version
(description and URI are not considered when matching apps to accessories)

Also added test for USB accessory protocol version to accessorytest

BUG: 4080288

Change-Id: I992a3433c74efa7a7db37bf030f02c1f0c92f9e2
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
5a3d6cc188bd38a9475c801a13f7752b24fb1072 10-Mar-2011 Jeff Brown <jeffbrown@google.com> am e6f0ae12: am efd3266b: Input improvements and bug fixes.

* commit 'e6f0ae12b18819424dd8395b433a8fc9caefa77b':
Input improvements and bug fixes.
efd3266b719eed5f1b217021c0a9e76e4b274b06 09-Mar-2011 Jeff Brown <jeffbrown@google.com> Input improvements and bug fixes.

Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis. This fixes new API that was introduced in MR1.
(Bug: 4066146)

Fixed a bug that might cause a segfault when using a trackball.

Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.

Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.

Improved the batching code to support batching events from different
sources of the same device in parallel. (Bug: 3391564)

Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
om_android_server_InputManager.cpp
9b8c5f61432b7f12a216567409fa7baed6b74452 09-Mar-2011 Carl Shapiro <cshapiro@google.com> Merge "Remove unused JNI global references."
b23bdf518bd652224e04a60aca57b34f7631ceec 08-Mar-2011 Jeff Brown <jeffbrown@google.com> Eliminate some accidental log spam. (DO NOT MERGE)

Used #ifdef where I should have used #if.

Change-Id: Ie3a083d601c89f4fc4d83244bb5060a202574dc2
om_android_server_InputManager.cpp
9267beb8689e6febe3dd23f2a3025736c50eef01 08-Mar-2011 Jeff Brown <jeffbrown@google.com> Eliminate some accidental log spam.

Used #ifdef where I should have used #if.

Change-Id: I4cc84484dd508b0ec1a01858d8bd62ec92f23de1
om_android_server_InputManager.cpp
17cc33a35729733aaa0a7706f38b1c45f0b1590a 06-Mar-2011 Carl Shapiro <cshapiro@google.com> Remove unused JNI global references.

Change-Id: Ie4886ab66538e293832c3bc3d6023e34304a2d21
om_android_server_InputApplication.cpp
om_android_server_InputApplicationHandle.cpp
om_android_server_InputManager.cpp
om_android_server_InputWindow.cpp
om_android_server_InputWindowHandle.cpp
om_android_server_PowerManagerService.cpp
a454767b09ecb7d25d00beae0e5a1fdd48605c63 03-Mar-2011 Jeff Brown <jeffbrown@google.com> Get key repeat timeout and delay from ViewConfiguration.

Replaces previously hardcoded values. This ensures that key repeat
takes the accessibility long press timeout setting into account.

Unfortunately the system must be rebooted for the change to take
effect. We will fix that later.

Change-Id: I3ab70bb037331620b7e532170c1727287b5c6f91
om_android_server_InputManager.cpp
56194ebec6212e229f4ccdaa4b187166d20013ef 03-Mar-2011 Jeff Brown <jeffbrown@google.com> Wake screen from external HID peripherals.

Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only. The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
om_android_server_InputManager.cpp
05dc66ada6b61a6bdf806ffaa62617ac5394695d 02-Mar-2011 Jeff Brown <jeffbrown@google.com> Fade out the mouse pointer after inactivity or other events.

Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages. This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
om_android_server_InputManager.cpp
7866be2b76e421ca28e5dcbd3e7d362baf279dd9 03-Mar-2011 Mike Lockwood <lockwood@android.com> am 40bbf929: DO NOT MERGE: Backport USB accessory support to gingerbread

* commit '40bbf9295d5245d3917629ce15f7b37670aef1ac':
DO NOT MERGE: Backport USB accessory support to gingerbread
40bbf9295d5245d3917629ce15f7b37670aef1ac 01-Mar-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE: Backport USB accessory support to gingerbread

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
02eb8746de2d60563ec2751a34d20923192e4293 27-Feb-2011 Mike Lockwood <lockwood@android.com> UsbManager: Enhancements for managing USB devices and accessories

When a USB device or accessory is connected, the UsbService now asks the
user which application to associate with the device or accessory.
Applications interested in devices or accessories must specify the
devices they work with via meta-data attached to their manifest.
Permission to communicate with the device is assigned when the user chooses
the activity to use for the device.
The user has the option of clicking the "always use this application" checkbox
to make the assignment automatic in the future.
The user may later clear this preference and revoke permission for an application
to have permission to communicate with the device by clicking the "Clear defaults"
button for the activity in the Manage Applications panel in Settings.

Added class UsbResolveActivity (a subclass or ResolveActivity for choosing
an activity for a USB device or accessory)

Added UsbDeviceManager, which manages the mapping between USB devices/accessories
and applications, including default applications for devices and accessories,
and manages application permissions.

Add interface to allow Settings to clear device and accessory
preferences and permissions for an application.

Remove obsolete ACCESS_USB permission.

Add new signatureOrSystem MANAGE_USB permission to allow administrating
preferences and permissions.

Moved UsbService.java to a "usb" subdirectory, along with new classes
UsbResolveActivity and UsbDeviceManager.

Change-Id: I92554381e9779e68ce380daaee4e1401fb875703
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
54e96c69d068593f1d5893be6067509b07abdadc 28-Feb-2011 Mike Lockwood <lockwood@android.com> am 3333f8af: Merge "DO NOT MERGE UsbManager: squashed commit of:" into gingerbread

* commit '3333f8afb2d1eae8bfdb41fa87f86836ad8702f7':
DO NOT MERGE UsbManager: squashed commit of:
6504490cde3ec5d48321d539e654d1f2072b33f9 28-Feb-2011 Xavier Ducrohet <xav@android.com> am dff6b8e7: Merge "Add --non-constant-id to aapt."

* commit 'dff6b8e71dda9f5d841fa26408714aec2aef1505':
GpsLocationProvider: Clean up HAL initialization/cleanup sequence
Fixed GSM encoded network initiated position request
Ensuring thread-safe usage of DateFormat.
Fixing infinite loop for zero duration.
Fix for an infinite loop while scrolling lists.
WAPPushManager, WAP Push over SMS message handler
Add --non-constant-id to aapt.
7916432b3cd9d0396872aee6d3d585f19b4b7ef6 28-Jul-2010 Mike Lockwood <lockwood@android.com> DO NOT MERGE UsbManager: squashed commit of:

USB: Add functions for querying if a USB function is supported and enabled.

Rename android.hardware.Usb to UsbManager and UsbObserver to UsbService

Change-Id: I920a211934d993eab8ce744c1cc7b05342389286
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbService.cpp
nload.cpp
58ec34cef5a37d51d42cf63308e972d6d8676196 23-Feb-2011 Mike Lockwood <lockwood@android.com> GpsLocationProvider: Clean up HAL initialization/cleanup sequence

Change-Id: Id5467000f3f3da5cbe1f112dad97a032688d2eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
0a5098106c116f2b67c9e77e4ec0afbc92acd61c 23-Feb-2011 Mike Lockwood <lockwood@android.com> GpsLocationProvider: Clean up HAL initialization/cleanup sequence

Change-Id: Id5467000f3f3da5cbe1f112dad97a032688d2eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
a924dc0db952fe32509435fdb8dc9c84a9e181f3 17-Feb-2011 Dianne Hackborn <hackbod@google.com> Start window manager refactoring.

Move all of the pieces into a new com.android.server.wm package.

Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94
om_android_server_InputApplication.cpp
om_android_server_InputApplicationHandle.cpp
om_android_server_InputManager.cpp
om_android_server_InputWindow.cpp
om_android_server_InputWindowHandle.cpp
45708bf2f03f9f50c22f86cb794c2a088bab1c05 17-Feb-2011 Jeff Brown <jeffbrown@google.com> Merge "Add support for arbitrary axes in MotionEvents."
984dd8a206e782027c2b0c866aa845e6d236f218 16-Feb-2011 Mike Lockwood <lockwood@android.com> Merge "UsbManager: New APIs for USB accessories"
bb9d394b21bdfeb1ceb4cf6e4ed0306e39757b15 16-Feb-2011 Kenny Root <kroot@google.com> Clean up use of HAVE_ANDROID_OS

HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0"
for non-targets. Changing them to #ifdef should be safe and matches
all the other uses of HAVE_ANDROID_OS throughout the system.

Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
om_android_server_AlarmManagerService.cpp
om_android_server_BatteryService.cpp
9182d3c4eb1f9065cb33df5a3594969dd0d42acc 15-Feb-2011 Mike Lockwood <lockwood@android.com> UsbManager: New APIs for USB accessories

USB accessories are peripherals that connect to android devices as a USB host.

When connected, the accessory will first identify itself to the android device
by sending manufacturer, product, accessory type and version strings
to the device, and then request the device to enter USB accessory mode.
The device will then enable the USB accessory kernel driver and disable
all other USB functionality except possibly adb
(adb can be used while the android device is connected to the PC
and the PC is running software that emulates a USB accessory)

The class android.hardware.UsbAccessory is used to describe the
currently attached USB accessory.
UsbAccessory contains the manufacturer, product, accessory type
and version strings to identify the accessory.
The accessory can be opened as a ParcelFileDescriptor, which can be used
to communicate with the accessory over two bulk endpoints.

The Intents UsbManager.USB_ACCESSORY_ATTACHED and
UsbManager.USB_ACCESSORY_DETACHED are broadcast when accessories are
connected and disconnected to the device. The USB_ACCESSORY_ATTACHED
contains a UsbAccessory object for the attached accessory as an extra.
The Intent also contains string extras for the manufacturer, product,
accessory type and version strings to allow filtering on these strings.

Change-Id: Ie77cbf51814a4aa44a6b1e62673bfe4c6aa81755
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_UsbService.cpp
91c69ab01539f7ba28708f41ec1835cc2920d0a0 15-Feb-2011 Jeff Brown <jeffbrown@google.com> Add support for arbitrary axes in MotionEvents.

This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
om_android_server_InputManager.cpp
e7d511e148bc901ef41ac44d7b3593e5d803f72f 30-Dec-2010 Mike Lockwood <lockwood@android.com> New APIs for USB host support:

UsbManager:
- is now a service retrievable via Context.getSystemService(Context.USB_SERVICE).
- provides support for returning a list all connected USB devices
- broadcasts ACTION_USB_DEVICE_ATTACHED and USB_DEVICE_DETACHED when devices
are added and removed from the USB host bus

UsbDevice:
- represents an attached USB device.

UsbInterface:
- represents an interface on a USB device
- devices may have multiple interfaces if they provide multiple
sets of functionality (for example, android phones typically have interfaces
for both USB mass storage and adb)

UsbEndpoint:
- represents an endpoint on a USB interface
- endpoints are used for sending or receiving data
(only in one or the other direction)

UsbRequest:
- encapsulates a send or receive request to be sent over an endpoint

Change-Id: Ieef3e434c62760770ea839070cf5eba1a705967a
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbService.cpp
nload.cpp
fe50892af3b365806a767298dfd8e86447682581 19-Jan-2011 Jeff Brown <jeffbrown@google.com> Filter virtual keys after touches.

Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen. The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Ib912d4f8a4df9966a39cd537d3ec7c24afab7225
om_android_server_InputManager.cpp
b26c516c03beffaf60460d3589b3807c0799c344 18-Jan-2011 Jeff Brown <jeffbrown@google.com> am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread

* commit '41395459e676cf9ab4059e08446656f145662c2d':
Filter virtual keys after touches. (DO NOT MERGE)
fbf097732137a32930d151f7ba6816a5b870c32a 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Support non-rectangular input regions.

This enables the system bar to carve out a region through which
events will be sent to the IME behind it.

Bug: 3238092
Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
om_android_server_InputWindow.cpp
6f71d0fedbb04c048a7294976103e42f0f046641 24-Oct-2010 Jeff Brown <jeffbrown@google.com> Filter virtual keys after touches. (DO NOT MERGE)

Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen. The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
om_android_server_InputManager.cpp
928e054931d357326613c78e62f4d850b7c442ff 10-Jan-2011 Jeff Brown <jeffbrown@google.com> Prevent events from getting backlogged.

This change implements two heuristics.

1. When events are older than 10 seconds, they are dropped.

2. If the application is currently busy processing an event and
the user touches a window belonging to a different application
then we drop the currently queued events so the other application
can start processing the gesture immediately.

Note that the system takes care of synthesizing cancelation events
automatically for any events that it drops.

Added some new handle types to allow the native dispatcher to
indirectly refer to the WindowManager's window state and app window
token. This was done to enable the dispatcher to identify the
application to which each window belongs but it also eliminates
some lookup tables and linear searches through the window list
on each key press.

Bug: 3224911
Change-Id: I9dae8dfe23d195d76865f97011fe2f1d351e2940
ndroid.mk
om_android_server_InputApplication.cpp
om_android_server_InputApplication.h
om_android_server_InputApplicationHandle.cpp
om_android_server_InputApplicationHandle.h
om_android_server_InputManager.cpp
om_android_server_InputWindow.cpp
om_android_server_InputWindow.h
om_android_server_InputWindowHandle.cpp
om_android_server_InputWindowHandle.h
nload.cpp
264f6cd0b9215f75dd5917252abea98e8fce6222 06-Jan-2011 Mike Lockwood <lockwood@android.com> Temporarily remove UsbManager support for USB host.

A new USB host API will be added in an upcoming commit

Change-Id: I5816c10c7acd236d31ab8ae255fc83c77121eea0
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbService.cpp
nload.cpp
b4ff35df5c04aec71fce7e90a6d6f9ef7180c2ad 03-Jan-2011 Jeff Brown <jeffbrown@google.com> Mouse pointer integration.

Added support for loading the pointer icon from a resource.

Moved the system server related bits of the input manager out
of libui and into libinput since they do not need to be linked into
applications.

Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67
ndroid.mk
om_android_server_InputManager.cpp
8235404786b9a78321691e4c3ac9bc66c55c602d 29-Dec-2010 Jeff Brown <jeffbrown@google.com> Merge "Add initial support for cursor-based pointing devices."
83c09685f2e62bc3cf7e71bc61d903f4b9ccaeb4 24-Dec-2010 Jeff Brown <jeffbrown@google.com> Add initial support for cursor-based pointing devices.

Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.

Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
om_android_server_InputManager.cpp
da03aaad78c124be8903c2c4029ecd329b250f4c 29-Dec-2010 Mike Lockwood <lockwood@android.com> Change libusbhost and libmtp from static to shared libraries

Change-Id: Iccc67db32400cdeb88aa33261c9e0cf73db992ca
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
fa93584a4fab6ca8d9348658dc30cedf76891753 23-Dec-2010 Jeff Brown <jeffbrown@google.com> am c6f2b3b3: Merge "Fix policy issues when screen is off. (DO NOT MERGE)" into gingerbread

* commit 'c6f2b3b302c06b8b7b81ec7e3a43a7df1813d0e0':
Fix policy issues when screen is off. (DO NOT MERGE)
eb9f7a01b0f501a535d872a957c1102ebb13d1c7 30-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix policy issues when screen is off. (DO NOT MERGE)

Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
is not showing (the proximity sensor turned off the screen).
Previously we passed all non-wake keys through in this case which
caused a bug on Crespo where the screen would come back on if a soft key
was held at the time of power off because the resulting key up event
would sneak in just before the keyguard was shown. It would then be
passed through to the dispatcher which would poke user activity and
wake up the screen.
- We propagate the key flags when broadcasting media keys which
ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released. This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Bug: 3144874
Change-Id: Iebb91e10592b4ef2de4b1dd3a2e1e4254aacb697
om_android_server_InputManager.cpp
770126a678ccc9328a89407ffc82f4d998b25427 10-Dec-2010 Mike Lockwood <lockwood@android.com> Rename android.hardware.Usb to UsbManager and UsbObserver to UsbService

In preparation for an upcoming change that will make UsbService into a real system service

Change-Id: Id85d624cfc6b10b49a08105cfaaacc667a492c12
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbObserver.cpp
om_android_server_UsbService.cpp
nload.cpp
49ed71db425c5054e3ad9526496a7e116c89556b 07-Dec-2010 Jeff Brown <jeffbrown@google.com> Add support for fallback keycodes.

This change enables the framework to synthesize key events to implement
default behavior when an application does not handle a key.
For example, this change enables numeric keypad keys to perform
their associated special function when numlock is off.

The application is informed that it is processing a fallback keypress
so it can choose to ignore it.

Added a new keycode for switching applications.

Added ALT key deadkeys.

New default key mappings:
- ESC -> BACK
- Meta+ESC -> HOME
- Alt+ESC -> MENU
- Meta+Space -> SEARCH
- Meta+Tab -> APP_SWITCH

Fixed some comments.
Fixed some tests.

Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
om_android_server_InputManager.cpp
9065504a63d6bf37bf621191fda1d1fe4da76ee3 02-Dec-2010 Jeff Brown <jeffbrown@google.com> 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
om_android_server_InputManager.cpp
1f2451007c660091b7b090c1ea332f9044515d2d 19-Nov-2010 Jeff Brown <jeffbrown@google.com> Ensure the ShortcutManager uses the correct key character map.

The ShortcutManager used to only receive the key code of the key event
that triggered the shortcut. This change now provides the shortcut
manager with the whole key event so it can look up the associated
character using the correct key character map.

To make this more efficient, added a mechanism for recycling
key events. At the moment it is only used by key events owned by the
system process, since clients of the existing API (such as Views)
might continue to hold on to key events after dispatch has finished so
they would break if the key event were recycled by the framework.

Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD.

Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
om_android_server_InputManager.cpp
47e6b1b5eef8ee99872f278f66bc498c4fcca0d8 30-Nov-2010 Jeff Brown <jeffbrown@google.com> Support non-orientation aware keyboards and other devices.

Fixed a bug with dpad keys on external keyboards being rotated
according to the display orientation by adding a new input device
configuration property called "keyboard.orientationAware".

Added a mechanism for overriding the key layout and key character
map in the input device configuration file using the new
"keyboard.layout" and "keyboard.characterMap" properties.

Also added "trackball.orientationAware", "touch.orientationAware" and
"touch.deviceType" configuration properties.

Rewrote the configuration property reading code in native code
so that it can be used by EventHub and other components.

Added basic support for installable idc, kl, and kcm files
in /data/system/devices. However, there is no provision for
copying files there yet.

Disabled long-press character pickers on full keyboards so that
key repeating works as expected.

Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
om_android_server_InputManager.cpp
3915bb845b032dc184dba5e60970b803390ca3ed 05-Nov-2010 Jeff Brown <jeffbrown@google.com> Tell system server whether the app handled input events.

Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.

This will be used to move more of the global default key processing
into the system server instead of the application.

Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
om_android_server_InputManager.cpp
ea9020e0854427d47e566a1394df6749f3265410 04-Nov-2010 Dianne Hackborn <hackbod@google.com> Add API to find out if there is a vibrator.

Change-Id: If29f6ee19448222433cad9fad325d0095a8e5737
om_android_server_VibratorService.cpp
4d396052deb54399cbadbeb8abd873df6f3af342 30-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix policy issues when screen is off.

Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
is not showing (the proximity sensor turned off the screen).
Previously we passed all non-wake keys through in this case which
caused a bug on Crespo where the screen would come back on if a soft key
was held at the time of power off because the resulting key up event
would sneak in just before the keyguard was shown. It would then be
passed through to the dispatcher which would poke user activity and
wake up the screen.
- We propagate the key flags when broadcasting media keys which
ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released. This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Fixed a couple of issues where media keys were being handled inconsistently
or not at all, particularly in the case of the new PAUSE, PLAY
and RECORD keys.

Bug: 3144874
Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
om_android_server_InputManager.cpp
471b0325f7c860b806097a820d9bc81b526e055a 28-Oct-2010 Mike Lockwood <lockwood@android.com> am faebca7f: am c9fa90f9: Merge "GPS: remove some logging" into gingerbread

* commit 'faebca7f4319950927759163a703dd12f2727460':
GPS: remove some logging
faebca7f4319950927759163a703dd12f2727460 28-Oct-2010 Mike Lockwood <lockwood@android.com> am c9fa90f9: Merge "GPS: remove some logging" into gingerbread

* commit 'c9fa90f94b664589d584bb433e748e2b01b368c9':
GPS: remove some logging
fa405280b2eadd91f57348703344566c1c215bc6 28-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: remove some logging

Change-Id: Ib2dca53364c9da207a87f2664b54d2ec1d1bd8d9
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
7df7cfebdf6a77e36692ae18f036f36b93eb45fd 21-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am c20f205d: am 5bfef1ba: Merge "BatteryService: Set bool to true if sysfs entry is not 0"

Merge commit 'c20f205d1059ff71b21d9c44ea147e209c364d2f'

* commit 'c20f205d1059ff71b21d9c44ea147e209c364d2f':
BatteryService: Set bool to true if sysfs entry is not 0
c20f205d1059ff71b21d9c44ea147e209c364d2f 21-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am 5bfef1ba: Merge "BatteryService: Set bool to true if sysfs entry is not 0"

Merge commit '5bfef1ba0501e237b3a0fa1abe98e5348d8c5b04' into gingerbread-plus-aosp

* commit '5bfef1ba0501e237b3a0fa1abe98e5348d8c5b04':
BatteryService: Set bool to true if sysfs entry is not 0
0bc1f39643a8434d855c3166b17fcece2e7050dc 19-Oct-2010 Mike Lockwood <lockwood@google.com> am 8333d591: am 5d5a9db5: Merge "GPS: Enable some more logging" into gingerbread

Merge commit '8333d59133da8e56cfb5465c767e89c61ede28bc'

* commit '8333d59133da8e56cfb5465c767e89c61ede28bc':
GPS: Enable some more logging
8333d59133da8e56cfb5465c767e89c61ede28bc 19-Oct-2010 Mike Lockwood <lockwood@google.com> am 5d5a9db5: Merge "GPS: Enable some more logging" into gingerbread

Merge commit '5d5a9db514a9cf42fbc189fc3af6da602d89b747' into gingerbread-plus-aosp

* commit '5d5a9db514a9cf42fbc189fc3af6da602d89b747':
GPS: Enable some more logging
b8d9033d9928209e68518c4b12fea74187ddb382 18-Oct-2010 Mike Lockwood <lockwood@google.com> GPS: Enable some more logging

Change-Id: I7d13c859002fa96fa8c361c0c709931c6b12eb99
Signed-off-by: Mike Lockwood <lockwood@google.com>
om_android_server_location_GpsLocationProvider.cpp
b25d5be54b7d876aa2b445584b829a410b50e034 16-Oct-2010 Joe Onorato <joeo@android.com> am 258d0e80: am 0d65a3fc: Merge "Screen on/off animation tweaks" into gingerbread

Merge commit '258d0e805ee63685b807b5dae43efc5ecc97179e'

* commit '258d0e805ee63685b807b5dae43efc5ecc97179e':
Screen on/off animation tweaks
d7117f04d816e06e20c1b34f277e11e237d39a71 15-Oct-2010 Mike Lockwood <lockwood@android.com> am 1442818a: am c792c2e9: Merge "GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue" into gingerbread

Merge commit '1442818a10988cc011f55104e997474b5d3d2468'

* commit '1442818a10988cc011f55104e997474b5d3d2468':
GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue
258d0e805ee63685b807b5dae43efc5ecc97179e 15-Oct-2010 Joe Onorato <joeo@android.com> am 0d65a3fc: Merge "Screen on/off animation tweaks" into gingerbread

Merge commit '0d65a3fc075b7dbdbfaba6b570217d87e307d75f' into gingerbread-plus-aosp

* commit '0d65a3fc075b7dbdbfaba6b570217d87e307d75f':
Screen on/off animation tweaks
609695dab0f0318459d32ff5dfc529d7398e751b 14-Oct-2010 Joe Onorato <joeo@android.com> Screen on/off animation tweaks

- Pass to surface flinger whether we want animations or not.
- Don't use the animation when the screen goes off because of the prox sensor.
- Turn the screen-on animation back off
- Also, now the animation setting controls whether or not we do the animation.

Bug: 3097475
Bug: 3098508
Change-Id: I205d5564d6668b33a8dc1c40d8cc06c4aad305cf
om_android_server_PowerManagerService.cpp
eb86aaaab34687a77454fa130b08788db1317d74 14-Oct-2010 Joe Onorato <joeo@google.com> am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbread

Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96'

* commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96':
Remove dead code, and make the animation a setting.
turn off the electron beam
cd4af421ca6b102cabd2cf1ff63488e086c32c44 14-Oct-2010 Jeff Brown <jeffbrown@google.com> am 4b255a23: am 03aa28fb: Merge "Improve the input policy handling a bit." into gingerbread

Merge commit '4b255a23041225103a6870e77a236f78c2816eda'

* commit '4b255a23041225103a6870e77a236f78c2816eda':
Improve the input policy handling a bit.
1442818a10988cc011f55104e997474b5d3d2468 13-Oct-2010 Mike Lockwood <lockwood@android.com> am c792c2e9: Merge "GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue" into gingerbread

Merge commit 'c792c2e9edb3c785208560b6961ac6ed5b07eb4e' into gingerbread-plus-aosp

* commit 'c792c2e9edb3c785208560b6961ac6ed5b07eb4e':
GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue
c792c2e9edb3c785208560b6961ac6ed5b07eb4e 13-Oct-2010 Mike Lockwood <lockwood@android.com> Merge "GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue" into gingerbread
49016d6cd74cd6c86fa625fe8702c474f955266e 13-Oct-2010 Axel Haslam <axelhaslam@ti.com> BatteryService: Set bool to true if sysfs entry is not 0

For the musb to recognized as online, the musbOnline value
has to be set. The battery driver sets the online property
of the sysfs as "3" when the charger type is USB.

The way the current code is, if the value is not 1,
musbOnline would be false and the menu to mount the
sdcard on the pc would not pop-up.

Since the linux driver returns 0 if the cable is not
connected, and 3 if the cable is connected, we should
set the boolean variable to 0 only if the sysfs value
is 0, otherwise we set it to true.

Change-Id: I538d8de446e7ea4f620ffcce156a57cf56b5a4e5
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
om_android_server_BatteryService.cpp
9a12a3c8d4bb20042cf69e07d268e3a04ac71f96 12-Oct-2010 Joe Onorato <joeo@google.com> am ba799098: Merge changes I76513387,I335fb671 into gingerbread

Merge commit 'ba799098608c7be8ff1e18adfa7dc1f452205a7e' into gingerbread-plus-aosp

* commit 'ba799098608c7be8ff1e18adfa7dc1f452205a7e':
Remove dead code, and make the animation a setting.
turn off the electron beam
b08a1af667b16cb1faaea2aec1cf2a0e4659cb3f 12-Oct-2010 Joe Onorato <joeo@android.com> Remove dead code, and make the animation a setting.

When we don't do the brightness fade, turn off the electron beam instead.

Change-Id: I76513387c4fb420a67e59e005f6e8c3bc72f7f08
ndroid.mk
om_android_server_PowerManagerService.cpp
301f78bbbe44e78583d9b4ecb2d9bd96feeabdec 12-Oct-2010 Mike Lockwood <lockwood@android.com> am 431dd3b1: am 86564dc6: Merge "GPS: Add update_network_state call to AGpsRillInterface" into gingerbread

Merge commit '431dd3b1bc8f2acf7cbcf08463649b5629baf398'

* commit '431dd3b1bc8f2acf7cbcf08463649b5629baf398':
GPS: Add update_network_state call to AGpsRillInterface
4b255a23041225103a6870e77a236f78c2816eda 12-Oct-2010 Jeff Brown <jeffbrown@google.com> am 03aa28fb: Merge "Improve the input policy handling a bit." into gingerbread

Merge commit '03aa28fb36589a3d601be08e75c08a24c4344d6f' into gingerbread-plus-aosp

* commit '03aa28fb36589a3d601be08e75c08a24c4344d6f':
Improve the input policy handling a bit.
3122e4488aa0749cbec9890ace22c366e35350c3 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Improve the input policy handling a bit.

Fixed some issues with Monkeys turning off their own screens. Ook ook!
Added some more comments to explain what's going on.

Change-Id: Id2bc0466161a642a73ef7ef97725d1c81e984b12
om_android_server_InputManager.cpp
26b6df74b9bcc693a5b57347d427b352cdc0541a 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Track input state when transferring touch focus."
9c9f1a3ba1bc19754e4d38cb27a537d4dfedc0fe 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Track input state when transferring touch focus.

Copies the input state to the destination window and sends synthesic
cancelation events to the source window.

Change-Id: Ia75820b0d756ed5d6cd22dce7830251ac85141ed
om_android_server_InputManager.cpp
f7b7330e710a5f751f9898739378be282471e9ef 12-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Remove unnecessary and broken test in AgpsRilInterface updateNetworkState glue

Change-Id: Ic934c478f0eb6c6d368caaf41aec8235d329ef34
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
4231124c9df51727a42cb1c09777816797c912cb 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Fix an event injection bug when the policy is bypassed."
e20c9e0264190f94324197a8271cf03811a4ca58 11-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix an event injection bug when the policy is bypassed.

Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Cherry pick of b931a1b4 from gingerbread into master.

Change-Id: I700a5f07b8b227878cea9437a289a45a245c0424
om_android_server_InputManager.cpp
02241ab2929c34aa48acdf4befcc9cacd86c1a6f 12-Oct-2010 Jean-Baptiste Queru <jbq@google.com> am 89fbcd72: resolved conflicts for merge of c2894474 to gingerbread-plus-aosp

Merge commit '89fbcd72fbe6ef26ea2703f8e338fd198c958ecc'

* commit '89fbcd72fbe6ef26ea2703f8e338fd198c958ecc':
Support showing "Cold" battery health.
986d1701820cfa922e195f5bc95b9605a97e4e7d 12-Oct-2010 Mike Lockwood <lockwood@android.com> am 1bdba9fa: am 2f77c3e4: Merge "GPS: Fix another race condition in GPS HAL initialization" into gingerbread

Merge commit '1bdba9fa3178d00a03dcbc3ede1818f7bff07e61'

* commit '1bdba9fa3178d00a03dcbc3ede1818f7bff07e61':
GPS: Fix another race condition in GPS HAL initialization
dd8b0c90400a1c59d4d71d768c02eed961596bc8 12-Oct-2010 Jeff Brown <jeffbrown@google.com> am 41aabeb5: am 1e6a3a53: Merge "Added more robust tracking and cancelation of events." into gingerbread

Merge commit '41aabeb51305d19747687f246080f44fc2a74435'

* commit '41aabeb51305d19747687f246080f44fc2a74435':
Added more robust tracking and cancelation of events.
f2e0681ada3ffe1de994a51dcebd6ef045d27434 12-Oct-2010 Jeff Brown <jeffbrown@google.com> am 1da8d4d1: Merge "Fix an event injection bug when the policy is bypassed." into gingerbread

Merge commit '1da8d4d1697cec871dea8c30dad67e90db10bde6' into gingerbread-plus-aosp

* commit '1da8d4d1697cec871dea8c30dad67e90db10bde6':
Fix an event injection bug when the policy is bypassed.
1da8d4d1697cec871dea8c30dad67e90db10bde6 12-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Fix an event injection bug when the policy is bypassed." into gingerbread
b931a1b4183386ba840edc1bcc507eccf11b5cbe 11-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix an event injection bug when the policy is bypassed.

Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
om_android_server_InputManager.cpp
431dd3b1bc8f2acf7cbcf08463649b5629baf398 11-Oct-2010 Mike Lockwood <lockwood@android.com> am 86564dc6: Merge "GPS: Add update_network_state call to AGpsRillInterface" into gingerbread

Merge commit '86564dc673db6dd752c326e53404677a3db43bec' into gingerbread-plus-aosp

* commit '86564dc673db6dd752c326e53404677a3db43bec':
GPS: Add update_network_state call to AGpsRillInterface
4cda1e3e8bb983cf838007acb25f98c78256aea4 11-Oct-2010 Mike Lockwood <lockwood@google.com> am 2d39374f: am 66e60604: Merge "GPS: More HAL initialization cleanup" into gingerbread

Merge commit '2d39374f081031871a15c4532242afe9a8738f9f'

* commit '2d39374f081031871a15c4532242afe9a8738f9f':
GPS: More HAL initialization cleanup
50130bbc884a7ad7db39dbc4f54e76e8be87761f 11-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Add update_network_state call to AGpsRillInterface

Change-Id: I404a7a45773f592de7dfe75a8287fef15515ea8b
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
72f23bb1a5e09d113506348fcd30be9d755fff28 11-Oct-2010 Mike Lockwood <lockwood@android.com> am 748b413e: am 1c3ef787: Merge "GPS: Do not call sGpsInterface->init() multiple times" into gingerbread

Merge commit '748b413e94c73b760c63a03126df2c4712a1ae05'

* commit '748b413e94c73b760c63a03126df2c4712a1ae05':
GPS: Do not call sGpsInterface->init() multiple times
89fbcd72fbe6ef26ea2703f8e338fd198c958ecc 11-Oct-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of c2894474 to gingerbread-plus-aosp

Change-Id: Ie00785e37809b677d6e8ab44c47e1f26037793d2
9239612870d08fbf79b3c53f11bd5d7cb4beb875 20-Sep-2010 Imre Sunyi <imre.sunyi@sonyericsson.com> Support showing "Cold" battery health.

The Linux kernel supports reporting "cold" battery health to sysfs.
Android framework has not implemented this and it defaults to "unknown"
This adds handling the cold battery health.

Change-Id: Idcc156aae6aabce73391081143f79d052edf332e
om_android_server_BatteryService.cpp
01df140b60ce415e89809f2a8fde88cff95daa1b 11-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Fix another race condition in GPS HAL initialization

BUG: 3082940

Change-Id: I0953882cb768aec608f754c3bc9ab41418eded97
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
1e6a3a53fc4d56e3a0f86c8721dedfd46e738a32 10-Oct-2010 Jeff Brown <jeffbrown@google.com> Merge "Added more robust tracking and cancelation of events." into gingerbread
b699726018a0049665d8ad6b90dbc5af0e18f135 09-Oct-2010 Jeff Brown <jeffbrown@google.com> Added more robust tracking and cancelation of events.

This change fixes several issues where events would be dropped in the
input dispatch pipeline in such a way that the dispatcher could not
accurately track the state of the input device.

Given more robust tracking, we can now also provide robust cancelation
of input events in cases where an application might otherwise become
out of sync with the event stream due to ANR, app switch, policy decisions,
or forced focus transitions.

Pruned some of the input dispatcher log output.

Moved the responsibility for calling intercept*BeforeQueueing into
the input dispatcher instead of the input reader and added support for
early interception of injected events for events coming from trusted
sources. This enables behaviors like injection of media keys while
the screen is off, haptic feedback of injected virtual keys, so injected
events become more "first class" in a way.

Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
om_android_server_InputManager.cpp
4270237def6c3f67dcdabbb3f27257fe3037c40d 10-Oct-2010 Mike Lockwood <lockwood@google.com> GPS: More HAL initialization cleanup

BUG: 3082940

Change-Id: Idd584ab8fe4512aae0769ecd1274c55d6ea2e5e7
Signed-off-by: Mike Lockwood <lockwood@google.com>
om_android_server_location_GpsLocationProvider.cpp
b6e5fa895c03eeefaa810eaceb498254096c093d 10-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Do not call sGpsInterface->init() multiple times

Change-Id: I5f2b55959bd67864168690c1fe619e55edc18268
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
22f41918fa4d260a4cd2bd432946845b644ecc3a 07-Oct-2010 Mike Lockwood <lockwood@android.com> resolved conflicts for merge of 6327a9fe to master

Change-Id: I1a398a7100abf75d8df7ae9a3d6110829645ae64
bea3118337ebb92b953960122af55ee88eeb35fa 05-Oct-2010 Mike Lockwood <lockwood@android.com> GPS: Clean up GPS API extension initialization in JNI code.

Change-Id: Ic5551c94bfb4e2c31cdc3ed92d938f00f46785d6
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
1e84da822e7aa4d494b31c8759917d2751611f84 27-Jul-2010 Miguel Torroja <migueltb@broadcom.com> GPS: Add support for AGpsRilInterface.

Adding changes to be able to have access to missing data to SUPL
(celld, imsi, WAP_PUSH and SMS)

Change-Id: I0207f7f7ea6595ed3fd7021cb732feddf52e4cf9
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
0f5f2e4c27612e2cda231473aec0c06838ff3750 02-Oct-2010 Jeff Brown <jeffbrown@google.com> am e11b76d3: am f6295b35: Merge "Minor logging changes to input dispatcher to help with debugging." into gingerbread

Merge commit 'e11b76d3efb056edea301d53a354d0730adf3520'

* commit 'e11b76d3efb056edea301d53a354d0730adf3520':
Minor logging changes to input dispatcher to help with debugging.
f2f487183052865d50c004a835360be1728b5a52 02-Oct-2010 Jeff Brown <jeffbrown@google.com> Minor logging changes to input dispatcher to help with debugging.

Added dumpsys reporting to EventHub.
Made the formatting a bit clearer.
Added 'Locked' suffix to some internal methods of EventHub.

Change-Id: Ic449560bcce378f6361895d27c66854e9724abb0
om_android_server_InputManager.cpp
efb8a3d6e058c8bc90bb9da6c58dde453f359851 02-Oct-2010 Jeff Brown <jeffbrown@google.com> am 57fa3e8b: am 9e32a438: Merge "Support haptic feedback for virtual keys defined in key layout." into gingerbread

Merge commit '57fa3e8b4c94125ddb5be015dd7fbde4a458894f'

* commit '57fa3e8b4c94125ddb5be015dd7fbde4a458894f':
Support haptic feedback for virtual keys defined in key layout.
0eaf3931a31c29f3a3883aab426b595c231c2a58 01-Oct-2010 Jeff Brown <jeffbrown@google.com> Support haptic feedback for virtual keys defined in key layout.

Change-Id: I83e4108a87332692e03791dc066206becbc7941f
om_android_server_InputManager.cpp
a53146c5569f8ff5f7eb55e9ad35d23ddacf2add 07-Sep-2010 Christopher Tate <ctate@google.com> Drag/drop APIs and infrastructure

A View initiates a drag-and-drop operation (hereafter just called a "drag")
by calling its startDrag(ClipData) method. Within the processing of that
call, two callbacks are made into the originating View. The first is to
onMeasureDragThumbnail(). Similarly to the core onMeasure() method, this
callback must respond by calling setDragThumbnailDimension(width, height) to
declare the size of the drag thumbnail image that should be used. Following
this, the View's onDrawDragThumbnail(canvas) method will be invoked to
actually produce the bits of the thumbnail image.

If all goes well, startDrag() will return 'true', and the drag is off and
running. (The other arguments to startDrag() provide reconciliation between
the current finger position and where the thumbnail should be placed on
the screen relative to it.)

Potential receipients of the ClipData behind the drag are notified by a
new dispatch mechanism, roughly parallel to motion event dispatch. The core
routine is the View's onDragEvent(event) callback, with the mechanics of
dispatch itself being routed through dispatchDragEvent(event) -- as in
the case of motion events, the dispatch logic is in ViewGroup, with leaf
View objects not needing to consider the dispatch flow.

Several different event 'actions' are delivered through this dispatch
mechanism:

ACTION_DRAG_STARTED: this event is propagated to every View in every window
(including windows created during the course of a drag). It serves as a
global notification that a drag has started with a payload whose matching
ClipDescription is supplied with the event. A View that is prepared to
consume the data described in this event should return 'true' from their
onDragEvent() method, and ideally will also make some visible on-screen
indication that they are a potential target of the drop.

ACTION_DRAG_ENTERED: this event is sent once when the drag point
enters the View's bounds. It is an opportunity for the View to set up
feedback that they are the one who will see the drop if the finger goes
up now.

ACTION_DRAG_LOCATION: when the drag point is over a given View, that
View will receive a stream of DRAG_LOCATION events, providing an
opportunity for the View to show visual feedback tied to the drag point.

ACTION_DRAG_EXITED: like DRAG_ENTERED, but called when the drag point
leaves the View's bounds. The View should undo any visuals meant to
emphasize their being the hovered-over target.

ACTION_DROP: when the drag ends at a given point, the View under that
point is sent this event, with the full ClipData of the payload.

ACTION_DRAG_ENDED: paralleling the DRAG_STARTED action, this is the global
broadcast that the drag has ended and all Views should return to their
normal visual state. This happens after the DROP event.

Change-Id: Ia8d0fb1516bce8c735d87ffd101af0976d7e84b6
om_android_server_InputManager.cpp
e65041225ec0bbc3d67a3b70cdc6d598a5760043 27-Sep-2010 Jeff Brown <jeffbrown@google.com> Add support for transferring touch focus.

Prerequisite for drag and drop.

Change-Id: Iedbe93ed0f3e1c4083130fe66b4ba06d416afce0
om_android_server_InputManager.cpp
464fb74e28b6d76d5e741abcdbb714eea2d9b4d1 27-Sep-2010 Jeff Brown <jeffbrown@google.com> am 9785bf0f: am 14a288da: Merge "Add suuport for splitting touch events across windows." into gingerbread

Merge commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919'

* commit '9785bf0f2b6b8758aed7ded3b996a2ef0be89919':
Add suuport for splitting touch events across windows.
01ce2e9eee41cc0c24b0d16465710a28ea337d5d 27-Sep-2010 Jeff Brown <jeffbrown@google.com> Add suuport for splitting touch events across windows.

This feature is currently used to enable dragging the start and end
selection handles of a TextView at the same time. Could be used for
other things later.

Deleted some dead code in ArrowKeyMovementMethod and CursorControllers.

Change-Id: I930accd97ca1ca1917aab8a807db2c950fc7b409
om_android_server_InputManager.cpp
a7553c5e330a6f743f6a62d610373214b1001663 22-Sep-2010 Jeff Brown <jeffbrown@google.com> am 77d9a5a5: am 98bcb41d: Merge "Fix race reading input configuration during system startup." into gingerbread

Merge commit '77d9a5a55fa52074f18012cf997854a82500fd59'

* commit '77d9a5a55fa52074f18012cf997854a82500fd59':
Fix race reading input configuration during system startup.
57c59376f4432bdb285acb242bd9b3bec81f6bca 22-Sep-2010 Jeff Brown <jeffbrown@google.com> Fix race reading input configuration during system startup.

Change-Id: I9360c4ec5c29937fce06b44ffc71fca58c8b3d5f
om_android_server_InputManager.cpp
711f82784fadb93d488b829c04bda35860903a67 17-Sep-2010 Jeff Brown <jeffbrown@google.com> am 6f0ff46c: am 9c258710: Merge "Fix app switch latency optimization." into gingerbread

Merge commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25'

* commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25':
Fix app switch latency optimization.
54a1825121d006d4a4dcbbadf4eac9910f44ef8c 16-Sep-2010 Jeff Brown <jeffbrown@google.com> Fix app switch latency optimization.

This optimization was broken due to recent changes in how ANRs are handled.

Change-Id: Ic99248a12755fadac8d4893e7d305b773e038d3d
om_android_server_InputManager.cpp
fa8186c71662ae9c869adbf379ccc2d917638881 16-Sep-2010 Jeff Brown <jeffbrown@google.com> am 7642c82c: am f4d788c9: Merge "Make input dispatcher only ANR for foreground windows." into gingerbread

Merge commit '7642c82c291051919aad87c797e2dc1d77ed55e1'

* commit '7642c82c291051919aad87c797e2dc1d77ed55e1':
Make input dispatcher only ANR for foreground windows.
519e024d1e682ca458cc2dab743589a12992c0e1 16-Sep-2010 Jeff Brown <jeffbrown@google.com> Make input dispatcher only ANR for foreground windows.

Redesigned the input dispatcher's ANR timeout mechanism so it is much
closer to Froyo's policy. ANR is only ever signalled if the dispatcher
is waiting on a window to finish processing its previous event(s) and
there is new pending input.

In the old code, we tracked the dispatch timeout separately for each
input channel. This was somewhat complicated and also resulted in the
situation where applications could ANR long after the user had pushed
them into the background.

Change-Id: I666ecada0952d4b95f1d67b9f733842b745c7f4b
om_android_server_InputManager.cpp
b3787d57fffbb898f4767f7a94031cafe974a0b0 13-Sep-2010 Jeff Brown <jeffbrown@google.com> am 0f0541e4: am b88102f5: Input dispatcher ANR handling enhancements.

Merge commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6'

* commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6':
Input dispatcher ANR handling enhancements.
b88102f5b7e51552a3576cf197b4c8cf96f193d1 08-Sep-2010 Jeff Brown <jeffbrown@google.com> Input dispatcher ANR handling enhancements.

This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in. Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.

Added a .5 second deadline for processing app switch keys. This behavior
predates Gingerbread but had not previously been ported.

Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.

Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR. This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.

Added more comments to describe the tricky parts of PollLoop.

Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
om_android_server_InputManager.cpp
om_android_server_PowerManagerService.h
3dfc5721ad4dfe15962fd18daf038044cd09bf86 08-Sep-2010 Jeff Brown <jeffbrown@google.com> am 8723bb58: am b21fb104: Fix key repeat delay.

Merge commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7'

* commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7':
Fix key repeat delay.
b380c4d7edc158788a85c906900232675c0164ac 08-Sep-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of a05088c1 to master

Change-Id: I7973f9f28586dec9b9659f8f662f40db7997a521
b21fb104cc95fe7e5daf3b3626241e525c39a3f1 07-Sep-2010 Jeff Brown <jeffbrown@google.com> Fix key repeat delay.

Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
om_android_server_InputManager.cpp
85a3176704b5bfbeece9bd928369fbb76eec7dc6 02-Sep-2010 Jeff Brown <jeffbrown@google.com> Add support for secure views.

Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
om_android_server_InputManager.cpp
22f5ee93746f37823265b8cb9b1e94e572607514 31-Aug-2010 Jeff Brown <jeffbrown@google.com> am 36f0cb26: am 8d60866e: Input device calibration and capabilities.

Merge commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030'

* commit '36f0cb26cbb4ef62995ff2e5a540cf8814e7f030':
Input device calibration and capabilities.
8d60866e2100db70ecf0502c14768a384514d7e9 30-Aug-2010 Jeff Brown <jeffbrown@google.com> Input device calibration and capabilities.

Finished the input device capability API.
Added a mechanism for calibrating touch devices to obtain more
accurate information about the touch contact area.
Improved pointer location to show new coordinates and capabilities.
Optimized pointer location display and formatting to avoid allocating large
numbers of temporary objects. The GC churn was causing the application to
stutter very badly when more than a couple of fingers were down).
Added more diagnostics.

Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498
om_android_server_InputManager.cpp
d78b868ce32ccd96e414f096577fddd78ec5defb 21-Aug-2010 Jeff Brown <jeffbrown@google.com> am 36beeca4: am 3d8c9bdb: Raise motion event throttle to 60Hz from 35Hz.

Merge commit '36beeca4c34af2aed6a070e43b69993daff67661'

* commit '36beeca4c34af2aed6a070e43b69993daff67661':
Raise motion event throttle to 60Hz from 35Hz.
feb02e7695c99d6eab0884f2424cff5bf48f4df4 21-Aug-2010 Jeff Brown <jeffbrown@google.com> am d25f0aea: am 99401b29: Merge "Add support for throttling motion events." into gingerbread

Merge commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3'

* commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3':
Add support for throttling motion events.
3d8c9bdbed0c31143227697bd0d94fd234fe08ad 19-Aug-2010 Jeff Brown <jeffbrown@google.com> Raise motion event throttle to 60Hz from 35Hz.

Bug: 2931575
Change-Id: Ib8b1793addcda74b2fa6de2ce61b6133b8ffda9d
om_android_server_InputManager.cpp
ae9fc03bdccda709101291bbcd3beaa5b6daebfc 19-Aug-2010 Jeff Brown <jeffbrown@google.com> Add support for throttling motion events.

Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
om_android_server_InputManager.cpp
671cc0ec30dfd73e17c3f3bd0170341c06ac945e 18-Aug-2010 Jeff Brown <jeffbrown@google.com> am 8fd80e92: am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread

Merge commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d'

* commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d':
Fix possible race conditions during channel unregistration.
2cbecea4c9627d95377fc3e3b8a319116cee7feb 18-Aug-2010 Jeff Brown <jeffbrown@google.com> Fix possible race conditions during channel unregistration.

Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables. However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor. Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.

When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number. The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.

Here is the race:

1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
This InputChannel happens to have the same receive pipe fd as
the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
pipe fd is registered but the sequence number is incorrect so it
assumes that the client has called finish spuriously.

The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd. When it notices this, it
ignores the spurious finish.

I've also made a couple of other small changes to avoid similar races
elsewhere.

This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.

Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
om_android_server_InputManager.cpp
5c9609f136d6c575109d130153fbd487a66408d4 17-Aug-2010 Jeff Brown <jeffbrown@google.com> am 637df045: am 1ce4394c: Merge "Throttle userActivity calls from input dispatcher." into gingerbread

Merge commit '637df0456f71e8af69122ae7c3f5decf4c8dd1f8'

* commit '637df0456f71e8af69122ae7c3f5decf4c8dd1f8':
Throttle userActivity calls from input dispatcher.
90291577a08f582e0978651f55dd950f40eb111d 16-Aug-2010 Jeff Brown <jeffbrown@google.com> Throttle userActivity calls from input dispatcher.

Results in an approximately 60% reduction in InputDispatcher thread CPU time.
(Went from 3% to 1% when measured with CPU frequency scaling disabled.)

Change-Id: Ia6e6087a719ee518fe37b428a871c7240bd4143f
om_android_server_PowerManagerService.cpp
om_android_server_PowerManagerService.h
b219a83ff6278eeef981e6908abf871876a68699 12-Aug-2010 Jeff Brown <jeffbrown@google.com> am f66f8a58: am 95af0c14: Merge "Add support for the PointerLocation overlay." into gingerbread

Merge commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58'

* commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58':
Add support for the PointerLocation overlay.
a41ca77fabe1c7ad12ebb9b69b9e786c07d49fa0 11-Aug-2010 Jeff Brown <jeffbrown@google.com> Add support for the PointerLocation overlay.

This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications. The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).

Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
om_android_server_InputManager.cpp
6ec402b5ae33c8927694d8522b4cc6a5c8ba974e 29-Jul-2010 Jeff Brown <jeffbrown@google.com> DO NOT MERGE: Fix input event injection ANRs on UI thread.

Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
om_android_server_InputManager.cpp
bbda99d2086d79ac70b403cad38a47c35af84adf 29-Jul-2010 Jeff Brown <jeffbrown@google.com> Fixed StatusBar ANRs due to input event injection on UI thread.

Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: I0464f70ff5cbd519dbb02686b2cb5d810fe7dbb2
om_android_server_InputManager.cpp
03a545e5edcd99985d672fba40110d054397d02c 28-Jul-2010 Mike Lockwood <lockwood@android.com> Merge changes I00d6980a,I814221b4,Id88603a5

* changes:
CameraBrowser: Launch itself when a camera is attached to USB.
Send Intents when PTP compatible devices are connected/disconnected to USB
Give system server permission to access USB.
2279971b6f66d60240b8c72a9d52644a3bcdf01b 28-Jul-2010 Jeff Brown <jeffbrown@google.com> am 9795a25d: am 6d0fec2d: Refactor input reader to support new device types more easily.

Merge commit '9795a25da060f9a7df87da8ab43fb1086d4322a5'

* commit '9795a25da060f9a7df87da8ab43fb1086d4322a5':
Refactor input reader to support new device types more easily.
6d0fec2de3601821f4f44eeb7d7deedebb2b7117 24-Jul-2010 Jeff Brown <jeffbrown@google.com> Refactor input reader to support new device types more easily.

Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type. This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.

Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).

Simplified EventHub interface somewhat since InputReader is taking over
more of the work.

Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.

Fixed swiping finger from screen edge into display area.

Added logging of device information to 'dumpsys window'.

Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
om_android_server_InputManager.cpp
da39f0e87814c5acb8b6319a1877b93197fb910e 28-Jul-2010 Mike Lockwood <lockwood@android.com> Send Intents when PTP compatible devices are connected/disconnected to USB

Usb.ACTION_USB_CAMERA_ATTACHED and Usb.ACTION_USB_CAMERA_DETACHED are sent
when cameras are connected and disconnected.
The data field of the intent contains a Uri for the camera in the Mtp content provider.

Change-Id: I814221b4f0507b309997c71edb5a041e8efc54f7
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_UsbObserver.cpp
nload.cpp
50558b956157dad980441bf4fb44931ce834e36b 22-Jul-2010 Mathias Agopian <mathias@google.com> resolved conflicts for merge of bc54e63c to master

Change-Id: I4245b15b4cda6963d735442c0c6a04a0477ff5e1
1bf797857e025e8a71db86fb9e79765a767ec1eb 15-Jul-2010 Mathias Agopian <mathias@google.com> new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
ndroid.mk
om_android_server_SensorService.cpp
nload.cpp
5b45b1c274d448a304188d07cb54ac5d2668f203 17-Jul-2010 Jeff Brown <jeffbrown@google.com> am 7b8df313: am 00ba8844: Fix individual pointer id up/down reporting.

Merge commit '7b8df313f714d6e8d536e0f8bbe5496fe9a6c26d'

* commit '7b8df313f714d6e8d536e0f8bbe5496fe9a6c26d':
Fix individual pointer id up/down reporting.
00ba884436dc8b222ad850c73c936d87bf4e84de 17-Jul-2010 Jeff Brown <jeffbrown@google.com> Fix individual pointer id up/down reporting.

Fix a minor threading bug in InputManager dump.

Change-Id: Ic2eecf7df5a8dc9f40561fcb03ebe58a2c073778
om_android_server_InputManager.cpp
eb857f12d605659b385d168ef1ea7d4ba5193585 16-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of f7adbe10 to master

Change-Id: I898a5e53b180adaee2337c0c0b9896c799d056e7
e33348ba54cd68d6936cffd4507037c14d4b10c2 16-Jul-2010 Jeff Brown <jeffbrown@google.com> Fix bug with phantom input windows.

Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.

Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
om_android_server_InputManager.cpp
b75fa30aaf03d9e425d150b452501e5df0621351 16-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of aca672ba to master

Change-Id: I7ae11fca0acdbf513a4870226d0d3e3cafbe9a08
c5ed5910c9ef066cec6a13bbb404ec57b1e92637 15-Jul-2010 Jeff Brown <jeffbrown@google.com> Add support for new input sources.

Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.

Renamed NDK input constants per convention.

Added InputDevice class in Java which will eventually provide
useful information about available input devices.

Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.

Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.

Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.

Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.

Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
om_android_server_InputManager.cpp
6ac7674e143f9716312f048da3f25ca83b646315 14-Jul-2010 Jeff Brown <jeffbrown@google.com> am 89ee578b: am fd035829: Add initial gamepad support.

Merge commit '89ee578b7053d27a50922f82feb94bf6054b330c'

* commit '89ee578b7053d27a50922f82feb94bf6054b330c':
Add initial gamepad support.
fd03582995e0fce963dd0fa0669e3211b74c0dd7 01-Jul-2010 Jeff Brown <jeffbrown@google.com> Add initial gamepad support.

Change-Id: I0439648f6eb5405f200e4223c915eb3a418b32b9
om_android_server_InputManager.cpp
1a33274d28a3174b9062ae0dcce77bf1d68cd463 09-Jul-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 167449e5 to master

Change-Id: Ib448e69a726eb45b5c9099d2574e40b8345eee67
00fa7bdd69f0868fd17ea7c881c771d785b2fbbd 03-Jul-2010 Jeff Brown <jeffbrown@google.com> More native input dispatch work.

Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
ndroid.mk
om_android_server_InputManager.cpp
om_android_server_KeyInputQueue.cpp
om_android_server_PowerManagerService.cpp
om_android_server_PowerManagerService.h
nload.cpp
5840b7c1193e0deb28dd4e2f622eaa62cb0483a2 01-Jul-2010 Jeff Brown <jeffbrown@google.com> am 0c2df984: am d8ae2885: Merge "Fix injection of specially intercepted keys like HOME." into gingerbread

Merge commit '0c2df98425c8fa4ce092eebea80ae197547f6a86'

* commit '0c2df98425c8fa4ce092eebea80ae197547f6a86':
Fix injection of specially intercepted keys like HOME.
d0097871828bb7d5d6eec06cadd92c2e3358849b 30-Jun-2010 Jeff Brown <jeffbrown@google.com> Fix injection of specially intercepted keys like HOME.

This change mainly unwinds a premature optimization in the
dispatch pipeline.
To test HOME injection, run 'adb shell input keyevent 3'.

Change-Id: I1c4b7377c205da7c898014b8b07fc6dc1d46e4dd
om_android_server_InputManager.cpp
3dcfeac8900012ebba8329ec420bbd2fa47c262a 30-Jun-2010 Mike Lockwood <lockwood@android.com> am 2a28f4b4: am 5b8364a9: GPS: stifle some logging

Merge commit '2a28f4b40c36ab3a8a80467eb5781ae6e5811369'

* commit '2a28f4b40c36ab3a8a80467eb5781ae6e5811369':
GPS: stifle some logging
5b8364a929e26b30d55de9d330e1cb9a11df6208 30-Jun-2010 Mike Lockwood <lockwood@android.com> GPS: stifle some logging

Change-Id: Ifc68f27a6cb841240db182f4c77ddd8085a8c149
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
41254a8ddd4dd737969524eaca4afdda2392c023 30-Jun-2010 Chris Tate <ctate@android.com> am af4a2d1f: am ddcb543a: Merge "Fix native input dispatch in the emulator." into gingerbread

Merge commit 'af4a2d1f52c7d54408db341781399d2886de72c1'

* commit 'af4a2d1f52c7d54408db341781399d2886de72c1':
Fix native input dispatch in the emulator.
0b72e82c5f5d4ab709539c3490d6c7023f680dff 30-Jun-2010 Jeff Brown <jeffbrown@google.com> Fix native input dispatch in the emulator.

Set a default orientation of ROTATION_0.
Added some more careful checks based on whether we have valid
absolute axis information from the driver.
Reset key repeating during configuration changes since the keyboard
device may have been removed.

Change-Id: I685960828acffcb17595fc5683309e8064a76714
om_android_server_InputManager.cpp
f40e4928b9d8e1da4166c76dbd3f86a6bd2d3f72 29-Jun-2010 Chris Tate <ctate@android.com> am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread

Merge commit '96725326149687168937cf62f75364cf9cc3e96b'

* commit '96725326149687168937cf62f75364cf9cc3e96b':
Native input event dispatching.
349703effce5acc53ed96f7ed8556131f0c65e18 22-Jun-2010 Jeff Brown <jeffbrown@google.com> Native input event dispatching.

Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
om_android_server_InputManager.cpp
b09448e0a84a57bd15ea556f8bef27964128032a 23-Jun-2010 Mike Lockwood <lockwood@android.com> am dae19d7c: am aaf39f84: Merge "GPS: remove GpsEventThread from GpsLocationProvider" into gingerbread

Merge commit 'dae19d7c00455e500cc9731071557ea91f162a7d'

* commit 'dae19d7c00455e500cc9731071557ea91f162a7d':
GPS: remove GpsEventThread from GpsLocationProvider
e981c883d5ca99ccb97c317d824b9c288b613f67 23-Jun-2010 Jeff Brown <jeffbrown@google.com> am b1efc3f6: am 7fbdc84e: More native input event dispatching.

Merge commit 'b1efc3f68277a8c38c21e2d2e8ce05287118ecfe'

* commit 'b1efc3f68277a8c38c21e2d2e8ce05287118ecfe':
More native input event dispatching.
f602d362ba4bb3adbf1eb4e38a794fb14274293a 20-Jun-2010 Mike Lockwood <lockwood@android.com> GPS: remove GpsEventThread from GpsLocationProvider

Rather than polling for events from the native code in an event thread,
we now require the GPS HAL libraries to call our callbacks from a thread
that is registered with the JVM to call directly into Java.
This eliminates a thread from our code and removes one step in the chain
of message passing from the GPS to the Location Manager client.

Change-Id: I2745a157690310ba9a699a8369f54a7366c6b1ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
7fbdc84e87dd3a0e196b9803bb04495d11e9cb8a 18-Jun-2010 Jeff Brown <jeffbrown@google.com> More native input event dispatching.

Added ANRs handling.
Added event injection.
Fixed a NPE ActivityManagerServer writing ANRs to the drop box.
Fixed HOME key interception.
Fixed trackball reporting.
Fixed pointer rotation in landscape mode.

Change-Id: I50340f559f22899ab924e220a78119ffc79469b7
om_android_server_InputManager.cpp
4e74ae3d5b27d917ea26d0929015f9fdc64af412 17-Jun-2010 Jeff Brown <jeffbrown@google.com> am 42bb545a: am 5c225b16: Even more native input dispatch work in progress.

Merge commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00'

* commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00':
Even more native input dispatch work in progress.
5c225b1680e696ae8bbf505a1997d6f720672f74 16-Jun-2010 Jeff Brown <jeffbrown@google.com> Even more native input dispatch work in progress.

Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.

Modified the internal representation of MotionEvent to be more
efficient and more consistent.

Added code to skip/cancel virtual key processing when there are multiple
pointers down. This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).

Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
om_android_server_InputManager.cpp
8959f1c71b99a712abf732f9814aa66054d75943 16-Jun-2010 Jeff Brown <jeffbrown@google.com> am 2dfd2aa4: am 92266a78: Merge "More work in progress on native events." into gingerbread

Merge commit '2dfd2aa413a91965c1a247980598c795db9b4c38'

* commit '2dfd2aa413a91965c1a247980598c795db9b4c38':
More work in progress on native events.
9c3cda04d969912bc46184f2b326d1db95e0aba5 15-Jun-2010 Jeff Brown <jeffbrown@google.com> More work in progress on native events.

Refactored the code to eliminate potential deadlocks due to re-entrant
calls from the policy into the dispatcher. Also added some plumbing
that will be used to notify the framework about ANRs.

Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
om_android_server_InputManager.cpp
8e03b7566c42621fda01186b66b019142eb84fbf 14-Jun-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 9e660c82 to master

Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> Native input dispatch rewrite work in progress.

The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API. Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
ndroid.mk
om_android_server_InputManager.cpp
om_android_server_KeyInputQueue.cpp
nload.cpp
f1307b2ac4958efad3cf678d6419472631b1f3b3 15-Apr-2010 Mike Lockwood <lockwood@android.com> am 04598b67: GPS: Support for GPS HAL managing its own scheduling
5383c2ba66ab828fb76650794e58fcd5ea4ae0a6 15-Apr-2010 Patrick Scott <phanna@android.com> am 56645e26: Merge branch \'kraken\' of ssh://android-git:29418/platform/frameworks/base into kraken
04598b67a58fad93e5060bb77756ba4863013aed 14-Apr-2010 Mike Lockwood <lockwood@android.com> GPS: Support for GPS HAL managing its own scheduling

Also update to support new position mode API.

Change-Id: I00acc094d3e85bc5c0cd431af517064bfa8f2b1a
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
8f5a800116f700b0af21d2a8468165bcf51b841c 07-Apr-2010 Mike Lockwood <lockwood@android.com> Add wake lock utility functions for the GPS HAL.

Change-Id: I9071f31badee9628126c91cd4ce55acf41ee186f
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
5f880106eba08306d6cf44489878104fb29f5dbc 05-Apr-2010 Mike Lockwood <lockwood@android.com> Remove GPS privacy support to fix merge problem.

Change-Id: Ib00543b339a6358989779828459b120d1c647b72
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
58d2139b46933e6f8f0e7d9a2aea4782c303b56f 05-Apr-2010 Mike Lockwood <lockwood@android.com> am edff6dbe: Merge "Switch from hardware_legacy to new HAL GPS interface." into kraken
b7ff4574b5a8273b0ff43ca7f490ba5ceec42912 05-Apr-2010 Mike Lockwood <lockwood@android.com> Switch from hardware_legacy to new HAL GPS interface.

Change-Id: I19b299fbcbd44d711a64ece98955d095eb9ffa2b
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
00b74270c9f136a8727c5f6cda0997a3a905f385 26-Mar-2010 Mike Lockwood <lockwood@android.com> Move files internal to LocationManagerService from framework.jar to services.jar

Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_location_GpsLocationProvider.cpp
nload.cpp
c254ce3ab0eda9fb1d3e5e07a2ac036bdcf41b92 01-Apr-2010 Jeff Brown <jeffbrown@google.com> am 6801cedb: am 6a3e7dfa: am c738783c: Merge "Fix alarms with negative or very large wakup times." into froyo
11c5f1a65d6c495cc60f9f15d408c776baed9f73 01-Apr-2010 Jeff Brown <jeffbrown@google.com> Fix alarms with negative or very large wakup times.

When the wakeup time is negative, the kernel /dev/alarm driver
never triggers the alarm. This can cause alarms to back up in the
priority queue since an alarm at the head with a negative wakup time
will never be triggered. Now we use 0 as the wakup time which causes
an immediate triggering.

When the wakeup time is very large, it is possible for a numeric
overflow to occur when converting the timestamp from milliseconds
since epoch to nanoseconds. This has been fixed by avoiding the
intermediate conversion in the JNI call so that overflow cannot
occur.

Bug: b/2558820
Change-Id: I4f5b4646a04090cc749a9fc5d3982a68402954ef
om_android_server_AlarmManagerService.cpp
9123077eba971f9c445f969c39358085bd71066b 26-Mar-2010 Mike Lockwood <lockwood@android.com> Add support for GPS privacy lock.

Change-Id: Iddece21179877efae7d04db10fa58b1c6f94b1d1
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_location_GpsLocationProvider.cpp
43e33f28721e4759d4edb0fad08d330bba74f25e 26-Mar-2010 Mike Lockwood <lockwood@android.com> Move files internal to LocationManagerService from framework.jar to services.jar

Change-Id: I3dbb40210d87708e0bff46729f707d4ab8e29e42
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_location_GpsLocationProvider.cpp
nload.cpp
f5d95cbc1a6974afeb4d3155bdaa8dae55722a39 08-Jan-2010 Joe Onorato <joeo@android.com> less log spew
om_android_server_SensorService.cpp
3cb67a37f185a7a5b12712907630acb68e0ac402 27-Nov-2009 Mike Lockwood <lockwood@android.com> LightsService cleanup:

Add Light subclass to replace LightsService light setting methods
Remove LightsService.setAttentionLight() and LightsService.pulseBreathingLight()
Add support for Wifi and Bluetooth lights

Change-Id: I707f53cda27481c25649f402567a665d52e9cb62
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_LightsService.cpp
3a32213c4029a03fe39486f3d6ebd0ea18928ee1 24-Nov-2009 Mike Lockwood <lockwood@android.com> Remove HardwareService and move vibrator support to VibratorService.

The lights support is only needed by PowerManagerService and NotificationManagerService, so we do not need a Binder API for it.
Move backlight and notification light support to new LightsService class.
The camera flash is now handled directly by the camera HAL, so the flash Hardware service flash support is obsolete.

Change-Id: I086d681f54668e7f7de3e8b90df3de19d59833c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
om_android_server_HardwareService.cpp
om_android_server_LightsService.cpp
om_android_server_VibratorService.cpp
nload.cpp
cc9a63dbc2b5569ef65ec3a04d86dbdfdee3f134 10-Nov-2009 Mike Lockwood <lockwood@android.com> Add support for specifying the current LCD brightness mode to the backlight driver.

This allows the driver to behave differently depending on if the lighting is being
managed by the light sensor or by a user preference.

Change-Id: I4b9325f82b7aded0ce5cfc6c07658666bbdae331
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_HardwareService.cpp
f90ffcc639fe979f346f062d620d34c28e57c885 03-Nov-2009 Mike Lockwood <lockwood@android.com> Remove obsolete hardware auto-brightness support.

Change-Id: Ibd0ef67f887254f26ce19faf0627f8b246ec0a18
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_HardwareService.cpp
6af0d50a8edb101d9da1306b6d85abf5dd3f9a30 28-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2149145: Safe Mode does not work on Sholes device

The APIs for checking whether keys are held down now also look
at virtual keys.

However it turns out there is less than a second between the time we
start the input thread and check for safe mode, so there is not enough
time to actually open all of the devices and get the data from them
about the finger being down to determine if a virtual key is down.

So now you can also hold DPAD center, trackball center, or s to
enter safe mode. Also give some vibrator feedback.

Change-Id: I55edce63bc0c375813bd3751766b8070beeb0153
om_android_server_KeyInputQueue.cpp
951764b97010dfa073126f52b43ea1bdf1b35998 27-Aug-2009 Dan Murphy <D.Murphy@motorola.com> Add automatic lighting control framework

Add changes to have the ability to turn on and off the
automatic light sensing for the device. This is fully configurable
and is by default not present. Vendors should override the ALS setting
to enable the automatic lighting controls.

These changes will add a check box to the Brightness settings menu to give control
to the user to allow the device's display lighting to be controlled via the slide bar
or the auto lighting system.

If the user selects auto then the slide bar will become invisible. Manual mode
will present the slide bar to the user.

Change-Id: I146a6d75b99b08c9b839218ce6b85adf21f9fd73
Signed-off-by: Dan Murphy <D.Murphy@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_HardwareService.cpp
2d6b67d37f3164e53b311650aab94faabf46ef67 29-Aug-2009 Mike Lockwood <lockwood@android.com> SensorService: call close_data_source when we have no more sensor clients.

Change-Id: I94accda4571c3f2cf6f8a5b6801e37c30c027fe1
Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_SensorService.cpp
f24d13a28fbf0d547ebb669f856e7c34ff70c8ec 18-Aug-2009 Mike Lockwood <lockwood@android.com> BatteryService: Add support for new standard battery voltage and temperature attributes.

Plus some cleanup from the previous commit.

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_BatteryService.cpp
304928fb7ead0efeec54b2535ed57bfc61773602 17-Aug-2009 Mike Lockwood <lockwood@android.com> BatteryService: Remove hard coded power supply names.

Search all subdirectories of /sys/class/power_supply and match on
the power supply type instead.

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_BatteryService.cpp
f59af9a3879be9b789a7446bde6668161a79e1fd 05-Aug-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
19b8d8acc240c2d68a0b995c55c5e25b67e03ea8 04-Aug-2009 Kenny <gongwuchun@gmail.com> fix method table wrong in com_android_server_HardwareService.cpp
om_android_server_HardwareService.cpp
cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f 21-Jul-2009 Jean-Baptiste Queru <jbq@google.com> donut snapshot
om_android_server_SensorService.cpp
1d9dfc5dcf459e85cffcb762ffdb9b9a4abbfd67 16-Jul-2009 Mike Lockwood <lockwood@android.com> EventHub: Add support for excluding devices from being opened by as a keyboard.

This will be used to avoid unnecessarily listening to data from sensors
that function as event devices.

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_KeyInputQueue.cpp
e3dd884815b2aaeec4241859722ab603e0b1466b 14-Jul-2009 Dianne Hackborn <hackbod@google.com> Implement virtual button support.

The kernel can now publish a property describing the layout of virtual
hardware buttons on the touchscreen. These outside of the display
area (outside of the absolute x and y controller range the driver
reports), and when the user presses on them a key event will be
generated rather than a touch event.

This also includes a number of tweaks to the absolute controller
processing to make things work better on the new screens. For
example, we now reject down events outside of the display area.

Still left to be done is the ability to cancel a key down event,
so the user can slide up from the virtual keys to the touch screen
without causing a virtual key to execute.
om_android_server_KeyInputQueue.cpp
b57d6c9939190f440d3e13adb5fafba6a0cf653d 23-May-2009 Mike Lockwood <lockwood@android.com> am 270e87f7: Sensors: Use a native_handle for the data channel instead of a single file descriptor.

Merge commit '270e87f71abc2edf446dbec20c725c823e8c7f37'

* commit '270e87f71abc2edf446dbec20c725c823e8c7f37':
Sensors: Use a native_handle for the data channel instead of a single file descriptor.
270e87f71abc2edf446dbec20c725c823e8c7f37 22-May-2009 Mike Lockwood <lockwood@android.com> Sensors: Use a native_handle for the data channel instead of a single file descriptor.

This eliminates the requirement that all sensors share a single file descriptor.
This, along with concurrent changes in other projects, fixes bugs b/1614524 and b/1614481

Signed-off-by: Mike Lockwood <lockwood@android.com>
om_android_server_SensorService.cpp
25ba5b6564224dceefa086b5c439ef28dad530ca 19-May-2009 Mathias Agopian <mathias@google.com> checkpoint: split libutils into libutils + libbinder
om_android_server_AlarmManagerService.cpp
om_android_server_BatteryService.cpp
843ef36f7b96cc19ea7d2996b7c8661b41ec3452 20-May-2009 Jean-Baptiste Queru <jbq@google.com> donut snapshot
om_android_server_BatteryService.cpp
e7e6fa3fbfeae278f739f3863197d0c4fc750abe 29-Apr-2009 Rebecca Schultz Zavin <rebecca@android.com> If no battery stats are found, return status_unknown

If the battery files can't be found return status_unkown instead of an
error. On systems where we haven't brought up battery stats yet they
assume the battery is dead and turn off as soon as the runtime starts

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
om_android_server_BatteryService.cpp
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
om_android_server_HardwareService.cpp
nload.cpp
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
ndroid.mk
om_android_server_AlarmManagerService.cpp
om_android_server_BatteryService.cpp
om_android_server_HardwareService.cpp
om_android_server_KeyInputQueue.cpp
om_android_server_SensorService.cpp
om_android_server_SystemServer.cpp
nload.cpp