[2/2] frameworks/base: Add Captive Detection toggle

Change-Id: I4b7127780e7c6e106dc8017b9ba3c03816acaa2b

Patchset: 1
https://gerrit.omnirom.org/#/c/5359/
(cherry picked from commit 7d519862618ff8ed5e221a86a3fbc663dd3f888b)
Fix NPE causing a hot reboot when pressing power button

Change-Id: I7331f1abf70d131af8e0c09694f174fffd5fb9ef
(cherry picked from commit 61364ac81ccc4de0b6c9a0fe0c8ecf3c666f8bda)
SUPL early data connection fix

if GPS started before data connection is alive, SUPL will be broken for entire power cycle.

Change-Id: I0486ac5e62a2d4a7da14506e3dd8e78da42f405d
(cherry picked from commit 7035a26c10d89b2a3f7bf88ac549e373c90bb28b)
increase touch sensitivity

Change-Id: I77e6aeca3667808e630dc142a2e561d3ddddef80
(cherry picked from commit 36168f91c71c0288708b7cfec6c46f77819aa8ec)
GlobalActions: Set the initial status of airplane mode toggle

Actually, the initial status of airplane mode toggle is set to false
when the power menu dialog is initialized.
This causes an issue if you set airplane mode and then reboot.
After the reboot, the dialog displays the wrong airplane mode status,
eg. "Airplane mode is not active", and if you toggle that option, a wrong
intent is sent again to put ON the airplane mode, instead of OFF, the
toggle (that is in transition state) will be set disabled.

This commit fixes this issue.

Change-Id: Id30355c1e090355645c437086c79ab59093c27a8
(cherry picked from commit 76af6f809f567a1ad694129235ffc0666e7b956c)

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
Frameworks: Add Fast Charge QS Tile

This includes a file observer to watch the sysfs file change

Change-Id: I74167ec82c62772cb94ee70cc32fd01321d50d45

Patchset: 3
https://gerrit.slimroms.net/#/c/3179/
(cherry picked from commit 2127cd9b7396e4b706e4fe555d3e0f9c5842aa8b)

Conflicts:
	packages/SystemUI/res/values/cr_strings.xml
Speedup kill app timeout delay

(cherry picked from commit ad56faf6558a12d516e896837381f3bf1da4d4ef)
frameworks/base: Fix for the race in Wallpaperservice

Wallpaperservice has a race among message handler of
DO_DETACH and service's onDestroy. In certain cases,
the engine kept track in mActiveEngines is removed by
message handler of DO_DETACH and service's onDestroy
doesn't get a entry in mActivieEngines and isn't able
to invoke detach. This keeps the broadcast receiver,
mReceiver active and is unregistered by the framework
and a corresponding leak is reported.

  Later, the message handler of DO_DETACH continues
and invokes detach on mEngine, which attempts to
unregister mReceiver and framework throws an exception
"Receiver not registered: android.service.wallpaper.
WallpaperService$Engine$1@40874580" and causes the
framework to reboot.

  In case of system_server, WindownManagerPolicy and
android.server.ServerThread contest for access of
shared members, mActiveEngines and mEgine. Fix is to
protect the critical section via synchronized block.

Change-Id: Ice79cb8344fb54bcc6e9f76f4b143daac2608d7b
(cherry picked from commit 971d83136345630417d37747a8c6c84cbca8a8de)