Fix system crash introduced by themeable framework

After entering the PIN the system crashed due to trying to unregister a
not registered BroadcastReceiver.

Handported from http://review.cyanogenmod.com/#/c/16010/

Change-Id: Iad1309089208e3a615289dbc23b0f4ef9bbce4e7
add RIL for Samsung devices with Qualcomm radios

currently supports Hercules, Skyrocket and AT&T Note (msm8660)
derived from LGEQualcommUiccRIL

Change-Id: Ib9c8c1d58d29b5e1894e4ffec746ece171a9697b
libhwui: Correct transform used for drawing text-shadow.

The model-view transform used for text-shadow in drawText() should
be in sync with the transform used for main text draw.

CRs-Fixed: 342161

Change-Id: I6bb36691c84809aaede65ad5fc1c4a1e90f1ecfc
(cherry picked from commit d4c8be8416c6c3064e43ed80ebacb2a177be3019)

Conflicts:

	libs/hwui/OpenGLRenderer.cpp
Revert "Select texture target based on pixel format"

Automatic revert was not possible.

Graphics team completed the optimizations for GL_TEXTURE_EXTERNAL,
and this change is no longer required in frameworks.

Change-Id: I8330d19e686b450d3fb6ca2d96c0615f16c0906b
CRs-fixed: 328074, 345078, 344565

Conflicts:

	libs/gui/SurfaceTexture.cpp
HDMIDaemon: Store actionsafe width and height as a system property

(cherry picked from commit 9b6f55560bf5066ea4ba9670d2d009f2b6c36e3b)

Change-Id: I63c213c2f203e63c8047f597e33d06026085c0c8
SurfaceTexture: returning the current transform value

Change-Id: I2975057f47b219ef1ebe73cb8ef85048dc22c784
SurfaceFlinger: Handle WFD and HDMI concurrency.

- changes to handle wifi display and HDMI concurrency
- rename enableHDMIOutput to enableExternalDisplay
- remove action safe related functions(not used anymore)

Change-Id: I15feb1309c2964de3deb968c334eb09e742afb6c

Conflicts:

	services/surfaceflinger/SurfaceFlinger.cpp
	services/surfaceflinger/SurfaceFlinger.h
frameworks/base: fix delay in HDMI update

SF threadloop now checks for dirtyregion and returns
if it is empty. Mark dirtyregion as nonempty so that
threadloop actually executes when required

Change-Id: I00e132433922509468b258c33279c819b3294d73
CRs-fixed: 327432
Browser sets up the min freq while scrolling

CRs-Fixed: 341058

Change-Id: Iee9067113819fe2bfc28740b919f5cd44cc2a5bd

Conflicts:

	core/java/android/webkit/WebViewCore.java
Separate configuration of auto-brightness for button/keyboard backlights.

Presently, light-sensor based automatic brightness
(config_autoBrightnessLevels) controls both button and keyboard backlights
in addition to the screen backlight.  Unfortunately auto-brightness for
button/keyboard backlights doesn't work well on devices (e.g., epicmtd)
with neither (i) dimmable button/keyboard backlights (so when they're on,
they're very bright even if the screen backlight is relatively dark) nor
(ii) identifiable surface features on capacitive buttons (so they can't be
found if the backlights are permanently turned off).

For these devices, the non-auto-brightness behavior of button/keyboard
backlights, whereby they turn on during screen-on events and user activity
and timeout-to-off shortly thereafter, is preferable.  Thus, this commit
adds a config option, config_autoBrightnessButtonKeyboard (defaults to
true), that when disabled allows for automatic brightness control of the
screen backlight, but retains the timeout-based behavior for button and
keyboard backlights.

Also addressed is a bug that disables the button and keyboard backlights on
screen unlock, and reenables the backlights on touch events so that
capacitive keys may be located.
Additional fixes for button/keyboard backlight auto-brightness.

- Use sensor-determined brightness values when the button and/or keyboard
  lights are on, even if button/keyboard auto-brightness is disabled, since
  users may want to specify a custom brightness setting that disables the
  button/keyboard backlight entirely in low-ambient light situations.

- When button/keyboard auto-brightness is disabled, don't update button and
  keyboard brightnesses immediately if ambient light (the sensor) changes,
  as this may reactivate these lights after they've turned off in absense of
  user activity.  This is a particular problem when watching video or other
  circumstances when the lights are not expected to reactivate.
framework/base: Wait for EFS sync to complete

Wait for radio sync to complete before continuing with system
shutdown

CRs-Fixed: 349502
(cherry picked from commit c236978e95bee6957a8636d094d3b703c5cc22df)

Change-Id: I57d078f21d282b6a0ee86c8b9b1ac8bb6af9c1ab

Conflicts:

	core/java/com/android/internal/app/ShutdownThread.java
Fix custom back button icon dissapearing on tablets
Signed-off-by: Mike Wilson <mwilson@acesappraisal.com>

Change-Id: Id89c7338e8245dd7b73e99ea97a420dee93f06e1
auto-brightness corrections

Change-Id: I89809f9bb8a9d15c98bc8de539304dc0fb66e8fa