summaryrefslogtreecommitdiffstats
path: root/services/jni
Commit message (Collapse)AuthorAgeFilesLines
* Fix native input dispatch in the emulator.Jeff Brown2010-06-291-1/+1
| | | | | | | | | | 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
* Native input event dispatching.Jeff Brown2010-06-281-104/+1264
| | | | | | | | | 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
* GPS: remove GpsEventThread from GpsLocationProviderMike Lockwood2010-06-221-233/+124
| | | | | | | | | | | 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>
* More native input event dispatching.Jeff Brown2010-06-211-71/+286
| | | | | | | | | | | 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
* Even more native input dispatch work in progress.Jeff Brown2010-06-171-10/+20
| | | | | | | | | | | | | | | | | 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
* More work in progress on native events.Jeff Brown2010-06-151-408/+508
| | | | | | | | 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
* Native input dispatch rewrite work in progress.Jeff Brown2010-06-134-7/+757
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* GPS: Support for GPS HAL managing its own schedulingMike Lockwood2010-04-141-7/+31
| | | | | | | Also update to support new position mode API. Change-Id: I00acc094d3e85bc5c0cd431af517064bfa8f2b1a Signed-off-by: Mike Lockwood <lockwood@android.com>
* Add wake lock utility functions for the GPS HAL.Mike Lockwood2010-04-141-1/+17
| | | | | Change-Id: I9071f31badee9628126c91cd4ce55acf41ee186f Signed-off-by: Mike Lockwood <lockwood@android.com>
* Switch from hardware_legacy to new HAL GPS interface.Mike Lockwood2010-04-051-4/+22
| | | | | Change-Id: I19b299fbcbd44d711a64ece98955d095eb9ffa2b Signed-off-by: Mike Lockwood <lockwood@android.com>
* Move files internal to LocationManagerService from framework.jar to services.jarMike Lockwood2010-04-043-0/+534
| | | | | Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Fix alarms with negative or very large wakup times.Jeff Brown2010-03-311-9/+5
| | | | | | | | | | | | | | | | | 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
* less log spewJoe Onorato2010-01-081-1/+0
|
* LightsService cleanup:Mike Lockwood2009-11-271-0/+6
| | | | | | | | | 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>
* Remove HardwareService and move vibrator support to VibratorService.Mike Lockwood2009-11-254-40/+81
| | | | | | | | | 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>
* Add support for specifying the current LCD brightness mode to the backlight ↵Mike Lockwood2009-11-101-2/+3
| | | | | | | | | | 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>
* Remove obsolete hardware auto-brightness support.Mike Lockwood2009-11-031-13/+0
| | | | | Change-Id: Ibd0ef67f887254f26ce19faf0627f8b246ec0a18 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Fix issue #2149145: Safe Mode does not work on Sholes deviceDianne Hackborn2009-09-281-4/+4
| | | | | | | | | | | | | | | 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
* Add automatic lighting control frameworkDan Murphy2009-09-151-0/+13
| | | | | | | | | | | | | | | | | | 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>
* SensorService: call close_data_source when we have no more sensor clients.Mike Lockwood2009-08-301-0/+10
| | | | | Change-Id: I94accda4571c3f2cf6f8a5b6801e37c30c027fe1 Signed-off-by: Mike Lockwood <lockwood@android.com>
* BatteryService: Add support for new standard battery voltage and temperature ↵Mike Lockwood2009-08-171-20/+88
| | | | | | | | attributes. Plus some cleanup from the previous commit. Signed-off-by: Mike Lockwood <lockwood@android.com>
* BatteryService: Remove hard coded power supply names.Mike Lockwood2009-08-171-18/+69
| | | | | | | Search all subdirectories of /sys/class/power_supply and match on the power supply type instead. Signed-off-by: Mike Lockwood <lockwood@android.com>
* merge from open-source masterJean-Baptiste Queru2009-08-041-1/+1
|\
| * fix method table wrong in com_android_server_HardwareService.cppKenny2009-08-051-1/+1
| |
| * donut snapshotJean-Baptiste Queru2009-07-211-17/+60
| |
| * donut snapshotJean-Baptiste Queru2009-05-201-0/+3
| |
* | EventHub: Add support for excluding devices from being opened by as a keyboard.Mike Lockwood2009-07-161-0/+19
| | | | | | | | | | | | | | 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>
* | Implement virtual button support.Dianne Hackborn2009-07-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | am 270e87f7: Sensors: Use a native_handle for the data channel instead of a ↵Mike Lockwood2009-05-231-17/+60
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | single file descriptor. Merge commit '270e87f71abc2edf446dbec20c725c823e8c7f37' * commit '270e87f71abc2edf446dbec20c725c823e8c7f37': Sensors: Use a native_handle for the data channel instead of a single file descriptor.
| * | Sensors: Use a native_handle for the data channel instead of a single file ↵Mike Lockwood2009-05-231-17/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | checkpoint: split libutils into libutils + libbinderMathias Agopian2009-05-202-4/+4
|/ /
* | If no battery stats are found, return status_unknownRebecca Schultz Zavin2009-05-051-0/+3
|/ | | | | | | | 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>
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-182-5/+99
|
* auto import from //branches/cupcake/...@137197The Android Open Source Project2009-03-098-0/+1039