SystemUI: make clock and time clickable in statusbar

Clicking clock opens alarms, clicking the date will open the calendar.

Change-Id: I622527c1f144a8867aa543348b70a4fefe3f6403
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: add Weather display to status bar header

Change-Id: Ic2fea861c36f405d8a0e64cc9224f47088ac6351
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
Recents: Port "Development shortcut" (2/2)

This patch includes the equivalent of our Development Shortcuts in
CM11 recents. Recents is very different now and this is mostly a rewrite.

The semantics changed a bit as well. The current code already has special
developer behavior when long-pressing the app icon and that is also where
the developer shortcuts are hooked. If the app icon is long-pressed and
developer shortcuts are active, a menu will be shown with the several available
options.

Fixes CML-61

Change-Id: I391a360b3dd88e179c2315503d18125f8d0b3792
(cherry picked from commit 552943ca153aec19ab8598f1fe4e419718744e51)

Conflicts:
	packages/SystemUI/res/values/cm_strings.xml
SystemServer: Move sensor init to a new thread.

Move Sensor init to a separate thread so that it doesn't block the
critical booting path.

Initializing Sensors in separate thread has been seen to improve boot
time on customer devices with low-tier / ult chipsets(less cpu cores)

Change-Id: I5c46a5805c04ffe551019b4683523e3bf70274a2
(cherry picked from commit 3e31f300bbc0152ee065725daa79ed937ea91e7c)
Disable config item to support SIM refresh for dual mode card

Set "config_sim_refresh_for_dual_mode_card" to false;
Resetting this config as majority of the targets don't
need it to be set.

Change-Id: I955fead91e4939172a478fba2b79ae11fecda82b
CRs-Fixed: 665741
(cherry picked from commit 99c2a065e3dfe67e5de0bbfe47601d1c2974c450)
Telephony: Add a config item to control fetching APN from OMH card

Change-Id: I5c14a6870ea0767cc14ff3addeeb0828cc704a32
CRs-Fixed: 748148
(cherry picked from commit 41990ea1599382b7edf69fa2de8bea180393fe41)
CamcorderProfile: Add 4k DCI timelapse encoder constant

 4k encoder constant during timelapse is added
 for the 4k timelapse use case.

CRs-Fixed: 642013
Change-Id: I901fa362242477dad84130d23055815cdfee6167
(cherry picked from commit bc68e96f0511753c53046beaeb5c0af4b6d520fc)
security: prevent FDE after PFE

Full-Disk-Encryption (FDE) is not allowed
after Per-File-Encryption (PFE) is activated.

Change-Id: I17e6039f3b33450835fea6ee5e612c079868b71f
(cherry picked from commit 14527e0dba352ec497ea72f14d942c88a5358a27)
QuickBoot: enable poweroff charging under QuickBoot mode

Support poweroff charging by enable/disable qbcharger process under
QuickBoot mode.

Change-Id: I34ee10443564ba3f9ebc7239137958c80e8db6c9
(cherry picked from commit 0de7eca52a141d830d68cfb6acb64adef5f7e57b)
AppOps: Add null pointer check for USERAGENT parameter.

Fix the Java exception which is caused by null pointer issue in
AndroidHttpClient.

Change-Id: If7e36298f94ca164b87e1b0604f49156bdfd4513
(cherry picked from commit 9dfed682a9bb552f6b9657dec0ac03e39fc3ab55)
frameworks/base: No score update to 100 with wqe

When user explicitly selects an AP, the score of this AP will be
set to 100 and this has conflict with wqe. Disable this when wqe
is enabled

Change-Id: I57db8318a4421038d144bc41bd0ff5ae02d9edd3
(cherry picked from commit 18f8d50af1845930585f81acbe40b4036843ce86)
Override updateBlockedUids method

Override updateBlockedUids method in BridgePowermanager

Change-Id: I8533e55a41bf7a1b69a46277798735bf314d2ef3
(cherry picked from commit dfca28ba2124f465bba74adda22f4e4dc1b1edc7)
Avoid overwriting SYSTEM_ADJ with PERSISTENT_PROC_ADJ

If an application running on system_process has a persistent flag,
the oom_adj value for system_process is unexpectedly overwritten
to PERSISTENT_PROC_ADJ (-12).

We must keep SYSTEM_ADJ (-16) for system_process.
This change guards against overwriting SYSTEM_ADJ with
PERSISTENT_PROC_ADJ

Change-Id: I8f334d93b82271f9a0cfbbef34a75af2dacb186b
(cherry picked from commit 4cb165d04c28cef149b07bb460710508411c229a)
Add handling SQLiteDatabaseCorruptException.

When SQLiteDatabaseCorruptException occurred on execute() or executeForString(),
DefaultDatabaseErrorHandler.onCorrupt() is not to be called.
So, Malformed DB file can't be deleted.
Because, Instead SQLiteDatabaseCorruptException, code is throwing SQLiteException.
On boot time, system can't open DB file and it throws RuntimeException.
This causes infinite reset.
So, I modified to throw SQLiteDatabaseCorruptException.

Change-Id: I125b69d62acc4c0690b8dd17d4e14b49be141095
Signed-off-by: muzbit.kim <muzbit.kim@lge.com>
(cherry picked from commit 28fc6d778ea7ac58da319cebf2324ba4ea6b96cf)