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
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
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
Revert "ExternalStorageProvider: use mount point in device list"

This reverts commit 9392f9740895d044f0816205ea8caa3d3acfd3a8.
Media: Make sure mVolumeController is not null

* mVolumeController is throwing NPEs all over the place in this class, which
  causes apps like Chromecast to shit the bed when using Google Play Music
  and/or Google Play Movies
* Catch additional exception on try/catch already in place and throw in a null
  check to prevent apps from crashing until null mVolumeController is rectified

Change-Id: I7a883aa85256d5dc6af6f37978676b136cb40d0d
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
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>