Telephony: STK CC feature implementation

Add strings and constants required for stk cc feature.

Change-Id: Id5ec987cdc8dc2d9eebdf01fe546eb96ec0c69f9
(cherry picked from commit 0647546916683963ba5191b4d013bd6ff3c7483d)
(cherry picked from commit 17e39ecff8e0ab7590308e78a0b2cfcf728693d5)
Telephony: Handle DATA_CALL_LIST in DCC.

- Added async handling of NetStatPoll.

Change-Id: Ic77bb949ffb72fb3c54bacc6ad2a6ee87e877023
Telephony: Update TD-SCDMA Network Type String

- Updating the string used to identify TD-SCDMA network type
  to be consistent with the ServiceState string.

Change-Id: I5aee8728ee80dc199f37414aba9019523082862c
CRs-Fixed: 564062
Telephony: Ignore the timingAdvance field in SignalStrength

Ignore the timingAdvance field since the frameworks is not
utilizing this field.

Change-Id: I8644f20aa1918514da88db5a8bc7394263d61e30
Telephony: Do not display the data icon if data is not connected.

When updating the status bar for the bluetooth reverse tether
connected status, even if the mobile data state is in
disconnected state, and it shows the data icon based on the
data network type.
Changes made to check the mobile data connected condition while
updating the data icon.

Change-Id: Iabd6269cc23c1e0ebd5fc140fc14c9ec67883148
CRs-Fixed: 356684
Lockscreen: Add chinese string for airplane mode

There is no chinese string resource for lockscreen_airplane_mode_on.

Define the chinese string for airplane mode.

CRs-Fixed: 561393

Change-Id: I59d2fd42f8b3140a934614a4977dc7ade0332c6d
Keyguard: PIN lock input views flash when SIM status ready

When airplane mode is turned off and DSDS mode is on, cat service
will request RIL to update the SIM card status. When the broadcast
of SIM ready status is received, keyguardview will be reset. So the
PIN lock input view will flash and bring bad user experience.

As there is nothing to update by resetting keyguardview while SIM
is ready. So dismiss the ready status of SIM card.

CRs-Fixed: 537172

Change-Id: I510e8f1e2f08cb946fe47f02b015ae5bf89d5025
Contacts: add the local group info and API

- add the group API for app to get/change group info
- add the group constants for app to acess the group
  database.

Change-Id: I205383ea3983675594f8fe414c466e7e55c6433e
Fix null pointer exception in PhoneWindowManager

mKeyguardDelegate is null and is causing fatal exception

Change-Id: Iae14b969b7ff9ab0003e615f2f82eaac65a77985
Telephony: Modify code to check PUK code length is always 8.

As per 3GPP TS 31.101 Release 11 section 9.6, the number of digits
for UNBLOCK PIN (PUK) is always 8.

CRs-Fixed: 596207

Change-Id: I55dc9f0a701410d8405026e625a5f2a98a9f712c
systemui: Kill logspam

Change-Id: I79ed31c754861625f1294aab9ac62b980d743e8b
Minor cleanups to NetdCallbackReceiver.onEvent.

- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

[Cherry-pick of 59be800e7fe81842aa8c77b91319f58ab165983d]

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
Tethering: Skip link local addresses when enabling NAT

Only one entry is allowed to be added to route table 60 for all
interface ipv6 link local addresses, so skip ipv6 link local
addresses on all interfaces when enabling NAT

Change-Id: Ibbe6c2bdae83586cdd38287089715f3433bbb91f
Signed-off-by: jiaguo <jiaguo@marvell.com>
Fix for positioning of glyphs within a bitmap

For positioning of glyphs within a bitmap, roundf(int + float) is used,
where the float is the glyph position and the int is the text position.
When the text position is varied, this may lead to the sum being rounded
in different directions, due to floating point rounding, caused by that
floating point numbers have different precision in different ranges.

This may therefore lead to slightly different positioning for glyphs and
therefore slightly different widths and heights for text strings,
depending on the position they are rendered at.

The solution in this patch is to use int + (int) roundf(float), which
has consistent rounding, and also enables us to use the full range of
ints.

Change-Id: Id1143cdfcbdfa9915ced878ae04df589a3e03cee
Release locked buffer when it fails to acquire graphics buffer

The JNI buffer in ImageReader_imageSetup is not released when
it fails to acquire graphics buffer. After all JNI buffers are
exhausted, ACQUIRE_MAX_IMAGES will be returned and leads to
error. The JNI buffer should be released when it fails to acquire
graphics buffer.

Change-Id: I3319a58ac44e36c8593b404672a685c4b589a735
Fixed upgrading from forward-lock application to system application

Fixes the case when the app on system is newer than the
currently installed. Something that can happen e.g. after
a FOTA update.

Change-Id: I102e9cdd5693d5e66667c0c8989dc2643c72dd16
Fix graphics corruption caused by HWUI caches

Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>

Fix AOSP build - DO NOT MERGE

Change-Id: I42b420c2ce89ce364a2809b28b827964e6923fa1
SystemUI: Only show H+ if config_hspa_data_distinguishable is set

Currently the UI is not consistent. If config_hspa_data_distinguishable
is not set you get 3G icon on HSPA and H+ icon on HSAPP.

Change-Id: I09db3a2902e30290206eafd1f64c940bab5b89e6
Fix tracking of broadcast reference count

Decrement the mBroadcastrefCount when an element is
deleted from mTriggeredUids list. And in failure case
reset mBroadcastRefCount to 0.

Change-Id: Id002bb7a8439ef93eabe031bf318bd424cefc88b
Bluetooth-OBEX: Reduce the MTU size if default OBEX MTU > 8k

Add a check for default OBEX MTU. If MTU is greater than 8k and
setMTU flag is true then reduce the MTU to 8k.

CRs-Fixed: 613931
Change-Id: I5785fd372241f682427ea3aca0b56ac747820d52