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
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>
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>
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>
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 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>
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>
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.
Merge commit '270e87f71abc2edf446dbec20c725c823e8c7f37'
* commit '270e87f71abc2edf446dbec20c725c823e8c7f37':
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>
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>