Fix FindBugs issues

IntProperty: Infinite recursive loop
SQLiteSession: Null pointer dereference
UsbStoreActivity: Null pointer derefence
LocationManagerService: No relationship between generic parameter and method argument
ActivityManagerService: Call to equals() comparing different types
ChooseAccountTypeActivity: Possible null pointer dereference
RuimRecords: Possible null pointer derefence

Change-Id: I9d631c50c30eb98e32cca5a5085513b6904db676
Camera: add ISO mode support

Change-Id: Ied2075f950269990d836fc768b2c6c36088d494f
wifi: Set the mode at native layer

 * Set normal/AP mode so that the HAL can specify correct module
   arguments when loading the driver.

Change-Id: I6eee2cc53b5f1e70306e252e52c909833f220515

Conflicts:
	core/jni/android_net_wifi_Wifi.cpp
	wifi/java/android/net/wifi/WifiNative.java
	wifi/java/android/net/wifi/WifiStateMachine.java
CDMA RIL: add SVDO support (1/2)

based on Richard Ross's commit

Change-Id: I313edd3c52d1d0b397ca519757470b87882424d7
services: Fix tethering (softap) startup.

The interface must be started after firmware reload. If it's not
started, the driver is unable to configure it.

Thanks to Emerson Pinter <dev@pinter.com.br> for the jb version of this.

Change-Id: If8819d463d8c3820e2e159cd365f8ba4af8c0064

Conflicts:
	core/res/res/values/config.xml
camera: add power mode support

Based on commit 7036d66bec7697160ba1b2e255f1e7fae0c8c435 from CAF,
branch ics_chocolate.

Change-Id: I8a60668b18980fd5e6f9dd341db5a8a63deb99d0
Process the BTN_MOUSE event

This is required in order to make the trackball on devices that has it to
work properly, like it does before ICS. In addition to this patch, you just
need an .idc file that matches the device name for your the trackball. You can
find it by either looking in a kernel log or a logcat.

For example, a device with a Crucial optical navigation pad, will be called
curcial-oj.idc

The .idc file should contain the following:

cursor.mode = navigation
cursor.orientationAware = 1

Place the file in /system/usr/idc folder.

Enable in BoardConfig.mk with BOARD_USE_LEGACY_TRACKPAD := true

Change-Id: I8684b94871a8bf9070dcda3538a239b111da7f5b
simplify and improve BOARD_USE_LEGACY_TOUCHSCREEN

in addition to converting ABS_MT_TOUCH_MAJOR to ABS_MT_PRESSURE, it also converts ABS_MT_WIDTH_MAJOR to ABS_MT_TOUCH_MAJOR.

also add 2 workarounds for some touchscreen driver which
 1. has BTN_TOUCH feature but it doesn't send BTN_TOUCH event
 2. sends multi-touch event for not-in-use pointer

Change-Id: I0c1c6f9a27c2dbc5e3beddda1a7f297e76c40841
reference: http://source.android.com/tech/input/touch-devices.html
LegacyUSB: Squashed commit with updates for 4.2

LegacyUSB: add overlay for UMS lun and use existence of lun to enable legacy USB

LegacyUSB: Add support for legacy USB implementations

Rebased for ICS 4.0.3

Option to hide Adb notification icon (framework) - authorship belongs to Rick C

Change-Id: Id14f70f7e21b689c08cadef69f69da711c7dc566
Framework: Fix GSM signal strength

Certain OEM gsm ril libs send back a bogus value for LTE signal
that causes SignalStrength.java to default to LTE and report
incorrect signal values.
Use prop value ro.telephony.ril.v3=signalstrength to get proper
GSM signal reading on certain devices.

Change-Id: Ibb23d7b3a2d21001ccbbc6ebfbdc3c5248f18cfc
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>

Conflicts:
	telephony/java/android/telephony/SignalStrength.java
telephony: hide needsOldRilFeature

Change-Id: I741b510fdacc166ad40741bf2e9db5c8a1039384
power: Add CPU boosting interface

 * Boosts CPU using Power HAL for the given duration.
 * Duration is given in microseconds.
 * Power HAL must implement POWER_HINT_CPU_BOOST.

Change-Id: Ic79baf7e3d0f75483c2fe8a242b4c3d93368b68b

Conflicts:
	services/jni/com_android_server_power_PowerManagerService.cpp
Disable touch while using the stylus (Galaxy Note)

Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Change-Id: I9f458d85d8bf83d6cf03b467d46ce066fd55b7e0

Conflicts:
	services/input/InputReader.cpp
	services/input/InputReader.h
input: Add option to toggle pointer icon when using stylus

* The visible pointer icon when hovering or drawing with the stylus is
  quite annoying when trying to actually draw with it. Turn it off by
  default and add an option to turn it on.

Change-Id: Ib7f23e8b69589e3f875d150caf05065b64676e44

Conflicts:
	services/input/InputReader.cpp
	services/input/InputReader.h
	services/jni/com_android_server_input_InputManagerService.cpp
Fix HTC headset handling.

HTC's headset driver adds additional bits to the switch state, which
we're unable to deal with. Fix that by masking out those bits and
keeping only the valid ones.

Change-Id: I29f0de9520ebb56d61acbc9a6dfcfc73e1f297d8
Add config_hasRemovableLid

If a device features a dock with a removable lid, lidOpenRotation
overrides the rotation even if it was undocked (technically the lid is
still open).

This setting tells the framework whether to apply lidOpenRotation to
undocked devices.

Change-Id: I1051278a45875b2139b75db28467f9b8de2936d6

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
GLSurfaceView: add property to default to RGB565

Some legacy devices (like the Xoom) are not capable of handling
RGB888 surfaces, which is now the default. This results in some
OpenGL apps crashing with "No config chosen" errors.

Set ro.opengles.surface.rgb565=true to go back to the old default
of RGB565 surfaces.

Credit to dreamcwli for the original patch.

Change-Id: I5ad9aa8e98eb6fd554b01022439141fe4a55bd70
Wi-Fi: Ping the driver for wifi-only devices

Wifi-only devices are not capable to find APs with hidden SSID unless a DRIVER COUNTRY command
will send to wifi driver. This change has:

- Send DRIVER COUNTRY command to ping the driver (to correct the seek of hiddens SSIDs)
- Save mCountryCode as uppercase because the wifi_countrycode_values array is in uppercase.
  Otherwise the preference will not be found.

Patchset 7: Rebase
            Do not set mCountryCode if country is null

Change-Id: Ie0f838aef07eaf683b713f7f0e46ff3c751523ab

Conflicts:
	wifi/java/android/net/wifi/WifiNative.java
	wifi/java/android/net/wifi/WifiStateMachine.java