Keyguard: do not allow to delete the system widget if widgets are disabled

We overwrite the default widget with our own one. In this case it is detected
as a normal widget even though it widgets are disabled and starts listening to
longpress events

Whatever check if widgets are disabled. If this is the case do not allow any
longpress events

Change-Id: I471664bac6ca1f8e57efe4904a385904c40486db
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: I6b21d18346fed5accc72141097939c92ee9aaa3c
Keyguard: let the user drag the challenge down if widgets are disabled

for the system clock widget this does not make much sense
but since our system default is cLock it makes sense to
allow it to see more content.

Change-Id: I0365573c6fa88117a47b01ced81eb36f75324342
FLAG_PRIVILEGED disappears if privileged app is updated and rebooted

Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.

Bug: 12640283

Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
Set Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE default value

To be able to customize the "WiFi scan always available"
setting we need to set a default value.

Change-Id: I3673f2613ab9b6a947aed7e29d4cc876140c2180

Conflicts:

	packages/SettingsProvider/res/values/defaults.xml
Only send storage intents after boot complete

It is not possible to send a broadcast before the system
boot is completed. If you do it anyway you will get an
IllegalStateException: Cannot broadcast before boot completed.

If a memory card is inserted or removed while the phone is
booting up, there is a risk that the MountService will try to
broadcast a storage intent too early, and cause the device
to crash.

Use FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to avoid
problems with too early broadcasts.

Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
Revert "Port Lockscreen See through feature (1/2)"

This reverts commit f0086373c4040a2e22ba2393fdaabee87e9caaf5.
Lockscreen Blur (1/2)

Credit to aospa
Revert "Cursor leakage due to cancellation signal"

This reverts commit 4a13a28db99f4c685b9f9c822ab1e0382e2097be.
Revert "CompoundButton: Let text can be changed by config"

This reverts commit 8143b266ff7e26d6e2a2ebced228d300bc9f53d4.
Increase available volume levels

Increase media volume levels from 15 to 30 to have more precise
volume control instead of having only 15 levels from 0-100%

For example, when listening to music it is often the case that one
volume level is too quiet and the next one higher is too loud (especially with Headsets).

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I7a8750c901967ce3c818fb9c33b082af6b86b8d6
AppOpsService: Optimize persistent xml file structure

Optimize persistent xml file to follow in-memory structure and this
reduces duplication of uid tag in the xml when multiple packages
belong to the same uid.

Change-Id: I1f2d67f404ce7fdf29ebc4003ab9ebf4964c6eb5
Update expandable volume panel icon

These match the new kitkat style Settings icon used everywhere else

Change-Id: I5429e0838bb73a07e93b5ea417bff2c06c745a71
MediaFocusControl: Deny audio focus if notification stream is 0

Previously audio focus would be granted regardless of notification
volume, meaning that if notifications are muted the media stream would
still be dimished for focus. By checking if STREAM_NOTIFICATION is 0 and
if a notification stream is requesting focus, this is no longer an issue.

Change-Id: Ie10a64e58ce77174a3bbdeaa936646d40c24404f
Signed-off-by: Evan Anderson <evan1124@gmail.com>
Keyguard: don't refresh ui when screen off

KeyguardStatusView is doing refresh all the time,
which cause high power when screen off.

Change-Id: Ifabdde4419a23e919cd52fe77e78ec3160575af1