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
Frameworks: recreate navbar and statusbar background only when needed

means only on theme changes

Change-Id: I36d31e79eeaade29cbad2bfffdc647fd5c846d69
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
Frameworks: add Accessibility events to navbar, pie and navring

for click and longpress actions

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

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

Change-Id: I00ebf30c75aa1b2980c2e41ce1464ee5b63e6f83
Frameworks: seperate core strings, arrays and symbols.xml

into slim seperat files. Ppl will ask my why symbols....just
because it is easier for me when I search something. Always
a mess with our old symbols.xml

Change-Id: I76976ca496b6f097e24f47b428c0273b34ce47cf
Frameworks SytemUI: seperate strings and arrays.xml

Change-Id: I588917efea63d7efa00bd28ec37a1bd03246f037
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
Frameworks: bring navring/pie/navbar vibrate/sound inline with AOSP

currently all 3 features are doing it a bit different. For navigation
AOSP has for normal click:

 short soft vibrate + click sound

for longpress

 no sound but more intensive vibrate

This commit does:
- seperate keyevents haptic and sound from the other actions and call them
- add vibrate and sound to navring
- navbar only vibrate when the action is performing
- do not use custom vibrate on keycodes
- bring all inline with AOSP like described above
- fix a possible NPE on lockcreen

not solveable (do not ask me...google is not always consistent especially
on keyevents) due the change will break other global behaviours:
- menu button always have a click sound even on longpress.
- powermenu always have a second vibrate due of GlobalManager

all other works inline like described

Change-Id: I90fae2393c5c654055014556b0772447313d28b4
Frameworks: add DeviceSupportUtils helper class

adapted partly from cm (thanks) + own modification for our needs.
Currently unused but there will follow a bunch of commits which will
use it next days

Change-Id: Ifc0c1353e1d65ead000d07e2eab2ed7d8eaa1894
Bluetooth: Add trust device feature.

Add set trust feature where the remote device is marked
as a trusted device for subsequent connection.

CRs-fixed: 523135

Change-Id: I9bde4d7dfe07d9d63b58a661ed2413f45501bd7b
Irda: Add Irda System Service

This is not a perfect solution yet, but it does work and should therefore be a starting point.
It needs work to be functional on devices other than the Galaxy S4

* The Irda service is not started by default. It can be enabled via overlay.
* Uses a HAL module to communicate with sysfs

Change-Id: If0c4b2e59144b1f199c44add399a3f528ac11e5b

Conflicts:
	core/java/android/app/ContextImpl.java
	core/res/res/values/symbols.xml
	services/java/com/android/server/SystemServer.java
Merge "Bluetooth: Add trust device feature." into jb4.3
Fix for framework reboot on format of SD card

MountService is not aware of /storage/emulated/legacy path which is
causing the issue on ExternalStorageFormatter service. We are getting
the a list of non-emulated SD cards and format the first one .

Change-Id: Iba1a9f6e40499f7f6fb095a5ee4e711b02bed439
CRs-fixed: 489037
Bluetooth: HID: Add support for Set Idle and Get Idle Commands

This patch provides an interface for application to send Set Idle
and Get Idle commands to remote HID Device. Support for these
two commands was missing from exisitng code, so existing code
design is reused to add support for these two commands.

Change-Id: I548362cc328498920b2dae740f1a76b2cc2d6a67
CRs-Fixed: 522511
Keyguard: Set WIDGET_CATEGORY_KEYGUARD when AppWidgetHostView is created

Allows the default lockscreen widget to inherit the keyguard widget
host category.  Without this, only widgets added through
KeyguardActivityLauncher are assigned the correct
OPTION_APPWIDGET_HOST_CATEGORY.

Change-Id: Ic97818d85ca5f00da0ce43bb36006d66a6935363
Hide new non-standard APIs and permission

These were breaking builds due to the public API modification

Change-Id: I603fcf0601f40fb315086859aa03ef5b7ec39248

Conflicts:
	core/res/AndroidManifest.xml
Wipe and re-create database on downgrade.

Not a very common situation but should fix some errors that could
 arise from flashing an old ROM over a new one, without wiping data.

Change-Id: I27f2a00396761105987830921bb3f8cb339d2171
Framweworks: add filter method for supported phone features

which will be later used for any settings arrays which need to be
filtered out.

Change-Id: Ifc941a8e0834526b1fa95843beee2c6eafe2e120
Translating frameworks core to Russian

Translating also commit I00ebf30c75aa1b2980c2e41ce1464ee5b63e6f83

Removing whitespaces

Strings moved to appropriate files

Translated commit Iba1a9f6e40499f7f6fb095a5ee4e711b02bed439, removed whitespaces

Removed unnecessary line

Change-Id: I479d880702eadc456d3d0e0344a2c25e3b6d3a72