Option to use volume keys to control media volume anytime (2/2)

See Settings part for description
Fix wrong typo (remove else if valid only in cm)
Audio continue to played even if paused manually

Currently, audio will resume playing after a phone call
or notification even if the user had manually paused playback.

This patch addresses that by introducing a new player state
to distinguish the user pausing playback and the browser
losing audio focus for some other reason. Audio will only
resume if the browser temporarily lost audio focus and
not when the user has manually paused playback.

Signed-off-by: Roger Chen <cxr514033970@gmail.com>
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.

Signed-off-by: maxwen <max.weninger@gmail.com>

Conflicts:
	media/java/android/media/AudioService.java

Change-Id: Icc516196644f7c5a223171508a048186cd80e342
Fix code alignment

Conflicts:
	media/java/android/media/AudioService.java

Change-Id: I8e0aeb4e0625f08822860123e0e4f1b02dd381b3