Telephony: Null check for adncache before search/update.

Sometimes adncache is uninitialized leading to exceptions.
Add checking against null before using it for searching or updating
records.

Change-Id: I5b6787ce917db921d1ee35753acf890dfaf169b7
get group identifier level1 (Gid1)

To recognize MVNO(Mobile Virtual Network Operator), need some filters,
Service Provider Name(SPN), International Mobile Subscriber ID(IMSI),
and Group Identifier Level1(Gid1).
The GID1 elementary files on the SIM are specified in GSM 11.11 (ETS 300 977)

To get Gid1, implement it.

Bug: 8143480
Change-Id: I44f9d622240a73c42ea6418d2d55e1dae23f3b81
Telephony: Set TP-RD to 1 in case of retry

per TS 23.040 Section 9.2.3.6: In the case where no response or an
RP-ERROR with an appropriate cause value (see 3GPP TS 24.011 [13]) is
received in response to an SMS-SUBMIT, then the MS shall automatically
repeat the SMS-SUBMIT but must use the same TP-MR value
and set the TP-RD bit to 1 (see 9.2.3.25)

Bug:  8323645
Change-Id: I1c7ebc67f80a6eeba456ab0dc5f6331a038d7ab2
Merge "Telephony: Set TP-RD to 1 in case of retry"
Telephony: Fix IntRangeManager

-Fix to populate SmsBroadcastConfigInfo list with all the possible
 range lists upon enable and disable to match previous implementation.
-Fix ClientRange to be ordered by start id, then by end id.
-Fix enableRange to handle missing cases:
 -enable exact same range, i.e. new [x, y], existing [x, y]
 -enable range that is already enclosed in existing range i.e.
  adding [3, 3] to existing range [1,3]
 -enable (startId -1) == range.endId, i.e. new [3, y] existing [1, 2]
-Fix where range.endId is not updated correctly
-Fix disableRange to first update mRange then call updateRange.
-Add more unit test cases.

Bug: 8355035
Change-Id: I83308c76ed28c6f753326aeaac6bec1d88c01b39
Merge "get group identifier level1 (Gid1)"
add columns of Carrier about MVNO

To recognize MVNO, use new fields, MVNO_MATCH_DATA and MVNO_TYPE
(SPN, IMSI, GID(Group Identifier Level 1)).

Bug: 8143480
Change-Id: Idfa06c6f39a2c15ff4f0815724823f44b76ac819
Merge "add columns of Carrier about MVNO"
add MVNO check routine

modify createApnList() API as the followings:

1.1 mvno != null (already matched mvno info)
1.2 mvno == cur_mvno_info
1.2.1 result.add
2.1 mvno == null (not yet)
2.2 mvnoMatch check
2.2.1 clear prev results.
2.2.2 result add (mvno)
2.3 mvno_type is null
2.3.1 result add (normal)

match mvno as the followings:
1. if mvno_type is spn, compare spn of SIM
2. if mvno_type is imsi, compare imsi of SIM
3. if mvno_type is gid, compare gid of SIM

Bug: 8143480
Change-Id: Idf0aa1ddf139f80c7d33b1e3315493d32dbf433a
Merge "add MVNO check routine"
RIL: Correct the RIL_REQUEST_DIAL api missmatch

The uusPresent is written twice in dial() so it will always be
marked as absent.

Change-Id: Id50a4dc8a3eefdaf2284e410382428c52e9b5ef1
Merge "RIL: Correct the RIL_REQUEST_DIAL api missmatch"
Telephony: Return 'null' as per TelephonyManager need

Return 'null' instead of "" (empty string) when Line1AlphaTag,
IccSerialNumber and Msisdn are unavailable.

Bug: 8449375
Change-Id: I5d8052922363f4b3b900bcdea490afe22fedce4f
Telephony: Send complete path for EF-IMG(4F20) for RUIM cards.

When retrieving the EF_IMG from an RUIM the icon load fails
because the path to the EF is incorrectly specified as "img"

Bug: 8443193
Change-Id: I76f981d5334274b34e2e1a752fd0a550458e4e86
Merge "Telephony: Fix IntRangeManager"
Telephony: Delay SIM IO until SIM_READY

When SIM_REFRESH with SIM_INIT is received we need to
reread EFs but only if and when app is ready.

Bug: 8445450
Change-Id: I066a1e6547cfdcba91230f5fbfa8050864327c5d
Merge "Telephony: Delay SIM IO until SIM_READY"
Merge "Telephony: Null check for adncache before search/update."
Merge "Telephony: Send complete path for EF-IMG(4F20) for RUIM cards."
Merge "Telephony: Return 'null' as per TelephonyManager need"