Verify apnContext is not null before it gets dereferenced

If this is still null a NPE will be thrown when it is dereferenced later on

Change-Id: I71ec478eb32425ca4242ee1eb366756648935350
DcTracker: verify preferred apn list is not empty before enabling

If a non-null but empty cursor is returned mCanSetPreferApn will be
set to true even though the preferred apn list is empty. Verify the
cursor contains at least one apn before setting mCanSetPreferApn.

Change-Id: I6a66ab334d997d8ced06ea0b596ba3463f4ce85b
Fix for data and roaming icons

- Enable data connected flag based on the data state.

- Do not display data icon in data connected state
if radio type is unknown

- Display data icon independent of voice service state
i.e even if voice network is unavailable

- Show cdma roaming indicators if either voice
or data is roaming.

- Cleanup roaming indicator default values.
Set default CDMA Eri index to roaming off

- Show service if either voice/data is in
service if ro.config.combined_signal is true

- Consider eri only when in service

- Add in service check to isCdmaEri.
roaming related information
in registration state will not be valid
during out of service.

Change-Id: I915421a6f5906d80ed5b8dd9c433115ad5df1f14
CRs-Fixed: 285986, 303275, 326204, 326634, 333008, 339297
(cherry picked from commit 5e973bedadf36b08a1e2a82745d912fcfdebb020)
(cherry picked from commit fd4dcb2c518eef3e655136cbd69c94b5a3fffb1b)
(cherry picked from commit c5b8a284415d65bad41915b3e50fed853d5f5110)
Merge "DcTracker: verify preferred apn list is not empty before enabling" into android-4.4
add MotoWrigley3GRIL
fix MotoWrigley3GRIL

Conflicts:
	src/java/com/android/internal/telephony/RIL.java

Conflicts:

	src/java/com/android/internal/telephony/RIL.java
telephony: do only run setCellInfoListRate for RIL version >= 8
old libraries like those from MR0 don't support this and sending this command causes endless wakelocks

Change-Id: Ia47d366f70841eb9910079e105add407f58e7555
telephony: do only run getImsRegistrationState for RIL version >= 8
old libraries like those from MR0 don't support this and sending this command causes endless wakelocks

Change-Id: If54e3a38ff1beece179615303218740000b6654b
SlugZero patch
Handle DATA_CALL_LIST in DCC and update dataActivity properly

Update mActivity in DCC before notifyDataActivity. Without this change,
the notifyDataActivity was notifying incorrect data activity status
due to race condition between DCT when mActivity was updated and
DCC thread where notifyDataActivity was called.

Change-Id: Iffb7bf369062264dd773338c732bc69318d90b73
Bug: 11596853
(cherry picked from commit f74c31dfe3c9db4cb8e81be014aaac2537c23f51)
fix compile
Merge remote-tracking branch 'omni/android-4.4' into omni-4.4