Fix no data issue after system server crash

FW was checking "Radio Available" instead of "Radio On" when
broadcasting data availability. This was causing an issue in
a certain recovery case (system server restart/phone process
restart) where "Radio (modem) is available" but radio was
turned off.

This patch obsolete the use of mRadioAvailable attribute and
use RadioState from RIL directly to check if Radio is ON.

Bug:5077346
Change-Id: Ie7ac05e3d5e328e3d5303541ca41326754f309c1
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index be129d5..acc307c 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -122,7 +122,6 @@
     static final Uri PREFERAPN_URI = Uri.parse("content://telephony/carriers/preferapn");
     static final String APN_ID = "apn_id";
     private boolean canSetPreferApn = false;
-    private boolean mRadioAvailable = false;
 
     @Override
     protected void onActionIntentReconnectAlarm(Intent intent) {
@@ -1571,7 +1570,7 @@
     private void onRecordsLoaded() {
         if (DBG) log("onRecordsLoaded: createAllApnList");
         createAllApnList();
-        if (mRadioAvailable) {
+        if (mPhone.mCM.getRadioState().isOn()) {
             if (DBG) log("onRecordsLoaded: notifying data availability");
             notifyDataAvailability(Phone.REASON_SIM_LOADED);
         }
@@ -1703,7 +1702,6 @@
     @Override
     protected void onRadioAvailable() {
         if (DBG) log("onRadioAvailable");
-        mRadioAvailable = true;
         if (mPhone.getSimulatedRadioControl() != null) {
             // Assume data is connected on the simulator
             // FIXME  this can be improved
@@ -1731,7 +1729,6 @@
             dc.resetRetryCount();
         }
         mReregisterOnReconnectFailure = false;
-        mRadioAvailable = false;
 
         if (mPhone.getSimulatedRadioControl() != null) {
             // Assume data is connected on the simulator