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
Merge remote-tracking branch 'cyanogen/cm-10.2' into cm-10.2
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
Merge "SystemUI: don't crash when user disable default apps" into cm-10.2
Merge remote-tracking branch 'quarx/cm-10.2' into cm-10.2-defy
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2-defy