hwui: Add option to enable subpixel font positioning

 * Off by default as there is an issue with metrics calculation.

Change-Id: I39c9d74beeac5f28e4014d54e3c658b0f0fed86e
ActivityThread: Avoid creating duplicate handlers and reuse mH

sMainThreadHandler is used for notification of changes in
SharedPreferences and refers to a new instance of Handler instead
of the existing instance, mH, of the ActivityThread. Fix to reuse
existing handlers associated with main looper.

Change-Id: I794a5802a9eacdb188bd0619db5e70e3ae89a07d
VibratorService: Fix to ensure actual delay in a vibrate pattern

delay might timeout early as value of duration isn't updated
correctly in the loop, should the wait be interrupted, to reflect
the elapsed time. Fix is to update duration in the loop.

Change-Id: I525b0e97799b288f46ae3a056cff7dcc69701bb0
Avoid system_server crashing due to mac address is null

It's possible that the mac address is null (getMacAddress() of WifiNative.java).
In this case system_server will crash like:

E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiWatchdogStateMachine
E AndroidRuntime: java.lang.NullPointerException
E AndroidRuntime:        at android.net.arp.ArpPeer.<init>(ArpPeer.java:57)
E AndroidRuntime:        at android.net.wifi.WifiWatchdogStateMachine.doArpTest(WifiWatchdogStateMachine.java:866)

Check the mac address before parsing to avoid crashing.

Change-Id: I5d4205c04d479a3a2837172c6382816ea4bf74d6
WifiStateMachine: ignore auth-fail event during WPS connection

Disregard auth failure events during WPS connection. The EAP sequence is
retried several times, and there might be failures (especially for wps pin).
We will get a WPS_XXX event at the end of the sequence anyway.

Without this change, the SupplicantStateTracker class will disable
the WPS network we are connecting to after 2 failed authentication events.
Then, even if WPS succeeds, we will never connect to the selected network.

Change-Id: I57c8e508bfd738405b7f2c2c2325df7838e1b4af
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Protecting more views from (bad) MotionEvents

When handling MotionEvents, the method findPointerIndex can return -1
if the current pointer id can't be translated to a pointer index.
Some views are not handling this, which will lead to an out-of-
index crash. In 2585e9b there were checks added, this change adds
some more.

Change-Id: I93ce2420afd83a06b689a1ed35ead7d170cd68f1
Fixes relative time formatting issue for dates in future

All variations of getRelativeTimeSpanString() now properly handle dates
that are in the future. Prior, the version used by
getRelativeDateTimeString() would occasionally show the time instead of
a date when the future date was the same weekday as the current weekday.
This resulted in the time output being duplicated, eg.: "11:23, 11:23"

Change-Id: If20972a6942cce792fa233437f94dedfb71379f3
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
Make setCaptureRate locale safe

Dont use the default String.format in setCaptureRate as it is both
locale unsafe and less efficient than regular string concatenation
in this case.

Change-Id: I29418ec0352ef8c79967592b6eb8ff66cc9c99f0
Make addAddress locale safe

Using regular string concatenation to avoid unexpected
results in some locales.

Change-Id: I47dd5e174c4a2e88dc18e014002820cdbf63fcad
Default WiFi sleep policy setting

Creates a defult.xml setting for WiFi sleep policy.

It is now possible, through device overlays, to change
the default sleep policy to e.g. never in order to improve
user experience of WiFi.

Change-Id: Ie459b8e70fdbc7c605452fe0692d7bc26460e939
onSavePassword dialog can leak when WebViewClassic is destroyed.

The AlertDialog creates in onSavePassword method leaks if
WebViewClassic is destroyed when the dialog is shown.

Change-Id: I81f20e1dd138467a6413766c0a081b389b334ae0
Triggering EarlySuspend based on BackLight brightness

EarlySuspend is triggered currently based on just timeout. Due to this,
backlight brightness is not coming down to zero.

Change-Id: If89ec6650308109630dbb7ee1be0b96df4ed3534
CRs-Fixed: 381087

Allowing display turning off animation before Early suspend.

This change passes display turning off information to
animation call so that display off animation can be played
before early suspend call.
Reverted two and three changes in the below list with this patch.
Changes introduced in previous patch were:
1.Send early suspend call after display baclklight off
2.All animations off once display goes to dim.
3.Removed duration to turn off screen as i don't see this in ICS.

Change-Id: Id411fe2c4d4fd219fc198405d6c2f221a87874ff
[webkit] Runtime enablement of WebGL

Hook up debug setting to enable/disable WebGL.

Change-Id: I46790e61471a76eb5a8d8ff552022e12c3782204
net: customize memory cache size

Change-Id: I2b7cc83707a567676550be2639095c5bb28dc6dc
webkit: Multimedia feature port from ICS

- Multi-context HTML5 video support
- Smooth inline to fullscreen video transition
- Support for autoplay, muted, loop, preload attributes
- Support for web pages with more than one audio element
- Support for HTTP live streaming

Change-Id: I82b01295da4663437d5c35eb45d145b243ecc9f1

webkit: HTML5 video user experience and stability fixes

- Fix HTML5 video unable to resume from navigation history
- Fix occasional crash when reloading page from history
- Show last decoded frame of streaming video when buffering
- Fix incorrect fullscreen video position during orientation change
- Replace HTML5VideoView resetted state with released state
- Remove unneeded videoLayerId in HTML5VideoView
- Resume from last played position after video suspend
- Call MediaController::show() during HTML5VideoView play and pause
  to update fullscreen MediaController state

Change-Id: I82f1255225b2ee6cc95f70e40017d562e5e635c6

webkit: Fix black screen shown during webkit exitFullscreen

Notify WebChromeClient to hide custom view during exit fullscreen.

CRs-fixed: 387484

Change-Id: If67cc000991d9fa0696692ce3982e0a04499e343
Revert "Triggering EarlySuspend based on BackLight brightness"

This reverts commit 7993d74083045d7fc10adcecd60db96779311983.
frameworks/base: support devices with SoftAp that don't require firmware reload

Partial forward port from ICS.
Original Change-Id: If2db6e8ce675c3214ce645231c7a354f41ea0cc6

Change-Id: Iacb2498ec0f567a0a7c4e0dbf9127b70f09223bd
services: Fix tethering (softap) startup

The interface must be started after firmware reload. If it's not
started, the driver is unable to configure it.

Change-Id: I18b255caf961d23c0f7d4d29dfef040761536c2e
RIL: make data call APN a selectable RIL feature

Disabling this for all RIL versions above 3 can cause issues with some
device RILs and establishing a data connection.

Change-Id: I7be41b120663b0839beec95c22d0615f5e79c582
Framework: Use holo alert drawables

Replaces the current usage of the GB alert
drawable with theme-consistent holo ones.

Change-Id: Id5780cb7be08d0394bc8a0061fb18a1a9017360d