buffer and log changes

Change-Id: If7453844f1aacfd0cf836939ffeb9c4ebdbb7a88
Correctly provide the technology to setup data connection

This commit allows to correctly manage GSM data connection on legacy
RILs and provides a better readable method to get the technology that
will be used to setup data connection.

Change-Id: Ide4e5d193a35d6f02c5320fe8afe9a24659c97d9
DCTracker: HACK Fix eHRPD/LTE data connection.

* UICC controller is suppose to send a event that says uicc updated
  We are experiencing a race condition when UICC is init before the
  radio start which cause the sim is not ready response from radio.
* This forces data when we have cdma voice connection.

Change-Id: Ifccafa148a703a2f9e137733d8450a3a961dca2a
Telephony: DcTracker: Fix CDMA APN Data issues.

Fix CDMA data issue when it can't find an APN match. This fixes cases
CDMA NV or RIUM/SIM doesn't have the information to pass on.
It assumes GSM like mode on CDMA. So fix that and pass on to CDMA
stubbed apn found in android 4.2.

Change-Id: I53a229de353bae34b7180ef3e7253d83d1f9d20c
Telephony: Release on-demand dds request upon dct dispose.

- During 3GPP to 3GPP2 and vice-versa RAT transition DCT may
be disposed by respective phone objects.
- Release all the current dds requests since the messenger between
connectivityService and DCT would get disconnected and both would get
out of sync with respect to DDS requests. ConnectivityService resets
score from corresponding telephonyNetworkFactory and likewise DCT should
also release all the requests.

Change-Id: I26459bb6db3c9d92f706b0e43f3702278099d079
Telephony: Check for network specifier

If client uses older startUsingNetworkFeature() API, it will not set subId in
NetworkCapabilities. So, ConnectivityManager will forward the request to all
the available telephony factories. Process the request only if network specifier
of the request is the same as current TelephonyNetworkFactory's subId.

CRs-Fixed: 750793

Change-Id: Ic3f0a8c6291c3c44832ba1d1dd51743e1d0e76d4
Telephony: Add new api isMmsDataConnectivityPossible.

- New api for apps preemptive active.

Change-Id: Ic1c06ff2038d5500afc156aa5c0fbd79878f9a25
Fix LTE data call issue with OMH SIM cards.

Do not use OMH profiles for data call on 3GPP RATs.
Reduce the APN retry delay for APN_CHANGED and NW_TYPE_CHANGED
reasons.

Change-Id: I596a4585352a323338d2f05809cf26eb9c7b9edc
CRs-Fixed: 763912
Fix for correct subscription in Cell Broadcast message

Issue: When CB message sent over SUB2, it displays as SUB1 in UI
Fix: Update the subscription ID as per CB message in Parcel

Change-Id: Iff4f2f52c95dbf557b953d8579c70e5c404ca7af
CRs-Fixed: 625204
Fix mms pdp activation issue

RefCount on apncontext will be decremented even though
it is not set if there is a release request while doing
PS attach on a sub. With negative refCount value, the
next pdp activation on same apncontext will be ignored.

Change-Id: If01d182f5072140be842add13784d7d51078687a
Telephony: Refactor of DdsScheduler to allow dual-data in DSDA mode

- Allow defaultDds related non-default networkRequests in
  psAttachReservedState for DSDA config.
- Do the transition from DdsReservedState to psAttachReservedState
  for on-demand non-default networkRequests only in DSDA config.
- Move out of psAttachReservedState to DdsReservedState if all the
  networkRequests related to on-demand subscription are released.
- Dont cache the max-data instead always query modemStackController
  to get latest value.
- Log ALLOCATION and FREE event in defaultState if not handled in
  current state.
- Let DctController init DdsScheduler.

Change-Id: I10a86744629487c15ffb7d7c01d308b448233224
Telephony: Disable manual network selection in Global modes

For multimode targets disable manual network selection
and force automatic mode network selection
in Global and Global+LTE modes.
Global Pre-FIT Test Cases: 5.6.4, 5.6.5, 5.6.8

Display error message for network search in Cdma

CRs-Fixed: 301939, 302354, 290268
Change-Id: I2a9528d1b5eeb9e7f22aeecaafb42bc8b6ed01e1
(cherry picked from commit e6a8214f0526f783f5a1ba9ebbf8b777b974ac43)
(cherry picked from commit 4f2a1c0113f6f4701f904a31ccc58ca0bd0d1a3e)
(cherry picked from commit d88c225acaf8de84e84a56f0778b59802c81c0ea)
Correct max len when build ANR data

The numberToCalledPartyBCD function has considered the TON/TPI byte,
So the Max length should add TON/TPI byte, Or else the max additional
number will delete last two numbers. Please refer to 3GPP TS 31.102

CRs-Fixed: 739292

Change-Id: Ic469cff4d6b83cfcda96a77f7a70ca542a198350
Telephony: Allow ruim to fetch in CDMA LTE mode

... if device has LTE in NV mode.
Fixes cases where iccid could be unknown on some CDMA NV devices.

Conflicts:
	src/java/com/android/internal/telephony/uicc/IccCardProxy.java

Change-Id: Ie8e676a59e20c6da70eded511a979022667aa6fa
Send external state again after updating siminfo table

Send external SIM state again after record is updated
in siminfo table.

Change-Id: Ia8f13880aa3c75ec4f729d89162dbf01eae02481
CRs-Fixed: 747191
telephony: Add ESN tracker

1. Add ESN (Electronic Serial Number) tracker;
2. Add overlay key to control ESN tracker.

Change-Id: Ib92cec7cc71ee2542dae58992af11f9231523a57
Revert "UiccController: Query GET_SIM_STATUS when radio state is ON"

This reverts commit 66e677b944fb22ebec7e90eaeb2171d3268c11ad.

Change-Id: Ia2e3c34910b6d763222b9d064957ac2bff975afb
When Radio is ON update subInfoRecord

Register for radio on to update subInfoRecords in case to handle case
Icc Availability event comes before radio is on.

Change-Id: I7419559edb114e630e23bd1e0c037eee619a3c33
CRs-Fixed: 758818
Add null check before accessing mContext

When APM enabled SIM powering down and all the SIMRecords
are disposed, during this time accessing the null set mContext
leading to NPE.

To avoid this added null check.

Change-Id: Id2ee14faee764b9f9d124a65736dec8ab8eb788e
CRs-Fixed: 754013
Fix issue that displays wrong SIM capatity in Mms settings.

"EVENT_GET_SMS_RECORD_SIZE_DONE" value is same as "EVENT_APP_LOCKED"
 which is defined in SIMRecords.java, it will make code confusion.

Change the value for "EVENT_GET_SMS_RECORD_SIZE_DONE"
 to resolve the confusion.

Change-Id: I349381bb52c34ebae2655f54049acc613bcc9b0d
CRs-Fixed: 755175