Revert "use utf8_length() instead of local function, isValidUtf8()"
This reverts commit 1a8b6c2

Reason for revert: utf8_length handles a slightly different range than
the checkjni code, so it's possible for a given string to pass the
utf8_length check, but then fail the jni  check.

Change-Id: I81e15c95edd8f89782d8ad9025e68502b9340f22
AudioService: Restore volumes after boot and when a headset is plugged

The correct volume levels for <device>_speaker and <device>_headset are not
restored after booting and when a headset device is plugged in or out.

This fixes a glitch where the first volume change event causes the volume to
be reset to the last stored value instead of increasing/decreasting it by
one step.

Change-Id: I6a483af34fd6d9dd706c6979202bf0cf26d80854
"[+>" more icon was never shown in PhoneStatusBar

"[+>" more icon was never show in status bar because
the member variable for this icon was not initialized
from resources. This fix enables "[+>" icon to appear
in status bar when the number of indications in status
bar becomes large.

Bug: 8368569
Change-Id: Ieb3412eed831052d69c0cf63c9b4230c38171e4a
Fix NPE when pasting non-text from Clipboard

When copying a link from a bookmark and then pasting it into
a textfield a NullPointerException will occur.
A ClipData.Item is not guaranteed to always contain a text string
and therefore getText() can be set to null.

Using method coerceToText() instead of getText() makes sure that
a text string is always returned.

Change-Id: I81343c0371835a3a7a52045dcd1760e69e59a967
ServiceState: add support for DCHSPAP

Change-Id: Ib0a328652c14580718400b00146b770481be5458
Show reboot message in QS and PW

This forces collapsing notification drawer or quicksettings to see
system reboot dialog.

Change-Id: I74695d78501a3d826a3e4a73bfd9e64e042c9a47
Correct the target app token for input method window

The root cause is:
There is a defect in window manager service: When a new
activity that can be ime target is added into window manager
but the Z order of input method window don't need to be
changed, then the target app token of input method window
would not be updated to new one. This defect may cause that
the layer of input method window is calculated incorrectly.

The solution:
Correct the target app token for input method window.

Change-Id: I008311e3c9b1cf5fc320b614d8675c183c506d50
FW: Swap Stylus pointer with TW dot

Use the stock touchwiz pointer instead of the huge
aosp mouse icon.

Change-Id: I44fc142f13e12ece5572c2513af2d2f390e3c4c8
Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
Force clear cache on 'clear all'

Add long click to 'clear all' button in recents panel to force
clear caches, dentries and inodes

Change-Id: Iaa0ff526707be5b21bf746767f6241f4f0b6c39e
Merge "FW: Swap Stylus pointer with TW dot" into jb4.2
i9300 needs this or it won't build for anyone syncing our sources

Change-Id: I9eda83d83f83b9e7456c281e75522c3794379fd5
Fix: NavRing landscape swipe

this commit fixes and old bug for phones "default landscape navring swipe"
which reacted buggy. Du the already submitted fix/feature to use the whole
navbar as swipe area imo a nice solution at the end.

also it removes the default home longpress action (show navring) to
be consisten to the other buttons.

cheers

Change-Id: I133c2cc5080f44d53213c2ea21638a5c23061bc6
Add Volume Tile [1/2]

Change-Id: I04451d8b4669ae0d4f798010a4c61e5e82990b76
Add Expanded Desktop Tile [1/2]

Change-Id: I2273f8f0bdb726ec34f00a6fb205b1bc6e795cfa
Koush broke my cache!!!

Change-Id: Ia5796146de1b876772ea1ca487f43d3e933862da
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
Merge "Add Volume Tile [1/2]" into jb4.2
Merge "Add Expanded Desktop Tile [1/2]" into jb4.2
Merge "Koush broke my cache!!!" into jb4.2
Power'full' Sleep [1/2]

Change the 'Go to Sleep' button to perform activities
similar to the physical power button. This change
affects both the power widgets and the quick settings.

Change-Id: Ibfe193c505aff01cace25a0dd4544dea7d622ecb