Fixed cancel() not working correctly

The method handleMessage(Message msg) from mHandler variable was
not checking if the timer was cancelled, so
sendMessageDelayed(obtainMessage(MSG), delay) was keeping the
timer alive. The patch simply adds a boolean and checks if the
CountDownTimer was cancelled before calling
sendMessageDelayed(obtainMessage(MSG), delay)

bug: https://code.google.com/p/android/issues/detail?id=58668

Change-Id: Ic6bbb9d33a3616f8503db222513cc14ad2270cb8
Signed-off-by: jl1990 <jlcarrasco1990@gmail.com>
Wakelock Blocker [1/2]

Change-Id: Id4fd1d8da6ed40517094a5a156f7c6fea622e985

Conflicts:
	core/java/android/os/IPowerManager.aidl
	services/java/com/android/server/power/PowerManagerService.java
keyguard: fix delay lock screen sound

Change-Id: Ia4cd2c856df1573856386e1597dcc0a9600d25a5
JIRA: CYAN-3362
Issue: https://jira.cyanogenmod.org/browse/CYAN-3362
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
GpsLocationProvider: look for config file in /etc/gps.<ro.hardware.gps>.conf

The property ro.hardware.gps can be specifid to allow a single system
image to work with differrent GPS chips.  The HAL layer will use it to load
/system/lib/hw/gps.<ro.hardware.gps>.so.  Add support to GpsLocationProvider
to use the same property to find /etc/gps.<ro.hardware.gps>.conf, falling
back to /etc/gps.conf if the property is not set or the file is not present.

Change-Id: Ib285c4d28b0d0be5e038a1e61822edd8bc6d97d9
UsbDeviceManager: add support for USB Warning message from driver

From OTG spec, it requires show up warning messages to user when
encounter errors. So this patch implemented the support in
UsbDeviceManager to show up warning message in notification bar.

Change-Id: I45b3b03aa0ab2870c6ede3d3449fcb1cfe2e972a
Author: Zhaoxia Li <zhaoxia.li@intel.com>
Signed-off-by: Zhaoxia Li <zhaoxia.li@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 30607
Check ProcessesReady before broadcast

Most of the time testIsSystemReady is used to know if we are allowed to broadcast intents.
But in broadcast intent method we check mProcessesReady flag (not mSystemReady).
If we broadcast after systemReady flag but before ProcessesReady flag, system will crash

Adding condition to check if system & processes are ready fix that race condition

Change-Id: I17e42bff957164b139f85ee92ace1c5867e7265a
Signed-off-by: Fabien DUVOUX <fabien.duvoux@gmail.com>
Telephony: Initialize GsmCellLocation class members properly

Default values for class members mLac, mCid, mPsc would be 0.
Initialize these variables with -1 as 0 is considered as valid value.

Change-Id: Idb3d1737c7101b97a90eab3dc7436ee1806d0bc4
CRs-Fixed: 406479
fix WakeLock setting

Change-Id: Ic43140614a091c57182a0fb288ecca214687f76d
Merge branch 'kitkat' of https://github.com/TeamHorizon/platform_frameworks_base into kitkat