SystemUI: Remove the dark pixel artifacts from the back arrow drawable

The arrow had some mostly transparent pixels that made it look
kind of like the device had defective pixels. Found by Cyril Mottier.

Change-Id: Ia78453868ebe7e3291d01c96b9beafc78ea3cdcc

Conflicts:
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_land.png
Grant qcom_oncrpc group to system_server

 * Needed for RPC-based QC GPS

Change-Id: Idebc5f6f8e7f8c136d931d7638338d3611895d8a

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java
gps: Add support for Qualcomm GPS hardware

 * This ABI is changed, but we aren't using the new features in MR1.
 * Add a little translation for the changed fields and methods.

Change-Id: Ieecc2235b42f64fc69d4651855f4e9edfe7d738d
Squashed commit of GPS changes from CodeAurora

GpsLocationProvider: ipv6 support

AGPS calls to accept ipv6 addresses

Change-Id: If9187b8fd9e0ba22cd01722d5c04aabccebad38b

GPS Provider changes

Added support to delete aiding data test feature.
Added more data catagories, to now at the total of 21

Change-Id: Icb15d21b8204323021c47eac5249cde128e38246

GPS provider - AGPS Dual APN support

To support either SUPL or any WWAN connection - allow connction
type at open request API; FW's support to dual AGPS connections

Change-Id: Iecb07f31a99353f75c1a0c000bb6e39ef007f6bf

Supporting IPv4v6 and IPv6 bearer types for ATL

Change-Id: Ife8c72d9975ac58b9e4091cb95ad5a9763e01c3f

gps: determine ip protocol type from telephony.db

Instead of determining the ip protocol type from the
type of ip address we have, the ip protocol type is
looked up in telephony.db based on the carrier and apn.

Change-Id: Ib0d76354515fb44f570668d5a4a42cccfa6fe78a
CRs-Fixed: 376537

gps: get apn when supl is already active

When supl is already active, get the apn and bearer and
try to connect, instead of reporting failure.
CRs-fixed: 401408

Change-Id: I2eed11e0a34a55d1b62d37f0a6c97b1f3f2fecae

gps: allow xta data over default mobile connection

If the default mobile data connection is up and
connected, use that connection to download xta data.

Change-Id: Ic5ff5422ac9baf83ac923faeb1f8b4fc9186c184
CRs-fixed: 399721

GpsLocationProvider: Support type wifi in i/F request.

Add support in GpsLocationProvider for wifi type for
i/F request.

Change-Id: I44463e72857c06ae24626b8f3cd482ddac7c278b

Conflicts:

	services/java/com/android/server/location/GpsLocationProvider.java

gps: adding net_raw gid for IPC permission

for AFW to have permission to call loc api

Change-Id: Ifc7451659431fa1c1998f5d75bfa5f2018a5d054

gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab

gps: return dummy apn instead of null

This change was missed during merge, which
can cause exception(crash) if apn is returned
as null.

Change-Id: I15160c8f2f512cc75bbe1b7b7ef4695c201112d8

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java
GPS fixes

 * Add gps user to ZygoteInit so QC drivers can set up their sockets.
 * Fix JNI method signature of reportAGpsStatus

Change-Id: I6686ee715ff2db72edbcf4e4daad2feb1670090a

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java
Revert GPS changes for now until issues are resolved.

Will do a refactoring to better isolate this code.

Revert "GPS fixes"

This reverts commit 84c6741f03118168aa61f2e028efae2ea4953a9f.

Revert "Squashed commit of GPS changes from CodeAurora"

This reverts commit 669786140ea7579dcbe05eb2d5199ebf161239a1.

Change-Id: Ib1a55d1be8dbc933c690b2f06af206ab5511903c
policy: always use hardware acceleration for keyguard

Without hardware acceleration, keyguard widget will appear aliased
and choppy (especially at the end of the scroll).

Change-Id: I1bfb6fbcba6306edf366e8ea752d6919936c3ab6
frameworks/base: vectorize Bitmap operations

Enable gcc vectorizing optimizations for Bitmap operations within
libandroid_runtime.so.  Adds -ftree-vectorize -mvectorize-with-neon-quad
-fprefetch-loop-arrays to functions and compiles Bitmap.cpp in ARM mode
(necessary to enable vectorizing optimizations) for appropriate targets.

Change-Id: I12defef6f47adf41af849df6e750097f5906d92d

Conflicts:
	core/jni/Android.mk
core/jni/android/graphics: Cache copy of pre-scaled Bitmaps

Caching some pre-scaled Bitmap objects allows for optimizing later
scaling operations to reduce memory pressure.

CRs-fixed: 451681

Change-Id: Id4341e75911074ff9f565b2d386ccad8f3a223e8
ServiceState: add support for DCHSPAP

Change-Id: Ib0a328652c14580718400b00146b770481be5458
Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Change-Id: I49a7f2fb99dc8b9560e7c17421125356e45a87ac
Add keymapping for select BT headsets

Per CYAN-522, select BT headsets (e.g. Jabra Street, Jabra BT3030, etc)
send key 159 for fast-forward button, instead of the expected key 208.

Need's testing with affected BT devices.

Change-Id: I06ba689f77dd1058fb82b1de9f72b4df59150cf9
Lockscreen: Fix mdpi layout issues

Before: http://i.imgur.com/gXNUt97.png
After: http://i.imgur.com/ppevA6M.png

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I5bc893f12096d288d04d7cfa442b471002178a3a
FlingTracker can divide by zero and hang StatusBar in an infinite loop

if 2 events have the same timestamp then FlingTracker in PanelView will divide
by zero causing NaNs. the bug is usually triggered by rapid StatusBar up/down
dragging activity and updateCarrierLabelVisibility can then loop indefinitely
looking at NaNs. the user visible symptom is that StatusBar refuses to pull
down and is burning cpu time.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I0791c6bea953bf03346185fc6aaf44aaea79aace
Remove opaque check in GLRenderer when preparing dirty region.

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage to be present from the previous process in the color buffer.

CRs-Fixed: 391492, 403067, 405916

Change-Id: I1f72a3dee2f5d58a984f4cd367c9f7bf08ab9d6a

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

[PATCH] Remove opaque check in preparing dirty region

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new rocess. This prevents
garbage to be present from the previous process in the color buffer.

(cherry picked from commit 2b5e584e2615852b68a69bb529c6926190246b64)

Change-Id: I92a4fa35e0746f12fcd736e21fd30d9c4b644a8a
CRs-Fixed: 391492, 403067, 405916

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

Enable scissor when preparing dirty rect that is opaque

Now enabling scissor before setting it in the opaque case, previously was not doing so.

Change-Id: I1ea904cf01603096e423556090564291ab712d36
CRs-Fixed: 465346
Depends-on: 278453
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
Add UsbDebuggingManager and UsbDebuggingActivity to LegacyUsbManager

The UsbDebuggingManager listens to adbd requests and displays a dialog
when the public key authentification fails, for the user to confirm if it
wants to allow USB debugging from the attached host. If the user chooses
to always allow USB debugging, the UsbDebuggingManager writes the public
key to adbd's config file so that the public key authenfication succeeds
next time.

Change-Id: I819b8a0428ba34b68dadeb9fa67c53abb9a85fbc
wifi: Fix StringIndexOutOfBoundsException for incorrectly encoded SSIDs

If the last character of a SSID is a unescaped backslash then WifiSsid
convertToBytes() will throw a StringIndexOutOfBoundsException and takes the
whole ROM down.

The issue was reported by andreip in the HTC One X XDA thread. His SSID was
set to "/ Andrew \".

04-10 21:33:54.265 E/AndroidRuntime(10479): *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiStateMachine
04-10 21:33:54.265 E/AndroidRuntime(10479): java.lang.StringIndexOutOfBoundsException: length=10; index=10
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.net.wifi.WifiSsid.convertToBytes(WifiSsid.java:89)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.net.wifi.WifiSsid.createFromAsciiEncoded(WifiSsid.java:54)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.net.wifi.WifiStateMachine.setScanResults(WifiStateMachine.java:1522)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.net.wifi.WifiStateMachine.access$7100(WifiStateMachine.java:103)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.net.wifi.WifiStateMachine$SupplicantStartedState.processMessage(WifiStateMachine.java:2511)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:905)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:760)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.os.Looper.loop(Looper.java:137)
04-10 21:33:54.265 E/AndroidRuntime(10479):     at android.os.HandlerThread.run(HandlerThread.java:60)

Change-Id: I8273decacfffea4e4cae3bb957c925833dab09e2
QwertyKeyListener: Add support for www and .com key

Add support for www and .com key on devices with physical keyboards.
This code is identical to what was present in ICS.

Change-Id: I55e6c248959e0a0657bbd8e3840470ae7adbd8ed
Don't let apps disable the SIM PIN entry screen.

As the user (who controls the app behaviour after all) likely doesn't
see the PIN screen as a lock screen (he likely wants telephony) and the
PIN screen is not shown on a timer-driven basis, it should be treated
specially.

Change-Id: I3572a80d4a515d72e3aa4a6e933e980fa4516c2b