Telephony: Implementation for IWLAN.

Introduce new RAT as IWLAN.
- Allow registration polling in airplane mode.
- Allow non-default PDP activation for iwlan RAT.

Implementation of iwlan and wwan coexistence.
- A new callback event for unsol oem hook response to indicate
  if cellular and iwlan RAT co-exists.
- If co-existence is possible then allow default PDP activation
  along with other PDPs.

Change-Id: Icc6f8111ec3c86ec06e8facd5a5b60b4d5e08e78
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index 40b7e06..abbb7b8 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -430,6 +430,7 @@
             networkTypeStr = "iden";
             break;
         case TelephonyManager.NETWORK_TYPE_LTE:
+        case TelephonyManager.NETWORK_TYPE_IWLAN:
             networkTypeStr = "lte";
             break;
         case TelephonyManager.NETWORK_TYPE_EHRPD:
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 559a58c..cdecb33 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -148,7 +148,11 @@
     public static final int RIL_RADIO_TECHNOLOGY_GSM = 16;
     /** @hide */
     public static final int RIL_RADIO_TECHNOLOGY_TD_SCDMA = 17;
-
+    /**
+     * IWLAN
+     * @hide
+     */
+    public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18;
     /**
      * Available registration states for GSM, UMTS and CDMA.
      */
@@ -697,6 +701,9 @@
             case RIL_RADIO_TECHNOLOGY_GSM:
                 rtString = "GSM";
                 break;
+            case RIL_RADIO_TECHNOLOGY_IWLAN:
+                rtString = "IWLAN";
+                break;
             default:
                 rtString = "Unexpected";
                 Rlog.w(LOG_TAG, "Unexpected radioTechnology=" + rt);
@@ -1030,6 +1037,8 @@
             return TelephonyManager.NETWORK_TYPE_HSPAP;
         case ServiceState.RIL_RADIO_TECHNOLOGY_GSM:
             return TelephonyManager.NETWORK_TYPE_GSM;
+        case ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN:
+            return TelephonyManager.NETWORK_TYPE_IWLAN;
         default:
             return TelephonyManager.NETWORK_TYPE_UNKNOWN;
         }
@@ -1080,7 +1089,8 @@
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_HSPAP
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_GSM
-                || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA;
+                || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA
+                || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN;
     }
 
     /** @hide */
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index db0da61..a7350c9 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1213,6 +1213,10 @@
     public static final int NETWORK_TYPE_HSPAP = 15;
     /** Current network is GSM {@hide} */
     public static final int NETWORK_TYPE_GSM = 16;
+     /** Current network is TD_SCDMA {@hide} */
+    public static final int NETWORK_TYPE_TD_SCDMA = 17;
+   /** Current network is IWLAN {@hide} */
+    public static final int NETWORK_TYPE_IWLAN = 18;
 
     /**
      * @return the NETWORK_TYPE_xxxx for current data connection.
@@ -1383,8 +1387,10 @@
             case NETWORK_TYPE_EVDO_B:
             case NETWORK_TYPE_EHRPD:
             case NETWORK_TYPE_HSPAP:
+            case NETWORK_TYPE_TD_SCDMA:
                 return NETWORK_CLASS_3_G;
             case NETWORK_TYPE_LTE:
+            case NETWORK_TYPE_IWLAN:
                 return NETWORK_CLASS_4_G;
             default:
                 return NETWORK_CLASS_UNKNOWN;
@@ -1444,6 +1450,10 @@
                 return "HSPA+";
             case NETWORK_TYPE_GSM:
                 return "GSM";
+            case NETWORK_TYPE_TD_SCDMA:
+                return "TD_SCDMA";
+            case NETWORK_TYPE_IWLAN:
+                return "IWLAN";
             default:
                 return "UNKNOWN";
         }