AudioService: Restore volumes after boot and when a headset is plugged

The correct volume levels for <device>_speaker and <device>_headset are not restored after booting and when a headset device is plugged in or out.

This fixes a glitch where the first volume change event causes the volume to be reset to the last stored value instead of increasing/decreasting it by one step.
Bring back the status bar activity indicators for mobile data and wifi

* adds a setting for this as well as reverting the following commit:

Reverts "Remove signal/wifi activity indicator icon overlays."

This reverts commit fcc901c10bffdfb9c6b31e676dec36b47d949979.

Change-Id: I7aa85f7c8442c45d17e42cac7823dfe93e3f24c1
MediaFocusControl: Do not grant 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 no longer an issue.

PS1: Initial implement
PS2: Better implement in MediaFocusControl
PS3: Whitespace

Change-Id: Ie10a64e58ce77174a3bbdeaa936646d40c24404f
Signed-off-by: Evan Anderson <evan1124@gmail.com>

Conflicts:
	media/java/android/media/MediaFocusControl.java
Fix for screenshot animation glitch in protrait.

Edit suggested by users Suxsem and AbhishekS on XDA.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6
Improve screenshot animation glitch fix.

New patchset by Stefano Semeraro aka Suxsem.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
MediaFocusControl: Fix audio focus logic

This fixes commit 007e15d5d.

Should have been checking for when the notification stream is 0, not non-zero.

Change-Id: Idde589064082875d13a342445bb2b9de6b41e872
Signed-off-by: Evan Anderson <evan1124@gmail.com>
Frameworks: BootMessage: Squashed Commits:

BootMessage: Only display package name during optimization.
The previous implementation caused the package name to show up for
other messages such as "Starting apps." or "Finishing boot.". Now
we check if the base message starts with "Optimizing" and only
display the package name if that is true.

BootMessage: Show even more info in boot dialog
Originally the boot message was: Optimizing app N of M
In http://gerrit.aicp-rom.com/#/c/1779/ this was changed to show only the package name
This change shows both of those messages on 2 lines.

Change-Id: I346129124b1167fa3b5ca9d12b617ed045b58a2f
Protected App [1/3]
 PackageManager:
   Add support for Protected App Components
   Adding protect flag to ApplicationInfo

 SettingsProvider:
   New DB entry for protected app components

Change-Id: If04843e93b572191d4654c01f4da8f087ba9fba8

Conflicts:
	core/java/android/app/ApplicationPackageManager.java
	core/java/android/content/pm/IPackageManager.aidl
	core/java/android/content/pm/PackageManager.java
	test-runner/src/android/test/mock/MockPackageManager.java
Fix compile time error with Protected Apps

Change-Id: Ib53178b4ca3e9a32d523ad003816230d758925b4
Add the appropriate @hide flag so we can build!

Change-Id: Id45f682287741badb13e256f6029c52820a068bd
GEL Integration (1/3)

Changed INJECT_EVENTS permission from signature to signatureOrSystem.

Change-Id: Ie3633aa2ee7a2f22b7f32232ce4d3d98f33fd39d
Unbreak compilation

Change-Id: I68a91efdcfeeda90a2418c5b4eeb310e7e42c878