Camera Tile : Close on flip/switch

Currently the camera tile only checks whether the
container panel is fully expanded. This doesnt take into account
when the user swipes to another panel via handle bar swipe, or by
pressing the switch button in the top right of the drawer.

Reproduction steps :
    Go to quick settings panel
    Enable camera tile
    Switch to notifications via swipe or switch button
    Camera preview stays persistent behind drawer

This patchset also makes the view hierarchy lookups one time, rather than
on each runnable run which is quite frequent (100ms).

Change-Id: Ic803744b63613d1e58b3efd4a92d052a16e5a2bd
Revert "Frameworks: Seperate status bar transparency on lockscreen (1/2)"

This reverts commit 06fc68f8629b9fcd6fd2f29961b5e838d6e50af2.

Conflicts:

	core/java/android/provider/Settings.java
Frameworks: remove always transparency mode navbar/statusbar 2/2

problem is that the transparency on most app totally break due
that a lot apps do not draw behind navbar and statusbar. Nearly
all user never use always mode and just use it on launcher
and lockcreen. So let us remove it
as well a bit cleanup

Change-Id: Ia5ee97f99102aa2b3833a33eb93b5e428a80b867

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
Frameworks: rework navbar and statusbar transparency/color handling (1/2)

All current implemented versions of nav and statusbar transparency
which are around are not really perfect and all have downsides. After I saw the
implementation from Romanb (thanks) I got an idea to solve especially
the problem on keyguard without forcing the user to set for keyguard
seperatly a transparency to have a good result. Main problem is that
aosp does not allow to overlay the navbar with a shadow.

This commit does:

- introduce central TransparencyManager (thanks Roman)
- introduce a layerDrawable with a ColorDrawable as overlay and underlay
  to get consistent results on keyguard to show the shadow
- introduce a overlay to animate the navbar shadow like the PIE background shadow
  when the user is not in expanded mode. So the user get the whole screen darken (or colored).
- get complete rid of backgroundalphadrawable class
- allow colorize of theme (theme engine) navbar/status bar background changes
  reset to default shows as usual the theme without manipulation
- expand the custom background area on lockscreen behind the statusbar
  (navbar AOSP does not allow)

- default wallpaper and full transparent mode is now completly consistent and nice
  looking on every possible setting.
- full color lockscreen reflects the color now behind the navbar
  to imitate same behaviour like the default wallpaper on lockscreen. As well
  now consistent and nice looking on every possible setting.
- lockscreen background image mode is the only one where a 100% consistent solution
  is not possible due that the image is always smaller on lockscreen (not expandable behind
  navbar) and I do not see a good way to put in the underlay a partly image in a nice way
  ...to avoid weird transparency draws the transparency on navbar
  is set to the chosen lockscreen background transparency as long the lockscreen transparency
  is smaller then the navbar/statusbar transparency. Todo: notify in settings the user about
  the behaviour change so that it is no surprise.
- add multiuser compatibility to serveral vars
- margin fix on lockscreen
- hide statusbar on lockscreen on expanded or autohide statusbar mode
- add option to unlink colorizing on apps
- optimizing and a memory leak fix
- cleanup

Change-Id: I22ccfc5d3fff58b266848b2e0983435094ba6847

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Frameworks: recreate navbar and statusbar background only when needed means only on theme changes

Change-Id: I36d31e79eeaade29cbad2bfffdc647fd5c846d69

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
Sleep tile auto colapse for fix, for now, new transparency mode.
- This workaround is for status bar stick transparency in lockscreen

Change-Id: If673fbfff1c1024f1af97a7fc3d1b378a6968833
Merge branch 'cm-10.2' of git://github.com/CyanogenMod/android_frameworks_base into cm-10.2