Source:
public static int getPhoneType ( int networkMode ) { switch ( networkMode ) { case com.android.internal.telephony.RILConstants.NETWORK_MODE_CDMA : case com.android.internal.telephony.RILConstants.NETWORK_MODE_CDMA_NO_EVDO : case com.android.internal.telephony.RILConstants.NETWORK_MODE_EVDO_NO_CDMA : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_WCDMA_PREF : case com.android.internal.telephony.RILConstants.NETWORK_MODE_GSM_ONLY : case com.android.internal.telephony.RILConstants.NETWORK_MODE_WCDMA_ONLY : case com.android.internal.telephony.RILConstants.NETWORK_MODE_GSM_UMTS : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_GSM_WCDMA : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_WCDMA : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_GLOBAL : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_CDMA_EVDO : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_ONLY : if ( ( android.telephony.TelephonyManager.getLteOnCdmaModeStatic ( ) ) == ( com.android.internal.telephony.PhoneConstants.LTE_ON_CDMA_TRUE ) ) { return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; } else { return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; } default : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; } }

Target:
public static int getPhoneType ( int networkMode ) { switch ( networkMode ) { case com.android.internal.telephony.RILConstants.NETWORK_MODE_CDMA : case com.android.internal.telephony.RILConstants.NETWORK_MODE_CDMA_NO_EVDO : case com.android.internal.telephony.RILConstants.NETWORK_MODE_EVDO_NO_CDMA : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_WCDMA_PREF : case com.android.internal.telephony.RILConstants.NETWORK_MODE_GSM_ONLY : case com.android.internal.telephony.RILConstants.NETWORK_MODE_WCDMA_ONLY : case com.android.internal.telephony.RILConstants.NETWORK_MODE_GSM_UMTS : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_GSM_WCDMA : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_WCDMA : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_GLOBAL : case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_CDMA_EVDO : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; case com.android.internal.telephony.RILConstants.NETWORK_MODE_LTE_ONLY : if ( ( android.telephony.TelephonyManager.getLteOnCdmaModeStatic ( ) ) == ( com.android.internal.telephony.PhoneConstants.LTE_ON_CDMA_TRUE ) ) { return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA ; } else { return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; } default : return com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM ; } }