Frameworks: Lazy dev part 2 + small fixes (1/2)

this is based on the last lazy dev commit from me with the same
reasons, this time navbar and statusbar white color did no stick because
of not used long var to save.

Best on that....I realized later that I am not allone a lazy dev. Aosp
does count -1 automatic as white lmao

whatever changed default valus to -2 and cleaned 4 lines up

cheers

Change-Id: Ie6cb0c80d6b1aff1fdb4c257a658e73506ade4df

Conflicts:

	core/java/android/provider/Settings.java
Add PhoneWindowManager checks to NavBar KillTask runnable

This addresses the issue where binding NavBar kill app can cause a system crash by killing inappropriate system processes.

Change-Id: I48f4c9b48131ffc9d7efe6f4f58bcaecc0fea304

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
Fix Navring shows up on all buttons

Change-Id: I008b9e29628ada3ea728ce12233a50915c77c76b
Frameworks: Change navbar general behaviour (1/2)

This commit changes that navbar is present on all devices even
with hardware keys. On hardware key devices the navbar height is
set to 0 as default now. Several reasons for that.

- no SystemUI restart when de/activating (last one we had :p)
- our navbar is very resource friendly so even no problem for the
  low end devices
- we can now use some of the navbar stuff you will see in next commits
  navbar magic :p

This commit also respects the different handling off menu's. Thats
why a part of the code (hasNavigationBar()) will be still left because
it is needed in main for

core/java/android/view/ViewConfiguration.java
core/java/android/view/IWindowManager.aidl
core/java/android/view/WindowManagerPolicy.java

this files which are controling that.

Settings commit:
- additional cleanup of no needed imports

cheers

Change-Id: I7838a7f25744de965c35097880abd760347244dd
Frameworks: Fix recent show from navbar sometimes weird things

cheers

Change-Id: Ib7069be558a3e3ff0c058bb636a09726760863f6
Fix: Recents animation bug navbar

cheers

Change-Id: I0e0b16c37f0f21060d1ec4b0ee6b990bad0c5b4b

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
Framework: Fix recents animation bug for all

Sometimes doing some other stuff bring ideas up to solve
problems. Google uses a dirty preload animation hack to
animate recents right....we can do the same just more
generalized.....due that all places (hw keys, navbar, SlimPie
and navring) are calling toggleRecents() I implemented the fix
now there to solve it in general. Due of that this commit
reverts commit 20a905c.
as well

cheers

Change-Id: I48aaa85881d8b177c7223a746bd39925f6826066
Fix: external storage problem NavBar applications

If the user binds an app which is located on the
external sdcard and is rebooting the button icon
will be left blank because the navbar is already
constructed before the sdcard is mounted. To avoid
this we listen to the app available intents.
If it is not available it shows the
none graphics. When available it shows the
correct app icon. So that the user can clearly see
this app is accessable or not. As well when the
user goes into mass storage mode or does
unmount the sdcard or whatever case could
happen that the application is not there.

+ a small optimize

cheers

Change-Id: Ic6a691d8b3af9ddb3e6008d64e6ab35cbabc12fb

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
Fix: external storage problem NavRing applications

If the user binds an app which is located on the
external sdcard and is rebooting the button icon
will be left blank because the navring is already
constructed before the sdcard is mounted. To avoid
this we listen to the app available intents.
If it is not available the ring target shows the none icon.
 When available it shows the
correct app icon. So that the user can clearly see
this app is accessable or not. As well when the
user goes into mass storage mode or does
unmount the sdcard or whatever case could
happen that the application is not there.

+ code cleanup who ever did that crap :p

+ to be more consistent to all other features we have an
empty action is now as well shown as an empty action on
the ring

Change-Id: Idce4c28dfc080bd1147fd5b80154d3a50d01141d

Conflicts:
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
Fix: Navring error

introduced with this commit
https://github.com/SlimRoms/frameworks_base/commit/8c8769815c0f1e58657e4e31ef7f7014e45b0831
the placeholders react on touch which ends up in open gnow permanently
disable the placeholders. Sorry for that

as well a small change (even if this case should never happen) to
be 100% sure the listeners are attached before unregistering

cheers

Change-Id: Iab783861020ed03645d60aa7e121edee29688841
NavigationBar : Only inflate once

Thanks Danesh

Since the navbar now has updateResources(), there is no need to reinflate
it upon a theme change.

Change-Id: Ie4753a767a1cb45eb459ee692d16067f83cc7d23
Frameworks: Fix navigation bar recreate on new theme

A bug we have now since ages and never paid much attention on it.
Due our custom navbar the navbar was never recreated right
and only reboot showed the right theme.

On theme change recreate the navigationbar as well

cheers

Change-Id: I376b2765c3b53cb76868c485110fa63a20383053
Frameworks: reduce observer again

thanks Jens for the basic idea

cheers

Change-Id: I5bfae13c30d9454333c1cf4553708ea52014c855

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
Frameworks: reduce navbar observer footprint (1/2)

time for code cleanup projects. Switch to same
logic we already use in QS/NT shortcuts. Use
only one string for the whole navbar config
This reduces massive the observer footprint.

NavRing and SlimPie will follow with same logic

cheers

Change-Id: Ie484bf72ae6e9cefa5cd979bbb279fa8549b8fdf

Conflicts:

	core/java/android/provider/Settings.java
Frameworks: reduce navring observer footprint (1/2)

time for code cleanup projects. Switch to same
logic we already use in QS/NT shortcuts. Use
only one string for the whole navring config
This reduces massive the observer footprint.

This commit should as well the manta navring issue
in landscape

SlimPie will follow with same logic

cheers

Change-Id: I72cec6dce054674faf200864473d140581c68fa7

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:

	core/java/android/provider/Settings.java