PackageManager: Let system-defined permissions take precedence over settings

If a permission was already present in the device's settings due to having
no prior system definition, and the system tried to take it over
(after a version upgrade, for example), it'd fail, since the saved
value would clobber the one previously read from the permissions XML.

This breaks system-behavior changes (gid grants, in particular) unless
the user performs a factory reset after upgrading, which isn't acceptable.

Change-Id: If2e44110f6db735ad29cdf1086e814bd1299e290
SystemUI: don't crash when user disable default apps

If the user has disabled the default clock or calendar application,
System UI will crash when the user clicks the Clock or Calendar
from the notification bar. This patch fixes the issue.

Change-Id: Icdc3679cdd35b5b3a24086e1ada67d0defabc5cb
Audio: Fix abnormal keytone playback during silent mode changing

Change-Id: Icfc4003c9756b3c33578c137e59dc4a2b4f25647
Author: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Ertao Zhao <ertaox.zhao@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: 19084 4898
Merge "PackageManager: Let system-defined permissions take precedence over settings" into cm-10.2
Fix active display.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Change-Id: I7f287deeae4801c6491f69985b667ad3fa2c2d54
Active display: Add sunlight mode…
…[1/2] [log]

Change-Id: I541e74c5a1a7e6ce5028ab00cf998bba1d4fe0f9
Delay hiding systemui by 100ms
When disabling the keyguard, the systemui visibility is
changed and can occur after we hide it so delaying this
a bit resolves that issue.

Change-Id: Iad432f75195983837d643fa38495e6beb54f3e22
Merge "SystemUI: don't crash when user disable default apps" into cm-10.2
Active display: turn off display if device gets pocketed again

Change-Id: Icb4c002add915b75de7607f71c0d400e323feb5b
merge changes from CyanogenMod 10.2 into local branch

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Change-Id: I30b20b0067550e990aa0fc98417f6a5374613415