Loading telephony/java/com/android/internal/telephony/SipPhoneNotifier.java +24 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony; import android.net.NetworkProperties; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -94,15 +95,32 @@ public class SipPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnection(Phone sender, String reason) { public void notifyDataConnection(Phone sender, String reason, String apnType) { doNotifyDataConnection(sender, reason, apnType, sender.getDataConnectionState(apnType)); } public void notifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { doNotifyDataConnection(sender, reason, apnType, state); } private void doNotifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { // TODO // use apnType as the key to which connection we're talking about. // pass apnType back up to fetch particular for this one. TelephonyManager telephony = TelephonyManager.getDefault(); NetworkProperties networkProperties = null; if (state == Phone.DataState.CONNECTED) { networkProperties = sender.getNetworkProperties(apnType); } try { mRegistry.notifyDataConnection( convertDataState(sender.getDataConnectionState()), convertDataState(state), sender.isDataConnectivityPossible(), reason, sender.getActiveApn(), sender.getActiveApnTypes(), sender.getInterfaceName(null), apnType, networkProperties, ((telephony!=null) ? telephony.getNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN)); } catch (RemoteException ex) { Loading @@ -110,9 +128,9 @@ public class SipPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnectionFailed(Phone sender, String reason) { public void notifyDataConnectionFailed(Phone sender, String reason, String apnType) { try { mRegistry.notifyDataConnectionFailed(reason); mRegistry.notifyDataConnectionFailed(reason, apnType); } catch (RemoteException ex) { // system process is dead } Loading telephony/java/com/android/internal/telephony/sip/SipConnectionBase.java +0 −2 Original line number Diff line number Diff line Loading @@ -236,11 +236,9 @@ abstract class SipConnectionBase extends Connection { return Connection.PRESENTATION_ALLOWED; } /* @Override public UUSInfo getUUSInfo() { // FIXME: what's this for SIP? return null; } */ } telephony/java/com/android/internal/telephony/sip/SipPhone.java +8 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.telephony.UUSInfo; import java.io.IOException; import java.text.ParseException; Loading Loading @@ -100,6 +99,14 @@ public class SipPhone extends SipPhoneBase { // new Integer(Phone.PHONE_TYPE_GSM).toString()); } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof SipPhone)) return false; SipPhone that = (SipPhone) o; return mProfile.getUriString().equals(that.mProfile.getUriString()); } public String getPhoneName() { return mProfile.getProfileName(); } Loading Loading @@ -165,10 +172,6 @@ public class SipPhone extends SipPhoneBase { } } public Connection dial(String dialString, UUSInfo uusinfo) throws CallStateException { return dial(dialString); } public Connection dial(String dialString) throws CallStateException { synchronized (SipPhone.class) { return dialInternal(dialString); Loading Loading @@ -715,10 +718,6 @@ public class SipPhone extends SipPhoneBase { */ } @Override public UUSInfo getUUSInfo() { return null; } } private static Call.State getCallStateFrom(SipAudioCall sipAudioCall) { Loading telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java +14 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.internal.telephony.sip; import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; import android.net.NetworkProperties; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; Loading Loading @@ -65,7 +66,7 @@ import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.TelephonyProperties; //import com.android.internal.telephony.UUSInfo; import com.android.internal.telephony.UUSInfo; import java.io.IOException; import java.util.ArrayList; Loading Loading @@ -102,13 +103,11 @@ abstract class SipPhoneBase extends PhoneBase { public abstract Call getRingingCall(); /* public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { // ignore UUSInfo return dial(dialString); } */ void migrateFrom(SipPhoneBase from) { migrate(mRingbackRegistrants, from.mRingbackRegistrants); Loading Loading @@ -538,6 +537,18 @@ abstract class SipPhoneBase extends PhoneBase { Log.e(LOG_TAG, "Error! This functionality is not implemented for SIP."); } //@Override public boolean needsOtaServiceProvisioning() { // FIXME: what's this for SIP? return false; } //@Override public NetworkProperties getNetworkProperties(String apnType) { // FIXME: what's this for SIP? return null; } void updatePhoneState() { State oldState = state; Loading telephony/java/com/android/internal/telephony/sip/SipPhoneProxy.java +18 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import com.android.internal.telephony.gsm.NetworkInfo; import com.android.internal.telephony.test.SimulatedRadioControl; import android.content.Context; import android.net.NetworkProperties; import android.os.Handler; import android.os.Message; import android.telephony.CellLocation; Loading Loading @@ -94,6 +95,10 @@ public class SipPhoneProxy implements Phone { return mActivePhone.getDataConnectionState(); } public DataState getDataConnectionState(String apnType) { return mActivePhone.getDataConnectionState(apnType); } public DataActivityState getDataActivityState() { return mActivePhone.getDataActivityState(); } Loading Loading @@ -330,10 +335,6 @@ public class SipPhoneProxy implements Phone { return mActivePhone.dial(dialString); } public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { return mActivePhone.dial(dialString); } public boolean handlePinMmi(String dialString) { return mActivePhone.handlePinMmi(dialString); } Loading Loading @@ -746,4 +747,17 @@ public class SipPhoneProxy implements Phone { public void unsetOnEcbModeExitResponse(Handler h){ mActivePhone.unsetOnEcbModeExitResponse(h); } public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { return mActivePhone.dial(dialString, uusInfo); } public boolean needsOtaServiceProvisioning() { return mActivePhone.needsOtaServiceProvisioning(); } public NetworkProperties getNetworkProperties(String apnType) { return mActivePhone.getNetworkProperties(apnType); } } Loading
telephony/java/com/android/internal/telephony/SipPhoneNotifier.java +24 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.telephony; import android.net.NetworkProperties; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -94,15 +95,32 @@ public class SipPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnection(Phone sender, String reason) { public void notifyDataConnection(Phone sender, String reason, String apnType) { doNotifyDataConnection(sender, reason, apnType, sender.getDataConnectionState(apnType)); } public void notifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { doNotifyDataConnection(sender, reason, apnType, state); } private void doNotifyDataConnection(Phone sender, String reason, String apnType, Phone.DataState state) { // TODO // use apnType as the key to which connection we're talking about. // pass apnType back up to fetch particular for this one. TelephonyManager telephony = TelephonyManager.getDefault(); NetworkProperties networkProperties = null; if (state == Phone.DataState.CONNECTED) { networkProperties = sender.getNetworkProperties(apnType); } try { mRegistry.notifyDataConnection( convertDataState(sender.getDataConnectionState()), convertDataState(state), sender.isDataConnectivityPossible(), reason, sender.getActiveApn(), sender.getActiveApnTypes(), sender.getInterfaceName(null), apnType, networkProperties, ((telephony!=null) ? telephony.getNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN)); } catch (RemoteException ex) { Loading @@ -110,9 +128,9 @@ public class SipPhoneNotifier implements PhoneNotifier { } } public void notifyDataConnectionFailed(Phone sender, String reason) { public void notifyDataConnectionFailed(Phone sender, String reason, String apnType) { try { mRegistry.notifyDataConnectionFailed(reason); mRegistry.notifyDataConnectionFailed(reason, apnType); } catch (RemoteException ex) { // system process is dead } Loading
telephony/java/com/android/internal/telephony/sip/SipConnectionBase.java +0 −2 Original line number Diff line number Diff line Loading @@ -236,11 +236,9 @@ abstract class SipConnectionBase extends Connection { return Connection.PRESENTATION_ALLOWED; } /* @Override public UUSInfo getUUSInfo() { // FIXME: what's this for SIP? return null; } */ }
telephony/java/com/android/internal/telephony/sip/SipPhone.java +8 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.telephony.UUSInfo; import java.io.IOException; import java.text.ParseException; Loading Loading @@ -100,6 +99,14 @@ public class SipPhone extends SipPhoneBase { // new Integer(Phone.PHONE_TYPE_GSM).toString()); } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof SipPhone)) return false; SipPhone that = (SipPhone) o; return mProfile.getUriString().equals(that.mProfile.getUriString()); } public String getPhoneName() { return mProfile.getProfileName(); } Loading Loading @@ -165,10 +172,6 @@ public class SipPhone extends SipPhoneBase { } } public Connection dial(String dialString, UUSInfo uusinfo) throws CallStateException { return dial(dialString); } public Connection dial(String dialString) throws CallStateException { synchronized (SipPhone.class) { return dialInternal(dialString); Loading Loading @@ -715,10 +718,6 @@ public class SipPhone extends SipPhoneBase { */ } @Override public UUSInfo getUUSInfo() { return null; } } private static Call.State getCallStateFrom(SipAudioCall sipAudioCall) { Loading
telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java +14 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.internal.telephony.sip; import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; import android.net.NetworkProperties; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; Loading Loading @@ -65,7 +66,7 @@ import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; import com.android.internal.telephony.TelephonyProperties; //import com.android.internal.telephony.UUSInfo; import com.android.internal.telephony.UUSInfo; import java.io.IOException; import java.util.ArrayList; Loading Loading @@ -102,13 +103,11 @@ abstract class SipPhoneBase extends PhoneBase { public abstract Call getRingingCall(); /* public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { // ignore UUSInfo return dial(dialString); } */ void migrateFrom(SipPhoneBase from) { migrate(mRingbackRegistrants, from.mRingbackRegistrants); Loading Loading @@ -538,6 +537,18 @@ abstract class SipPhoneBase extends PhoneBase { Log.e(LOG_TAG, "Error! This functionality is not implemented for SIP."); } //@Override public boolean needsOtaServiceProvisioning() { // FIXME: what's this for SIP? return false; } //@Override public NetworkProperties getNetworkProperties(String apnType) { // FIXME: what's this for SIP? return null; } void updatePhoneState() { State oldState = state; Loading
telephony/java/com/android/internal/telephony/sip/SipPhoneProxy.java +18 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import com.android.internal.telephony.gsm.NetworkInfo; import com.android.internal.telephony.test.SimulatedRadioControl; import android.content.Context; import android.net.NetworkProperties; import android.os.Handler; import android.os.Message; import android.telephony.CellLocation; Loading Loading @@ -94,6 +95,10 @@ public class SipPhoneProxy implements Phone { return mActivePhone.getDataConnectionState(); } public DataState getDataConnectionState(String apnType) { return mActivePhone.getDataConnectionState(apnType); } public DataActivityState getDataActivityState() { return mActivePhone.getDataActivityState(); } Loading Loading @@ -330,10 +335,6 @@ public class SipPhoneProxy implements Phone { return mActivePhone.dial(dialString); } public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { return mActivePhone.dial(dialString); } public boolean handlePinMmi(String dialString) { return mActivePhone.handlePinMmi(dialString); } Loading Loading @@ -746,4 +747,17 @@ public class SipPhoneProxy implements Phone { public void unsetOnEcbModeExitResponse(Handler h){ mActivePhone.unsetOnEcbModeExitResponse(h); } public Connection dial(String dialString, UUSInfo uusInfo) throws CallStateException { return mActivePhone.dial(dialString, uusInfo); } public boolean needsOtaServiceProvisioning() { return mActivePhone.needsOtaServiceProvisioning(); } public NetworkProperties getNetworkProperties(String apnType) { return mActivePhone.getNetworkProperties(apnType); } }