Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Change-Id: If73d225e38d0a2f7c616c4aeb33f67bdaed390f1
Avoid layout passes when updating data activity indicators.

ImageView can optimize out layout passes if old and new drawable have
equal sizes. Take advantage of that by displaying a transparent drawable
with the same size as the in/out drawables when there's no activity
instead of clearing out the drawable in that case.

Change-Id: Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01
Frameworks-base: FR translation

Change-Id: I128c5eda5da211d6f28460253b8f99ff1d372789
[1/2] Base: Fix pimp up ActiveDisplay

This is a fix for the new features added with change: https://gerrit.omnirom.org/#/c/2819/

1. Fix the bug when Pocket mode is set to Notifications only and you
unlock your device with power key and if you put your hands over
proximity sensor the device will turn off (very annoying). The problem
was that mWakedByPocketMode it was put in wrong place.

2. Added an option in active display settings for "turn off display if
device gets pocketed again" (it's annoying for me, because i cover
the proximity very often).

3. Added an option in active display settings for proximity threshold.
I use this active display feature as an replacement for "sweep2wake",
and when my phone it's on the table, i just want to pass my hand over
it to show me the clock or notification (this was ok before the pimp up
commit), and now, you can choose how many seconds for proximity
threshold.

Practicaly, this commit fix one bug, and add settings for the
features added in 'pimp up' commit.

[2/2] part: https://gerrit.omnirom.org/#/c/3381/

Change-Id: I9e49ddb89002699714dcc3b3d2b1df87dc4bab4b
Remove dependency on jniGetNonMovableArrayElements.

jniGetNonMovableArrayElements is not safe and is going to be deleted.

Change-Id: I6daae1e4ac9e01ca593cda522fdbeb774eef1eff
(cherry picked from commit 75a5038849cecf38aba72721272ff07cca09501f)
Merge "Frameworks-base: FR translation" into android-4.4
Quick Settings: remove unneeded casts, update resources when asked

Ported from:
http://review.cyanogenmod.org/#/c/29331
http://review.cyanogenmod.org/#/c/29350

Change-Id: Id00ebdc4e4c5a2a3e7edc21e2e51468d9bc0d59a
Merge "Remove dependency on jniGetNonMovableArrayElements." into android-4.4
Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty.
This often occurs after an incomplete reboot/shutdown or battery pull.

Patchset 2: Cleanup
Patchset 3: More Cleanup
Patchset 4: derp

Change-Id: I4f01151f4051df4ae1b85fa460ec7a9e70122878
Merge "[1/2] Base: Fix pimp up ActiveDisplay" into android-4.4
Merge "Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty. This often occurs after an incomplete reboot/shutdown or battery pull." into android-4.4
Merge "Avoid layout passes when updating data activity indicators." into android-4.4
Merge "Make ImageView drawable update more efficient in some cases." into android-4.4
[2/2] Framework/base: Configure headset hook

Whether or not to allo headset hook to launch voice commands

Useful with headset control programs

PS3: Dont use getIntForUser directly. It breaks
PS5: Whitespce
PS6: Rebase

Change-Id: Ifc24407b87a469a4baadad098895564f7f9aecb8
Port "Option to control cursor in text fields using volume keys (1/2)"

Change-Id: Ib8ab93eb635af8c87df15d72c46312ce7f95546c
[1/2] base: Quick Settings Custom Actions

To Display Quick Settings either by right pull down or expanded view.
Expanded View will Open Quick Settings panel if there are no active notifications

Right Pulldown Author: rmcc
Right Pulldown Ref Commit: https://github.com/temasek/android_frameworks_base/commit/a928acc30ecba3613aadc1478ef49878a73b6742

Expanded View Author : Roman Birg <romanbirg@gmail.com> AOKP
Expanded View Ref Commit: https://github.com/temasek/android_frameworks_base/commit/2eb664a4bc5f93b705eeeaa0847331343bb017cd

Change-Id: Ibbb8213096ff0092bf9b57404888315e1bb8963e
[WIP] Multi-window

This is a big work in progress, which currently has some bugs,
but begins to look okay.

You can already multitask a little bit, by using the
app switcher and long-pressing an icon, then select "Add to
Split View".
Last window touched gets the key focus.

Code is very ugly, I know. Don't merge it, don't use it
for now. Unless you want to make your code ugly.

Enjoy :)

Change-Id: I4a03a84539fd3ac1273f0d3503fe8fafcd16be26
Add a circlular memory indicator to the recent panel view (1/2)

Originally picked from Chameleon OS
http://goo.gl/vgL71x

Modifications:
It allows to be toggled on/off as well as setting a custom location.

Colors are not solid, they have an alpha channel to provide
transparency, this way it doesnt interfer much with the recents
panel view.

Screenshot:
http://goo.gl/Th7g0j

OmniGears Part:
https://gerrit.omnirom.org/#/c/3057/

Change-Id: I07999d476a16d24ddf9c6de441ae646887da8074
SystemUI: temporary workaround for garbeled screenshot preview

The problem shows some underlying issues View.LAYER_TYPE_HARDWARE
so this is NOT a fix. Just since this issue is so obvious visible
it would save us from a lot of bug reports and questions for now :)

Change-Id: If188aa668c1024e857d931ccef4ad3e99edce348
Immersive mode on quick settings based on PA commits

This adds the ability to toggle statusbar / navbar via quicksettings (former expanded desktop), but
using the new 4.4 APIs that allow a swipe-up, swipe-down gesture, to restore bars.

Credits to CM project for the implementation
http://review.cyanogenmod.org/#/c/53468/

Drawables by Arz Bhati

Token from PA

Change-Id: I62f782b7f64c8d320a2364dbff2fdb2dfe617f69

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/custom_strings.xml
	services/java/com/android/server/wm/WindowManagerService.java