23 Commits

Author SHA1 Message Date
Jeff Brown
11c5f1a65d 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
2010-03-31 15:38:08 -07:00
Joe Onorato
f5d95cbc1a less log spew 2010-01-08 15:46:24 -05:00
Mike Lockwood
3cb67a37f1 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>
2009-11-27 15:02:11 -05:00
Mike Lockwood
3a32213c40 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>
2009-11-25 12:54:58 -05:00
Mike Lockwood
cc9a63dbc2 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>
2009-11-10 14:58:15 -05:00
Mike Lockwood
f90ffcc639 Remove obsolete hardware auto-brightness support.
Change-Id: Ibd0ef67f887254f26ce19faf0627f8b246ec0a18
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-11-03 11:41:27 -05:00
Dianne Hackborn
6af0d50a8e 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
2009-09-28 13:40:45 -07:00
Dan Murphy
951764b970 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>
2009-09-15 02:29:15 -04:00
Mike Lockwood
2d6b67d37f SensorService: call close_data_source when we have no more sensor clients.
Change-Id: I94accda4571c3f2cf6f8a5b6801e37c30c027fe1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-30 14:25:56 -04:00
Mike Lockwood
f24d13a28f 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>
2009-08-17 19:58:32 -04:00
Mike Lockwood
304928fb7e 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>
2009-08-17 17:20:40 -04:00
Jean-Baptiste Queru
f59af9a387 merge from open-source master 2009-08-04 16:20:52 -07:00
Kenny
19b8d8acc2 fix method table wrong in com_android_server_HardwareService.cpp 2009-08-05 00:30:58 +08:00
Jean-Baptiste Queru
cf4550c319 donut snapshot 2009-07-21 11:16:54 -07:00
Mike Lockwood
1d9dfc5dcf 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>
2009-07-16 11:51:42 -04:00
Dianne Hackborn
e3dd884815 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.
2009-07-14 18:51:53 -07:00
Mike Lockwood
b57d6c9939 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.
2009-05-23 10:36:58 -07:00
Mike Lockwood
270e87f71a 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>
2009-05-23 13:22:08 -04:00
Mathias Agopian
25ba5b6564 checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -07:00
Jean-Baptiste Queru
843ef36f7b donut snapshot 2009-05-20 11:28:04 -07:00
Rebecca Schultz Zavin
e7e6fa3fbf 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>
2009-05-05 16:15:36 -07:00
The Android Open Source Project
105925376f auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:46 -07:00
The Android Open Source Project
b2a3dd88a5 auto import from //branches/cupcake/...@137197 2009-03-09 11:52:12 -07:00