RIL: Make RIL subclassable
sensors: Add support for old libsensors HAL

Enable with TARGET_USES_OLD_LIBSENSORS_HAL:=true

Change-Id: Ib430d8305148f337dd111c80be60ddd151ea5926

sensors: Improve support for old libsensors HAL

Some devices (harmony, at least) claim to support the nuSensors
SENSORS_HARDWARE_POLL, which was breaking the compatibility
check. This removes that check from runtime and makes it
exclusively a compile-time option..

Change-Id: Ide4262e5dec296d96aa896d676a06985fe09aef1

sensors: Fix sensorId/sensorType logic in back-compat layer

As it was, the code was only working on devices where the ID matched
the the sensorType. This isn't necessarily true on every device (and
definititely isn't on some)

Change-Id: I70a5d827c5a6406b5edacc334705edb43e6f5638

sensors: Simplify the data translation in the back-compat hook

Since the sensor data comes in a union, we don't need to do a copy
for every possible entry, we just need one per type. This cuts us
down from 6 data copies on every poll to just 2.

Change-Id: I755f3018ad38be1b7fa04528143507204b4df605

sensors: More compatibility fixes

Some of the old HAL "magic values" aren't magic anymore, so discard
them instead of trying to react like the pre-2.3 implementation.

This had the potential of causing infinite loops on some libsensors (it
was doing it on yamaha's)

Change-Id: Id792faa6a454428040ae2973e386f3a25c904c8e

sensors: Add handle-to-type mapping in back-compat layer

The result of the old API data_poll is an int, which should represent
a handle to the actualy sensor. That handle must be mapped to the sensor
type, which is required by the new API.

I was wrongly assuming the handle and the type were the same, and that
isn't necessarily true; the only reason this was working is because the
java client API appears to be still doing its own handle-to-type mapping
and mostly ignoring the type value set at the native layer

Change-Id: Ibe6209b91cf96aa885a05d6091155ee7ef929211

sensors: Add workaround for Foxconn's broken sensor data

FIH has a tendency to add in-kernel "shortcuts" for stuff that's usually
controlled in userspace, and disabling the screen+backlight on proximity
was one of those. That implementation is, however, buggy, and on top of that
it's colliding with the standard userspace implementation.

This should be corrected at the sensors HAL, but reimplementing that
has been a work-in-progress for quite some time now and still isn't functional.
So, for now, toggle a workaround with TARGET_HAS_FOXCONN_SENSORS, and
convert the data into the kind of values the framework expects.

Change-Id: Ib974af729ce0511668c835b9078831330b874a1f

Add TARGET_SENSORS_NO_OPEN_CHECK for betelgeuse (Folio100) support

sensors.tegra.so on betelgeuse return -22 on both sensors_control_open,
sensors_data_open, but sensors are OK after those two calls.

Change-Id: Iabe14f9ed26ff182041f447cf278408ada62ef81

sensors: Fix ALS and PS lag on back-compat layer

These 2 sensors only report values on change,
instead of continuously generating samples at 'setDelay'
intervals like most others. If only these 2 (or any one of
them is enabled), we can't wait for the usual 64 samples
to be taken before reporting them to the framework, since
that'll make them visibly laggy.

This patch causes any sample from these sensors to trigger
an immediate report to the client.

Change-Id: Id5932376858c30323bff07ac4b38856dc200d074

sensors: Add dummy light sensor for p990/p999

This is necessary for the rest of userspace to recognize its existence
and toggle it for auto-brightness. It doesn't generate actual light
values, though; all backlight adjustments are made in-kernel.

Change-Id: I0e546b4740720bd34d1e1d85a96b295fcc697106

sensors: Allow target to override max range of proximity sensor

If a proximity sensor rarely or never reaches its maxRange, the
device will frequently lock up after the sensor is triggered (by
a call, for example), since it'll get stuck in the "active" state.

Set TARGET_PROXIMITY_SENSOR_LIMIT := <value> with the distance
from which the sensor will turn off to override those cases

Change-Id: I31fa2e5b9bd40ed6d80a1d5b0c147ed265f94c3a

Change-Id: Ib430d8305148f337dd111c80be60ddd151ea5926a
RIL: Support signal strength format from v3 vendor RILs

Enable by setting property ro.telephony.ril.v3=1
Allow a target to specify its own mobile iface name

Fixes lack of traffic indicators when the interface isn't named
"rmnet0"

Change-Id: I68247cd2765cb4fe1bfeb0ec77e0a7a71ed3df44a
[opengl] implement work around for tegra errata 657451

copy the tegra errata work around compile flags from bionic, to
pick up the correct __get_tls implementation

Change-Id: Ifccd4f5f382cc05328222c92da7f621faa1ec507a
surfaceflinger: allow 180 degree hardware rotation

Change-Id: Id6991021701b15f2ce1e5513474238a09d8862bf
RIL: fix pin unlock for old ril

Change-Id: I27eb348233d41618875473ca9bdb93d339c359f9
RIL: handle the lack of version gracefully on older RILs

Change-Id: I8227c55968f502112c5b6ac334eee505c29924c2
Allow compatibility with 'old' Touchscreens (Linux < 3.1)

BOARD_USE_LEGACY_TOUCHSCREEN := true in your BoardConfig.mk

Support the Multitouch, 10-points tested on the qtouch (Defy/Droid)

Remember to add the new idc file required for the touchscreen/keypad
Example: /system/usr/idc/qtouch-touchscreen.idc

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: Ic630fb91342e37ff0f96f7d6367d693d299adcf0
Break the legacy ril shims into specific features. The ICC feature breaks crespo, but crepso needs the signal strength feature.
v3 RIL: Fix getDataCallState and PIN setting

Change-Id: Icf5cee33aeec58cffb23430f0f7b06b9971a71ad
frameworks/base: Add an option to disable hw acceleration via system prop.

Hardware accelerated graphics on devices without updated proprietary files
and/or drivers is causing graphics glitches and reboots. Add the ability
to disable it to alleviate the problems until each device can support it.

Change-Id: I2506d42be6bd5a32fab7380e89817e8b9f7b074b
Merge "Allow compatibility with 'old' Touchscreens (Linux < 3.1)" into ics
Merge "frameworks/base: Add an option to disable hw acceleration via system prop." into ics
Extended Power Menu - Reboot

This commit adds the Reboot option to the device power menu with the sub
options of Reboot/Reboot, Reboot/Recovery and Reboot/Bootloader.

This patch set adds the xhdpi assets and fixes the ldpi image

Change-Id: I8c3a773ba943dc42e8cf3feab32c462d25d3bb06
telephony: Support broken RIL implementations without CALL_RING events

This is probably specific to the LGE star: Extend the call_ring.multiple
configuration to the ringing connection event, since the CALL_RING event
itself doesn't appear. Without this, only the first ring happens.

Enable with ro.telephony.call_ring.absent=true

Change-Id: Idd272583769757c6baa638fd644b5b919cf80fec
Merge "Extended Power Menu - Reboot" into ics
Extended Power Menu - Screenshot

This adds the screenshot option to the device power menu and leverages
the built-in ICS functionality to take the resulting image.

It is dependant on the Extended Power Menu - Reboot commit
v3 RIL: another getDataCallState fix

Change-Id: Ie4e69e231956f46bc1b82550fdf4863c1367efaf
Switch Databases to WAL mode. Set autocommit to 100.

Change-Id: I852f439e2565d1732a55548f1519cbd2c77ebd64

frameworks/base:
Add check for READ ONLY databases (WAL can be used with R/W DBs only).

CRs-Fixed: 278062

Change-Id: Iadcbd868c1ef47e75bbdf5343868e542353ac9f2

frameworks/base: Use WAL mode for selected databases. Others use default mode: DELETE.

Change-Id: I4cb3c87a751f83bf47a73c4652ce1d8bf64a60fd

frameworks/base: Disable fsync in selected databases.

As an add-on to the WAL optimization, disable fsync in databases where
corruption and data consistency aren't a problem.

Change-Id: I41a85fa55ea71dc8dd3c4011102c28d2c1db8d3d