BatteryService: fix FC on boot until battery stat is present

updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.

I/SystemServer(  502): Battery Service
E/System  (  502): ******************************************
E/System  (  502): ************ Failure starting core service
E/System  (  502): java.lang.NullPointerException
E/System  (  502): 	at com.android.server.BatteryService$Led.updateLightsLocked(BatteryService.java:735)
E/System  (  502): 	at com.android.server.BatteryService.updateLedPulse(BatteryService.java:709)
E/System  (  502): 	at com.android.server.BatteryService.access$1600(BatteryService.java:86)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.update(BatteryService.java:860)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.observe(BatteryService.java:822)
E/System  (  502): 	at com.android.server.BatteryService.<init>(BatteryService.java:187)
E/System  (  502): 	at com.android.server.ServerThread.initAndLoop(SystemServer.java:328)
E/System  (  502): 	at com.android.server.SystemServer.main(SystemServer.java:1309)
E/System  (  502): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/System  (  502): 	at java.lang.reflect.Method.invoke(Method.java:515)
E/System  (  502): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
E/System  (  502): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/System  (  502): 	at dalvik.system.NativeStart.main(Native Method)

Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f
fb: add ticker entries only if we are not recreating statusbar

if both happens at the same time it will result in an systemUI crash.
Funny that since 2 years where this method exist no one discovered it.
Due to the new theme lightsensor mode we have way more switches so
maybe thats why I got it now

whatever we had already a check but the tick method can be called from
outside as well so just check if we are in the recreation or not and return
if we are in recreation process. Old check is now redundant and can be
removed

Change-Id: I0feeaaa16d14fc631124d155dc18ba346f788796

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Profile: disable triggers when profiles are disabled

Change-Id: Ic25bd90deb1979f2a7f21a5b588e5f1e18834864
Revert "Telephony: Add data rat constant"

See http://review.cyanogenmod.org/#/c/55832/ for reasons.

This reverts commit 60f79613897f74cacceafad7bcd7260fe25bb1e5.

Change-Id: I7eea322dec1cbb3df33e4ee10d4e73fde0c6e934
Keyguard: disable statusbar clock for dashclock, lockclock and desclock

afaik this was an original commit from Danesh and we extended it later.
Whatever thanks to him in this case :)

Change-Id: I67a370b0a76f938fa3e022e8c467f2d6ebca87c0
Keyguard: fix not shown overlay widgets from system

google derp....due that if widgets are disabled current AOSP
code just add the default widget. Then checkAppWidgetConsistency()
detects a widget which was added and the complete method is non op.
Whatever lets handle the whole process over checkAppWidgetConsistency()
on widget disabled it tries to bind the default widget over overlay if
this is without sucess it falls back to the system one.
Safemode falls always to the system one

This fixes as well an issue that the saved default id in LockPatternUtils
is not reseted back to default if all widgets were deleted from the user.
Based on an old patch from danesh. Thanks for the
suggestion

Change-Id: Ic8543e0b5e83114e57942225935870f45deda97e
SystemUI: Add double tap to sleep gesture

Change-Id: I4c54718e8ec8774677d13917b3a7ffa3b4b18cb5

Conflicts:
	core/res/res/values/slim_symbols.xml
Framework: Change stock Clock-Click Actions

Separate into two views and add:
	Date: View Today Calendar
	DateLong: New Event Today
	Clock: View Alarms
	ClockLong: New Alarm

PS2: Catch Missing Intent

Change-Id: I578df64691c0d957cc3923958abae9a0f9d02b88

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
systemUI: fix date and clock layout

in notification drawer after clickable actions change

Change-Id: I5979d5537e5fe3347fe7cd2bdf68786c63dc812d

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
Framework: Fix QuietHours Vibrate

Change-Id: I92ee73ca53c2d68e7a5fe18e630142ab44672f49