Fix SkBitmap::fPixels not being locked correctly

In some cases bitmap's pixels where freed during encoding, which
caused a null pointer dereference.
This fix makes sure that underlaying buffer is locked for the whole
process of compression.

Change-Id: I0ac56821f5d333072271dc2670fa30f1562adfa3
Fix for updating TCP buffer size when switching network type

When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Based off of (varible name change): https://android-review.googlesource.com/#/c/41612/

Change-Id: Idf19bca0b2eca218899aba68002d652b65070916
hwui: Reinitialize invalid glyphs if cache is full.

The glyphs become invalid if font cache becomes full. So we need to
reinitialize the invalid glyphs before passing to graphics for drawing.

Change-Id: Ic702fea3d95dcd27510cf604b419fb10cb73dbeb
CRs-fixed: 349176, 360465
SystemUI: Fix RecentsPanel deadlock on rapidly pressing

Make sure mShwoing is false when view is not visible to
avoid deadlock.

CRs-Fixed: 380332
Change-Id: I301e24809765d47a5a2ac729790541030f328d6e
Don't log streaming uri in ChromiumHTTPDataSource. DO NOT MERGE.

o related-to-bug: 6994761

Change-Id: Ic9642edd7b86b4d7543e0f5d397a571976d7e7db

Conflicts:

	media/libstagefright/AwesomePlayer.cpp
	media/libstagefright/httplive/LiveSession.cpp
aapt: Add simple caching to XML compilation

XML compilation stage will perform many (expensive) resource ID
lookups - for the same entries. Adding this simple cache can
dramatically improve performance of this stage (often a bottleneck)

Change-Id: Ib1ab82ba9bf901bc2a3f9027b47d680861d6c315
Signed-off-by: Jorrit Jongma <jorrit@jongma.org>
Telephony: Reset the data registration state on radio off/unavailable

CRs-fixed: 380373
(cherry picked from commit 6716ad9c64467e01b268108909c2ef64430b6b9f)

Change-Id: I0973a583704ab502d7b7b22125bd314ed42703c9
DateUtils: Avoid Time.format() calls when unnecessary.

While preparing the full time/date formats, formatDateRange() function
unnecessarily creates the Day, Month and Year sub-strings by calling
Time.format() separately 3 times.

Ensuring to call Time.format() only once by specifying the full format type
for Full format text and hence skipping the above 3 individual calls.

CRs-fixed: 376187
(cherry picked from commit 37d2f5d76d53df193929d485ffb81818e2814619)

Change-Id: Ieff68f83c6d3cf1a356e464cfbb7ec92a0d940dc
Telephony: Try setup data call when the conditions are met in applyNewState

The data connection failed is not broadcast for the enable APN type
requests when the data is disabled from the settings menu.
Changes to try intiate the data call if the conditions are met whenever
updating the enabled/met flags of the ApnContext to make sure that the
proper data connection state is broadcast.

CRs-Fixed: 371400
(cherry picked from commit 5f6ef98113e1f5fd26720c0c666e30318940e6f9)

Change-Id: I27e4dee95883116c7fd853368662ea104195a5e5
telephony: Handle RIL_APPSTATE_ILLEGAL

Map APPSTATE_ILLEGAL to APPSTATE_READY. APPSTATE_ILLEGAL means
card is valid but the subscription is rejected by network.
All ICC operations must be permitted.
Registration will anyway not happen as network would reject
registration request.

Change-Id: If4994371423d83343171be8b2a339ff79ff52c8e
CRs-Fixed: 380882