Loading telephony/java/android/telephony/ServiceState.java +7 −18 Original line number Original line Diff line number Diff line Loading @@ -473,8 +473,8 @@ public class ServiceState implements Parcelable { + " EmergOnly=" + mIsEmergencyOnly); + " EmergOnly=" + mIsEmergencyOnly); } } public void setStateOutOfService() { private void setNullState(int state) { mState = STATE_OUT_OF_SERVICE; mState = state; mRoaming = false; mRoaming = false; mOperatorAlphaLong = null; mOperatorAlphaLong = null; mOperatorAlphaShort = null; mOperatorAlphaShort = null; Loading @@ -491,23 +491,12 @@ public class ServiceState implements Parcelable { mIsEmergencyOnly = false; mIsEmergencyOnly = false; } } // TODO - can't this be combined with the above method? public void setStateOutOfService() { setNullState(STATE_OUT_OF_SERVICE); } public void setStateOff() { public void setStateOff() { mState = STATE_POWER_OFF; setNullState(STATE_POWER_OFF); mRoaming = false; mOperatorAlphaLong = null; mOperatorAlphaShort = null; mOperatorNumeric = null; mIsManualNetworkSelection = false; mRadioTechnology = 0; mCssIndicator = false; mNetworkId = -1; mSystemId = -1; mCdmaRoamingIndicator = -1; mCdmaDefaultRoamingIndicator = -1; mCdmaEriIconIndex = -1; mCdmaEriIconMode = -1; mIsEmergencyOnly = false; } } public void setState(int state) { public void setState(int state) { Loading telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.net.LinkProperties; import android.os.Bundle; import android.os.Bundle; import android.os.RemoteException; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager; import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager; import android.util.Log; import android.util.Log; Loading Loading @@ -55,8 +56,13 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } public void notifyServiceState(Phone sender) { public void notifyServiceState(Phone sender) { ServiceState ss = sender.getServiceState(); if (ss == null) { ss = new ServiceState(); ss.setStateOutOfService(); } try { try { mRegistry.notifyServiceState(sender.getServiceState()); mRegistry.notifyServiceState(ss); } catch (RemoteException ex) { } catch (RemoteException ex) { // system process is dead // system process is dead } } Loading Loading
telephony/java/android/telephony/ServiceState.java +7 −18 Original line number Original line Diff line number Diff line Loading @@ -473,8 +473,8 @@ public class ServiceState implements Parcelable { + " EmergOnly=" + mIsEmergencyOnly); + " EmergOnly=" + mIsEmergencyOnly); } } public void setStateOutOfService() { private void setNullState(int state) { mState = STATE_OUT_OF_SERVICE; mState = state; mRoaming = false; mRoaming = false; mOperatorAlphaLong = null; mOperatorAlphaLong = null; mOperatorAlphaShort = null; mOperatorAlphaShort = null; Loading @@ -491,23 +491,12 @@ public class ServiceState implements Parcelable { mIsEmergencyOnly = false; mIsEmergencyOnly = false; } } // TODO - can't this be combined with the above method? public void setStateOutOfService() { setNullState(STATE_OUT_OF_SERVICE); } public void setStateOff() { public void setStateOff() { mState = STATE_POWER_OFF; setNullState(STATE_POWER_OFF); mRoaming = false; mOperatorAlphaLong = null; mOperatorAlphaShort = null; mOperatorNumeric = null; mIsManualNetworkSelection = false; mRadioTechnology = 0; mCssIndicator = false; mNetworkId = -1; mSystemId = -1; mCdmaRoamingIndicator = -1; mCdmaDefaultRoamingIndicator = -1; mCdmaEriIconIndex = -1; mCdmaEriIconMode = -1; mIsEmergencyOnly = false; } } public void setState(int state) { public void setState(int state) { Loading
telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.net.LinkProperties; import android.os.Bundle; import android.os.Bundle; import android.os.RemoteException; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager; import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager; import android.util.Log; import android.util.Log; Loading Loading @@ -55,8 +56,13 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } } public void notifyServiceState(Phone sender) { public void notifyServiceState(Phone sender) { ServiceState ss = sender.getServiceState(); if (ss == null) { ss = new ServiceState(); ss.setStateOutOfService(); } try { try { mRegistry.notifyServiceState(sender.getServiceState()); mRegistry.notifyServiceState(ss); } catch (RemoteException ex) { } catch (RemoteException ex) { // system process is dead // system process is dead } } Loading