Fix possible QS NPE if navbar was not set

Change-Id: Id66b3afdc1bdb73f827d7a055f6c2926057f3016
Frameworks: Fix navring keyguard + ehancementes for SlimAction in preperation

to allow SlimPie on lockscreen and the complete rewrite of custom
hardware key rebinding.

- fix for not launching applications from keyguard (was broken on 4.3)
- allow app execute only direct from unsecure lockscreen or if the
user put in the credentials from secure (on 4.2 already the apps/actions always
opened in background)
- do not allow actions which does not make sense on locscreen to execute
  differenciate secure and non secure
- close notification drawer on any action so that the action really shows in forground
- code cleanup
- keyguard integration in SlimActions is now the base to open SlimPie
for lockscreen as well the rewrite of hw key rebinding. So two things
on the TODO list now

cheers

Change-Id: I870d19a06bc1935f4356a1cf45b76b1511a11694

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
Update
Frameworks: better navbar and navring support for ppl without gnow

an installe without google now had some negative effect on our
custom navring/navbar actions

- do not depend on search action on tiny circle lockcreen...check targets available instead
- same for navbar transparency
- fix google typo
- split ontouchlistener for home button and tiny circle due that
it does not make sense to react same like home button if the user
assigned to the home button a custom action

cheers

Change-Id: I8e6a250c3b4ee5f2c17ef48bbe9532511a7737d6

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Frameworks: activate PIE on lockscreen apps

currently the situation was that every application started on
lockscreen had disabled pie (because lockscreen disables it). Downside
on incoming call or camera widget the user did not have a navigation.
As well on unsecure lockscreen the user could not navigate further

this commit fixes this behaviour

Change-Id: Ie1aebdc84d1ce075ebaa09dfffd080f38c652b13
fix possible NPE

mTopFullscreenOpaqueWindowState is on certain conditions null
and will throw an NPE....check for it to prevend it

Change-Id: Ibfb9ad375a9bdfc4e759f55934e759b69c448b49
Frameworks: activate PIE on Lockscreen

completly activate it now if navbar is disabled, expanded desktop or
whatever. The bottom trigger can be used on Lockscreen
if the user want (left and right does not make sense due the wigets.
If navigationbar hints are disabled it show instead
the home button the tinny circle which opens search/gnow. Longpress
action is the same like the one which was bind to the homebutton

slight adjust of default values trigger height and overall size

as well colorize and set alpha  on navbar for the tinny keyguard circle
like the other navbar buttons to be consistent

Change-Id: Ia721d02ae44ef0f9886224414c2932f5c24c0de6
Framworks: clean up trigger code

+ small fix

how to reproduce the bug
activate hide trigger on ime.....open ime...pull down notification drawer
close it again.....pie trigger left and right do not change back again

Change-Id: Ibbc1ba8731046b7214f8019f77491c9d2da776b8
Framewors: do not call every time setupTriggers

if pie is disabled

Change-Id: I89772e0df5676e9c951d59881b87cfff8a857c41
Fix: lockscreen bottom trigger on expanded desktop mode

did not show up in expanded mode before. Only on navigation bar disabled
or 0 values

Change-Id: I8a7215438b7205575bfeea99778c6203da47d82f
another cleanup

why complicated when it is easy. I will stop for today lol
just a small code cleanup

cheers

Change-Id: I3a17555fcc613c1466578758446f62b8aba0561f
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
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/res/values/config.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/BackgroundAlphaColorDrawable.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
Notification long press fix
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/PhoneStatusBar.java
Frameworks: move complete keyevents into SlimActions

still to lazy to doe the HW key rebinding revamp but we need
this move as well for that and it is from codeview much cleaner

This commit does:
- move all key event actions into SlimActions
- get rid off ExtensableKeyViewButton class and handle all over
  the AOSP KeyViewButton class which is now reverted nearly to the aosp
  one with slight modifications for the key handling
- fix the double vibrations on home, back and recents
- fix double sound on menu action on PIE and navbar permanent menu buttons
  due that the click sound is played by PhoneWindow.java for ActionBar events
  we do not play our sound for this action
- cleanup a lot unused imports

Change-Id: I7f1862e0e43654837fce4f4085d1ab9aef0558df

Conflicts:
	core/java/com/android/internal/util/cm/SlimActions.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
Removed left over nav bar classes from CyanogenMod

Change-Id: Iaaa3c8c7efc75bc57c7e12a257066b7092c9b473
Frameworks: add Accessibility events to navbar, pie and navring

for click and longpress actions

Change-Id: Iea536ec43cbad9f2c26e0ab52a89f7d2c700f149
Framewors: add expanded desktop to SlimActions (1/2)

which is then available for PIE, navbar and navring and later
for HW keys

Change-Id: I00ebf30c75aa1b2980c2e41ce1464ee5b63e6f83

This commit also contains some missing changes of acess notification from navigation bar
Frameworks: add power menu to SlimActions (1/2)

like the feature before we can see now how easy the util
class and the dlsv is for us to use....just 8 lines + drawables
and we have a new feature available on all navigations

Change-Id: I88b5d5ded06294824679b0850725f14240c2ef92

Conflicts:
	core/java/com/android/internal/util/cm/ButtonsConstants.java
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java