Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -125112,6 +125112,17 @@ visibility="public" > </field> <field name="PHONE_TYPE_CDMA" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="PHONE_TYPE_GSM" type="int" transient="false" telephony/java/android/telephony/CellLocation.java +14 −10 Original line number Diff line number Diff line Loading @@ -26,11 +26,10 @@ import android.provider.Settings; import android.telephony.cdma.CdmaCellLocation; import android.telephony.gsm.GsmCellLocation; import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.RILConstants; import com.android.internal.telephony.Phone; /** * Abstract class that represents the location of the device. Currently the only * subclass is {@link android.telephony.gsm.GsmCellLocation}. {@more} * Abstract class that represents the location of the device. {@more} */ public abstract class CellLocation { Loading Loading @@ -64,11 +63,13 @@ public abstract class CellLocation { public static CellLocation newFromBundle(Bundle bundle) { // TelephonyManager.getDefault().getPhoneType() handles the case when // ITelephony interface is not up yet. int type = TelephonyManager.getDefault().getPhoneType(); if (type == RILConstants.CDMA_PHONE) { switch(TelephonyManager.getDefault().getPhoneType()) { case Phone.PHONE_TYPE_CDMA: return new CdmaCellLocation(bundle); } else { case Phone.PHONE_TYPE_GSM: return new GsmCellLocation(bundle); default: return null; } } Loading @@ -78,17 +79,20 @@ public abstract class CellLocation { public abstract void fillInNotifierBundle(Bundle bundle); /** * Return a new CellLocation object representing an unknown location. * Return a new CellLocation object representing an unknown * location, or null for unknown/none phone radio types. * */ public static CellLocation getEmpty() { // TelephonyManager.getDefault().getPhoneType() handles the case when // ITelephony interface is not up yet. int type = TelephonyManager.getDefault().getPhoneType(); if (type == RILConstants.CDMA_PHONE) { switch(TelephonyManager.getDefault().getPhoneType()) { case Phone.PHONE_TYPE_CDMA: return new CdmaCellLocation(); } else { case Phone.PHONE_TYPE_GSM: return new GsmCellLocation(); default: return null; } } } telephony/java/android/telephony/TelephonyManager.java +7 −21 Original line number Diff line number Diff line Loading @@ -263,22 +263,12 @@ public class TelephonyManager { } } /** * No phone module * */ public static final int PHONE_TYPE_NONE = RILConstants.NO_PHONE; /** * GSM phone */ public static final int PHONE_TYPE_GSM = RILConstants.GSM_PHONE; /** * CDMA phone * @hide */ public static final int PHONE_TYPE_CDMA = RILConstants.CDMA_PHONE; /** No phone radio. */ public static final int PHONE_TYPE_NONE = Phone.PHONE_TYPE_NONE; /** Phone radio is GSM. */ public static final int PHONE_TYPE_GSM = Phone.PHONE_TYPE_GSM; /** Phone radio is CDMA. */ public static final int PHONE_TYPE_CDMA = Phone.PHONE_TYPE_CDMA; /** * Returns a constant indicating the device phone type. Loading @@ -291,11 +281,7 @@ public class TelephonyManager { try{ ITelephony telephony = getITelephony(); if (telephony != null) { if(telephony.getActivePhoneType() == RILConstants.CDMA_PHONE) { return PHONE_TYPE_CDMA; } else { return PHONE_TYPE_GSM; } return telephony.getActivePhoneType(); } else { // This can happen when the ITelephony interface is not up yet. return getPhoneTypeFromProperty(); Loading telephony/java/com/android/internal/telephony/BaseCommands.java +2 −2 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ public abstract class BaseCommands implements CommandsInterface { mRadioTechnologyChangedRegistrants.notifyRegistrants(); } if (mState.isGsm() && !oldState.isOn() && (mPhoneType == RILConstants.CDMA_PHONE)) { if (mState.isGsm() && !oldState.isOn() && (mPhoneType == Phone.PHONE_TYPE_CDMA)) { Log.d(LOG_TAG,"Notifying: radio technology change CDMA OFF to GSM"); mRadioTechnologyChangedRegistrants.notifyRegistrants(); } Loading @@ -686,7 +686,7 @@ public abstract class BaseCommands implements CommandsInterface { mRadioTechnologyChangedRegistrants.notifyRegistrants(); } if (mState.isCdma() && !oldState.isOn() && (mPhoneType == RILConstants.GSM_PHONE)) { if (mState.isCdma() && !oldState.isOn() && (mPhoneType == Phone.PHONE_TYPE_GSM)) { Log.d(LOG_TAG,"Notifying: radio technology change GSM OFF to CDMA"); mRadioTechnologyChangedRegistrants.notifyRegistrants(); } Loading telephony/java/com/android/internal/telephony/CommandsInterface.java +1 −0 Original line number Diff line number Diff line Loading @@ -1256,6 +1256,7 @@ public interface CommandsInterface { /** Set the Phone type created */ void setPhoneType(int phoneType); /** * Query the CDMA roaming preference setting * Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -125112,6 +125112,17 @@ visibility="public" > </field> <field name="PHONE_TYPE_CDMA" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="PHONE_TYPE_GSM" type="int" transient="false"
telephony/java/android/telephony/CellLocation.java +14 −10 Original line number Diff line number Diff line Loading @@ -26,11 +26,10 @@ import android.provider.Settings; import android.telephony.cdma.CdmaCellLocation; import android.telephony.gsm.GsmCellLocation; import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.RILConstants; import com.android.internal.telephony.Phone; /** * Abstract class that represents the location of the device. Currently the only * subclass is {@link android.telephony.gsm.GsmCellLocation}. {@more} * Abstract class that represents the location of the device. {@more} */ public abstract class CellLocation { Loading Loading @@ -64,11 +63,13 @@ public abstract class CellLocation { public static CellLocation newFromBundle(Bundle bundle) { // TelephonyManager.getDefault().getPhoneType() handles the case when // ITelephony interface is not up yet. int type = TelephonyManager.getDefault().getPhoneType(); if (type == RILConstants.CDMA_PHONE) { switch(TelephonyManager.getDefault().getPhoneType()) { case Phone.PHONE_TYPE_CDMA: return new CdmaCellLocation(bundle); } else { case Phone.PHONE_TYPE_GSM: return new GsmCellLocation(bundle); default: return null; } } Loading @@ -78,17 +79,20 @@ public abstract class CellLocation { public abstract void fillInNotifierBundle(Bundle bundle); /** * Return a new CellLocation object representing an unknown location. * Return a new CellLocation object representing an unknown * location, or null for unknown/none phone radio types. * */ public static CellLocation getEmpty() { // TelephonyManager.getDefault().getPhoneType() handles the case when // ITelephony interface is not up yet. int type = TelephonyManager.getDefault().getPhoneType(); if (type == RILConstants.CDMA_PHONE) { switch(TelephonyManager.getDefault().getPhoneType()) { case Phone.PHONE_TYPE_CDMA: return new CdmaCellLocation(); } else { case Phone.PHONE_TYPE_GSM: return new GsmCellLocation(); default: return null; } } }
telephony/java/android/telephony/TelephonyManager.java +7 −21 Original line number Diff line number Diff line Loading @@ -263,22 +263,12 @@ public class TelephonyManager { } } /** * No phone module * */ public static final int PHONE_TYPE_NONE = RILConstants.NO_PHONE; /** * GSM phone */ public static final int PHONE_TYPE_GSM = RILConstants.GSM_PHONE; /** * CDMA phone * @hide */ public static final int PHONE_TYPE_CDMA = RILConstants.CDMA_PHONE; /** No phone radio. */ public static final int PHONE_TYPE_NONE = Phone.PHONE_TYPE_NONE; /** Phone radio is GSM. */ public static final int PHONE_TYPE_GSM = Phone.PHONE_TYPE_GSM; /** Phone radio is CDMA. */ public static final int PHONE_TYPE_CDMA = Phone.PHONE_TYPE_CDMA; /** * Returns a constant indicating the device phone type. Loading @@ -291,11 +281,7 @@ public class TelephonyManager { try{ ITelephony telephony = getITelephony(); if (telephony != null) { if(telephony.getActivePhoneType() == RILConstants.CDMA_PHONE) { return PHONE_TYPE_CDMA; } else { return PHONE_TYPE_GSM; } return telephony.getActivePhoneType(); } else { // This can happen when the ITelephony interface is not up yet. return getPhoneTypeFromProperty(); Loading
telephony/java/com/android/internal/telephony/BaseCommands.java +2 −2 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ public abstract class BaseCommands implements CommandsInterface { mRadioTechnologyChangedRegistrants.notifyRegistrants(); } if (mState.isGsm() && !oldState.isOn() && (mPhoneType == RILConstants.CDMA_PHONE)) { if (mState.isGsm() && !oldState.isOn() && (mPhoneType == Phone.PHONE_TYPE_CDMA)) { Log.d(LOG_TAG,"Notifying: radio technology change CDMA OFF to GSM"); mRadioTechnologyChangedRegistrants.notifyRegistrants(); } Loading @@ -686,7 +686,7 @@ public abstract class BaseCommands implements CommandsInterface { mRadioTechnologyChangedRegistrants.notifyRegistrants(); } if (mState.isCdma() && !oldState.isOn() && (mPhoneType == RILConstants.GSM_PHONE)) { if (mState.isCdma() && !oldState.isOn() && (mPhoneType == Phone.PHONE_TYPE_GSM)) { Log.d(LOG_TAG,"Notifying: radio technology change GSM OFF to CDMA"); mRadioTechnologyChangedRegistrants.notifyRegistrants(); } Loading
telephony/java/com/android/internal/telephony/CommandsInterface.java +1 −0 Original line number Diff line number Diff line Loading @@ -1256,6 +1256,7 @@ public interface CommandsInterface { /** Set the Phone type created */ void setPhoneType(int phoneType); /** * Query the CDMA roaming preference setting * Loading