SimUnlockScreen: Explicitly register themeChange receiver

The unlock activity changed a bit in ICS, so we need to register the
receiver explicitly instead of relying on onResume() to be called in
order to set it up

Change-Id: I9ac9463f249b37466f8daf99d34b85c15b06d43f
SystemUI: Move statusbar container object

The original ICS themeing code had the statusbar container (to rebuild
the views when switching themes) in the SystemUI service itself, since
it was the only common point between the phone and tablet bars.

JB introduced a BaseStatusBar class from which both layout types
derive, so move the container (and its initialization) there.

Additionally, explicitly make the phone statusbar view grab the input
focus when the window is expanded, to avoid missing the BACK keyevent
that makes it collapse.

Change-Id: I949bbf2087620406b1a2c91cf2ef8e91cf97bf32
GlobalActions: Fix dialog dismissal

The themeability of the global actions dialog introduced by
change I644e2e8d7d4abf07bae639b606197d691f16adac broke the
hook that prevented multiple instances of that dialog, and
multiple instances of it will cause framework crashes due to
mismatches variable references (besides looking weird).

Fix it by restoring the original dismissal condition and forcing
a recreation of the theme context if necessary.

Change-Id: Ic6e06bef18fa9e09c84c774fa273f1b7e3bf9630
SystemUI: Fix navigation bar recreation when applying theme

JB window policy forbids attaching more than one view of
type NAVIGATION_BAR without recreating the entire window.

So instead of detach/recreate/attach the view when applying a theme,
simply avoid touching it during the process, and reposition it
once the reinflated bar is back in place.

Change-Id: I79e9f7da6852c1892f859271ad57561884edc7d2
frameworks/base: Remove CM headset/speaker volume restore code

- Jelly Bean already has this built in for the media volume stream, but it's
broken by having our own code in there as well.
Other audio streams will no longer have their volume levels restored, and only
media volume will be subjected to the 'safe headset volume restore' cap.

- Cleaned up the 'link notification with ringtone volume' code.

Change-Id: I06e1d159a66e2d6c09c6128c4c946d9578ea90cd
SystemUI: Allow nav bar background to be themed

Change-Id: I53a1030547e431fe978a02353161cca76361281e
Framework: Use holo alert drawable

Also remove the icon in the shutdown menu to match AOSP ICS
and later.

Change-Id: I9881c3940ba7bfc236fdec40bc98380d0dd7ccf8
AudioManager: Mute on KEYCODE_VOLUME_MUTE

Calls to AudioManager added in KeyguardViewBase and PhoneWindowManager
as well. Toggles mute state by changing the ringer mode.

Change-Id: I7178d3eb7bc62cfc872eb12b3e8d39e4c0a5bf35
AccountUnlockScreen: Explicitly register themeChange receiver

Make sure that we explicitly register the receiver and don't attempt to
unregister otherwise.

Replicated from commit : f7ca5108412b92bd16f9ef58dc6031f20d6371f5

To reproduce crash :

- Use a secure lockscreen
- Do failed attempts till timeout
- Click account unlock, then cycle screen power

Change-Id: Idbfb7969b657086e31600ee2cb52b9d1f42bf70a
Lockscreen : Update camera availability check

Make the default availability of the target dependant on the
availability of a camera rather than the presense of a predefined resource.

Also update .Camera to .CameraLauncher since that is what we default too.

Change-Id: Ib3f06cc76fb7f7df20ec632051d5dbe754a9c69e
Lockscreen: make lockscreen weather time more friendly

Change-Id: Iad8882ba250c788744f1fc17130bf509fbc571c4
Frameworks Base: Use public constant for SYSTEM_PROFILES_ENABLED

Use the public Settings.System.SYSTEM_PROFILES_ENABLED instead of private definition.

Change-Id: I571dd69f26a05f903779578da01c69addb2284f2
GlobalActions: make silent mode the last toggle

if multi user support is enabled, silent mode toggle is above
the user list, but it should be the last.

Change-Id: I7d6146c740827c856e3c8d39d349534dfbfee12d
Feature request 5852: Option to toggle items in shutdown menu (2/2)

This allows for the selective switching of the various CM additions on the
power menu.  Reboot and Profiles are enabled by default, Screenshot is
disabled.

This is the completion of the feature that was merged while still partially
complete

Change-Id: I397ac32509d30ffc1cf18263d8a000cb6f9ccdd1

Conflicts:

	core/java/android/provider/Settings.java