Loading src/java/com/android/internal/telephony/CellularNetworkService.java +41 −41 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import android.telephony.CellIdentityLte; import android.telephony.CellIdentityTdscdma; import android.telephony.CellIdentityWcdma; import android.telephony.LteVopsSupportInfo; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.NetworkService; import android.telephony.NetworkServiceCallback; import android.telephony.Rlog; Loading Loading @@ -88,9 +88,9 @@ public class CellularNetworkService extends NetworkService { if (callback == null) return; ar = (AsyncResult) message.obj; int domain = (message.what == GET_CS_REGISTRATION_STATE_DONE) ? NetworkRegistrationState.DOMAIN_CS : NetworkRegistrationState.DOMAIN_PS; NetworkRegistrationState netState = ? NetworkRegistrationInfo.DOMAIN_CS : NetworkRegistrationInfo.DOMAIN_PS; NetworkRegistrationInfo netState = getRegistrationStateFromResult(ar.result, domain); int resultCode; Loading @@ -102,18 +102,18 @@ public class CellularNetworkService extends NetworkService { try { if (DBG) { log("Calling callback.onGetNetworkRegistrationStateComplete." log("Calling callback.onGetNetworkRegistrationInfoComplete." + "resultCode = " + resultCode + ", netState = " + netState); } callback.onGetNetworkRegistrationStateComplete( callback.onGetNetworkRegistrationInfoComplete( resultCode, netState); } catch (Exception e) { loge("Exception: " + e); } break; case NETWORK_REGISTRATION_STATE_CHANGED: notifyNetworkRegistrationStateChanged(); notifyNetworkRegistrationInfoChanged(); break; default: return; Loading @@ -129,22 +129,22 @@ public class CellularNetworkService extends NetworkService { switch (halRegState) { case RegState.NOT_REG_MT_NOT_SEARCHING_OP: case RegState.NOT_REG_MT_NOT_SEARCHING_OP_EM: return NetworkRegistrationState.REG_STATE_NOT_REG_NOT_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_NOT_SEARCHING; case RegState.REG_HOME: return NetworkRegistrationState.REG_STATE_HOME; return NetworkRegistrationInfo.REG_STATE_HOME; case RegState.NOT_REG_MT_SEARCHING_OP: case RegState.NOT_REG_MT_SEARCHING_OP_EM: return NetworkRegistrationState.REG_STATE_NOT_REG_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_SEARCHING; case RegState.REG_DENIED: case RegState.REG_DENIED_EM: return NetworkRegistrationState.REG_STATE_DENIED; return NetworkRegistrationInfo.REG_STATE_DENIED; case RegState.UNKNOWN: case RegState.UNKNOWN_EM: return NetworkRegistrationState.REG_STATE_UNKNOWN; return NetworkRegistrationInfo.REG_STATE_UNKNOWN; case RegState.REG_ROAMING: return NetworkRegistrationState.REG_STATE_ROAMING; return NetworkRegistrationInfo.REG_STATE_ROAMING; default: return NetworkRegistrationState.REG_STATE_NOT_REG_NOT_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_NOT_SEARCHING; } } Loading Loading @@ -173,16 +173,16 @@ public class CellularNetworkService extends NetworkService { // Otherwise, certain services are available only if it's registered on home or roaming // network. if (emergencyOnly) { availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_EMERGENCY}; } else if (regState == NetworkRegistrationState.REG_STATE_ROAMING || regState == NetworkRegistrationState.REG_STATE_HOME) { if (domain == NetworkRegistrationState.DOMAIN_PS) { availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_DATA}; } else if (domain == NetworkRegistrationState.DOMAIN_CS) { availableServices = new int[] {NetworkRegistrationInfo.SERVICE_TYPE_EMERGENCY}; } else if (regState == NetworkRegistrationInfo.REG_STATE_ROAMING || regState == NetworkRegistrationInfo.REG_STATE_HOME) { if (domain == NetworkRegistrationInfo.DOMAIN_PS) { availableServices = new int[] {NetworkRegistrationInfo.SERVICE_TYPE_DATA}; } else if (domain == NetworkRegistrationInfo.DOMAIN_CS) { availableServices = new int[] { NetworkRegistrationState.SERVICE_TYPE_VOICE, NetworkRegistrationState.SERVICE_TYPE_SMS, NetworkRegistrationState.SERVICE_TYPE_VIDEO NetworkRegistrationInfo.SERVICE_TYPE_VOICE, NetworkRegistrationInfo.SERVICE_TYPE_SMS, NetworkRegistrationInfo.SERVICE_TYPE_VIDEO }; } } Loading @@ -194,24 +194,24 @@ public class CellularNetworkService extends NetworkService { return ServiceState.rilRadioTechnologyToNetworkType(rilRat); } private NetworkRegistrationState getRegistrationStateFromResult(Object result, int domain) { private NetworkRegistrationInfo getRegistrationStateFromResult(Object result, int domain) { if (result == null) { return null; } // TODO: unify when voiceRegStateResult and DataRegStateResult are unified. if (domain == NetworkRegistrationState.DOMAIN_CS) { if (domain == NetworkRegistrationInfo.DOMAIN_CS) { return createRegistrationStateFromVoiceRegState(result); } else if (domain == NetworkRegistrationState.DOMAIN_PS) { } else if (domain == NetworkRegistrationInfo.DOMAIN_PS) { return createRegistrationStateFromDataRegState(result); } else { return null; } } private NetworkRegistrationState createRegistrationStateFromVoiceRegState(Object result) { private NetworkRegistrationInfo createRegistrationStateFromVoiceRegState(Object result) { int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN; int domain = NetworkRegistrationState.DOMAIN_CS; int domain = NetworkRegistrationInfo.DOMAIN_CS; if (result instanceof android.hardware.radio.V1_0.VoiceRegStateResult) { android.hardware.radio.V1_0.VoiceRegStateResult voiceRegState = Loading @@ -229,7 +229,7 @@ public class CellularNetworkService extends NetworkService { CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(voiceRegState.cellIdentity); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, cssSupported, roamingIndicator, systemIsInPrl, defaultRoamingIndicator); Loading @@ -249,7 +249,7 @@ public class CellularNetworkService extends NetworkService { CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(voiceRegState.cellIdentity); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, cssSupported, roamingIndicator, systemIsInPrl, defaultRoamingIndicator); Loading @@ -258,8 +258,8 @@ public class CellularNetworkService extends NetworkService { return null; } private NetworkRegistrationState createRegistrationStateFromDataRegState(Object result) { int domain = NetworkRegistrationState.DOMAIN_PS; private NetworkRegistrationInfo createRegistrationStateFromDataRegState(Object result) { int domain = NetworkRegistrationInfo.DOMAIN_PS; int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN; if (result instanceof android.hardware.radio.V1_0.DataRegStateResult) { Loading @@ -276,7 +276,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo lteVopsSupportInfo = new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE, LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */, false /* isEnDcAvailable */, lteVopsSupportInfo); Loading @@ -295,7 +295,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo lteVopsSupportInfo = new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE, LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */, false /* isEnDcAvailable */, lteVopsSupportInfo); Loading Loading @@ -324,7 +324,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); } return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, nrIndicators.isDcNrRestricted, nrIndicators.isNrAvailable, nrIndicators.isEndcAvailable, Loading Loading @@ -460,21 +460,21 @@ public class CellularNetworkService extends NetworkService { } @Override public void getNetworkRegistrationState(int domain, NetworkServiceCallback callback) { if (DBG) log("getNetworkRegistrationState for domain " + domain); public void getNetworkRegistrationInfo(int domain, NetworkServiceCallback callback) { if (DBG) log("getNetworkRegistrationInfo for domain " + domain); Message message = null; if (domain == NetworkRegistrationState.DOMAIN_CS) { if (domain == NetworkRegistrationInfo.DOMAIN_CS) { message = Message.obtain(mHandler, GET_CS_REGISTRATION_STATE_DONE); mCallbackMap.put(message, callback); mPhone.mCi.getVoiceRegistrationState(message); } else if (domain == NetworkRegistrationState.DOMAIN_PS) { } else if (domain == NetworkRegistrationInfo.DOMAIN_PS) { message = Message.obtain(mHandler, GET_PS_REGISTRATION_STATE_DONE); mCallbackMap.put(message, callback); mPhone.mCi.getDataRegistrationState(message); } else { loge("getNetworkRegistrationState invalid domain " + domain); callback.onGetNetworkRegistrationStateComplete( loge("getNetworkRegistrationInfo invalid domain " + domain); callback.onGetNetworkRegistrationInfoComplete( NetworkServiceCallback.RESULT_ERROR_INVALID_ARG, null); } } Loading src/java/com/android/internal/telephony/NetworkRegistrationManager.java +13 −13 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.CarrierConfigManager; import android.telephony.INetworkService; import android.telephony.INetworkServiceCallback; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.NetworkService; import android.telephony.Rlog; import android.telephony.TelephonyManager; Loading Loading @@ -127,24 +127,24 @@ public class NetworkRegistrationManager extends Handler { return (mINetworkService != null) && (mINetworkService.asBinder().isBinderAlive()); } public void unregisterForNetworkRegistrationStateChanged(Handler h) { public void unregisterForNetworkRegistrationInfoChanged(Handler h) { mRegStateChangeRegistrants.remove(h); } public void registerForNetworkRegistrationStateChanged(Handler h, int what, Object obj) { logd("registerForNetworkRegistrationStateChanged"); public void registerForNetworkRegistrationInfoChanged(Handler h, int what, Object obj) { logd("registerForNetworkRegistrationInfoChanged"); mRegStateChangeRegistrants.addUnique(h, what, obj); } private final Map<NetworkRegStateCallback, Message> mCallbackTable = new Hashtable(); public void getNetworkRegistrationState(@NetworkRegistrationState.Domain int domain, public void getNetworkRegistrationInfo(@NetworkRegistrationInfo.Domain int domain, Message onCompleteMessage) { if (onCompleteMessage == null) return; if (!isServiceConnected()) { loge("service not connected. Domain = " + ((domain == NetworkRegistrationState.DOMAIN_CS) ? "CS" : "PS")); + ((domain == NetworkRegistrationInfo.DOMAIN_CS) ? "CS" : "PS")); onCompleteMessage.obj = new AsyncResult(onCompleteMessage.obj, null, new IllegalStateException("Service not connected.")); onCompleteMessage.sendToTarget(); Loading @@ -154,9 +154,9 @@ public class NetworkRegistrationManager extends Handler { NetworkRegStateCallback callback = new NetworkRegStateCallback(); try { mCallbackTable.put(callback, onCompleteMessage); mINetworkService.getNetworkRegistrationState(mPhone.getPhoneId(), domain, callback); mINetworkService.getNetworkRegistrationInfo(mPhone.getPhoneId(), domain, callback); } catch (RemoteException e) { loge("getNetworkRegistrationState RemoteException " + e); loge("getNetworkRegistrationInfo RemoteException " + e); mCallbackTable.remove(callback); onCompleteMessage.obj = new AsyncResult(onCompleteMessage.obj, null, e); onCompleteMessage.sendToTarget(); Loading Loading @@ -190,7 +190,7 @@ public class NetworkRegistrationManager extends Handler { try { service.linkToDeath(mDeathRecipient, 0); mINetworkService.createNetworkServiceProvider(mPhone.getPhoneId()); mINetworkService.registerForNetworkRegistrationStateChanged(mPhone.getPhoneId(), mINetworkService.registerForNetworkRegistrationInfoChanged(mPhone.getPhoneId(), new NetworkRegStateCallback()); } catch (RemoteException exception) { // Remote exception means that the binder already died. Loading @@ -213,9 +213,9 @@ public class NetworkRegistrationManager extends Handler { private class NetworkRegStateCallback extends INetworkServiceCallback.Stub { @Override public void onGetNetworkRegistrationStateComplete( int result, NetworkRegistrationState state) { logd("onGetNetworkRegistrationStateComplete result " public void onGetNetworkRegistrationInfoComplete( int result, NetworkRegistrationInfo state) { logd("onGetNetworkRegistrationInfoComplete result " + result + " state " + state); Message onCompleteMessage = mCallbackTable.remove(this); if (onCompleteMessage != null) { Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +46 −46 File changed.Preview size limit exceeded, changes collapsed. Show changes src/java/com/android/internal/telephony/dataconnection/DataConnection.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import android.provider.Telephony; import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.DataFailCause; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.TelephonyManager; Loading Loading @@ -2878,7 +2878,7 @@ public class DataConnection extends StateMachine { /** Check if the device is connected to NR 5G Non-Standalone network. */ private boolean isNRConnected() { return mPhone.getServiceState().getNrStatus() == NetworkRegistrationState.NR_STATUS_CONNECTED; == NetworkRegistrationInfo.NR_STATUS_CONNECTED; } private void dumpToLog() { Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.CarrierConfigManager; import android.telephony.CellLocation; import android.telephony.DataFailCause; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.PcoData; import android.telephony.Rlog; import android.telephony.ServiceState; Loading Loading @@ -4794,8 +4794,8 @@ public class DcTracker extends Handler { private int getDataRat() { ServiceState ss = mPhone.getServiceState(); NetworkRegistrationState nrs = ss.getNetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, mTransportType); NetworkRegistrationInfo nrs = ss.getNetworkRegistrationInfo( NetworkRegistrationInfo.DOMAIN_PS, mTransportType); if (nrs != null) { return ServiceState.networkTypeToRilRadioTechnology(nrs.getAccessNetworkTechnology()); } Loading Loading
src/java/com/android/internal/telephony/CellularNetworkService.java +41 −41 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import android.telephony.CellIdentityLte; import android.telephony.CellIdentityTdscdma; import android.telephony.CellIdentityWcdma; import android.telephony.LteVopsSupportInfo; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.NetworkService; import android.telephony.NetworkServiceCallback; import android.telephony.Rlog; Loading Loading @@ -88,9 +88,9 @@ public class CellularNetworkService extends NetworkService { if (callback == null) return; ar = (AsyncResult) message.obj; int domain = (message.what == GET_CS_REGISTRATION_STATE_DONE) ? NetworkRegistrationState.DOMAIN_CS : NetworkRegistrationState.DOMAIN_PS; NetworkRegistrationState netState = ? NetworkRegistrationInfo.DOMAIN_CS : NetworkRegistrationInfo.DOMAIN_PS; NetworkRegistrationInfo netState = getRegistrationStateFromResult(ar.result, domain); int resultCode; Loading @@ -102,18 +102,18 @@ public class CellularNetworkService extends NetworkService { try { if (DBG) { log("Calling callback.onGetNetworkRegistrationStateComplete." log("Calling callback.onGetNetworkRegistrationInfoComplete." + "resultCode = " + resultCode + ", netState = " + netState); } callback.onGetNetworkRegistrationStateComplete( callback.onGetNetworkRegistrationInfoComplete( resultCode, netState); } catch (Exception e) { loge("Exception: " + e); } break; case NETWORK_REGISTRATION_STATE_CHANGED: notifyNetworkRegistrationStateChanged(); notifyNetworkRegistrationInfoChanged(); break; default: return; Loading @@ -129,22 +129,22 @@ public class CellularNetworkService extends NetworkService { switch (halRegState) { case RegState.NOT_REG_MT_NOT_SEARCHING_OP: case RegState.NOT_REG_MT_NOT_SEARCHING_OP_EM: return NetworkRegistrationState.REG_STATE_NOT_REG_NOT_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_NOT_SEARCHING; case RegState.REG_HOME: return NetworkRegistrationState.REG_STATE_HOME; return NetworkRegistrationInfo.REG_STATE_HOME; case RegState.NOT_REG_MT_SEARCHING_OP: case RegState.NOT_REG_MT_SEARCHING_OP_EM: return NetworkRegistrationState.REG_STATE_NOT_REG_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_SEARCHING; case RegState.REG_DENIED: case RegState.REG_DENIED_EM: return NetworkRegistrationState.REG_STATE_DENIED; return NetworkRegistrationInfo.REG_STATE_DENIED; case RegState.UNKNOWN: case RegState.UNKNOWN_EM: return NetworkRegistrationState.REG_STATE_UNKNOWN; return NetworkRegistrationInfo.REG_STATE_UNKNOWN; case RegState.REG_ROAMING: return NetworkRegistrationState.REG_STATE_ROAMING; return NetworkRegistrationInfo.REG_STATE_ROAMING; default: return NetworkRegistrationState.REG_STATE_NOT_REG_NOT_SEARCHING; return NetworkRegistrationInfo.REG_STATE_NOT_REG_NOT_SEARCHING; } } Loading Loading @@ -173,16 +173,16 @@ public class CellularNetworkService extends NetworkService { // Otherwise, certain services are available only if it's registered on home or roaming // network. if (emergencyOnly) { availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_EMERGENCY}; } else if (regState == NetworkRegistrationState.REG_STATE_ROAMING || regState == NetworkRegistrationState.REG_STATE_HOME) { if (domain == NetworkRegistrationState.DOMAIN_PS) { availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_DATA}; } else if (domain == NetworkRegistrationState.DOMAIN_CS) { availableServices = new int[] {NetworkRegistrationInfo.SERVICE_TYPE_EMERGENCY}; } else if (regState == NetworkRegistrationInfo.REG_STATE_ROAMING || regState == NetworkRegistrationInfo.REG_STATE_HOME) { if (domain == NetworkRegistrationInfo.DOMAIN_PS) { availableServices = new int[] {NetworkRegistrationInfo.SERVICE_TYPE_DATA}; } else if (domain == NetworkRegistrationInfo.DOMAIN_CS) { availableServices = new int[] { NetworkRegistrationState.SERVICE_TYPE_VOICE, NetworkRegistrationState.SERVICE_TYPE_SMS, NetworkRegistrationState.SERVICE_TYPE_VIDEO NetworkRegistrationInfo.SERVICE_TYPE_VOICE, NetworkRegistrationInfo.SERVICE_TYPE_SMS, NetworkRegistrationInfo.SERVICE_TYPE_VIDEO }; } } Loading @@ -194,24 +194,24 @@ public class CellularNetworkService extends NetworkService { return ServiceState.rilRadioTechnologyToNetworkType(rilRat); } private NetworkRegistrationState getRegistrationStateFromResult(Object result, int domain) { private NetworkRegistrationInfo getRegistrationStateFromResult(Object result, int domain) { if (result == null) { return null; } // TODO: unify when voiceRegStateResult and DataRegStateResult are unified. if (domain == NetworkRegistrationState.DOMAIN_CS) { if (domain == NetworkRegistrationInfo.DOMAIN_CS) { return createRegistrationStateFromVoiceRegState(result); } else if (domain == NetworkRegistrationState.DOMAIN_PS) { } else if (domain == NetworkRegistrationInfo.DOMAIN_PS) { return createRegistrationStateFromDataRegState(result); } else { return null; } } private NetworkRegistrationState createRegistrationStateFromVoiceRegState(Object result) { private NetworkRegistrationInfo createRegistrationStateFromVoiceRegState(Object result) { int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN; int domain = NetworkRegistrationState.DOMAIN_CS; int domain = NetworkRegistrationInfo.DOMAIN_CS; if (result instanceof android.hardware.radio.V1_0.VoiceRegStateResult) { android.hardware.radio.V1_0.VoiceRegStateResult voiceRegState = Loading @@ -229,7 +229,7 @@ public class CellularNetworkService extends NetworkService { CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(voiceRegState.cellIdentity); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, cssSupported, roamingIndicator, systemIsInPrl, defaultRoamingIndicator); Loading @@ -249,7 +249,7 @@ public class CellularNetworkService extends NetworkService { CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(voiceRegState.cellIdentity); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, cssSupported, roamingIndicator, systemIsInPrl, defaultRoamingIndicator); Loading @@ -258,8 +258,8 @@ public class CellularNetworkService extends NetworkService { return null; } private NetworkRegistrationState createRegistrationStateFromDataRegState(Object result) { int domain = NetworkRegistrationState.DOMAIN_PS; private NetworkRegistrationInfo createRegistrationStateFromDataRegState(Object result) { int domain = NetworkRegistrationInfo.DOMAIN_PS; int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN; if (result instanceof android.hardware.radio.V1_0.DataRegStateResult) { Loading @@ -276,7 +276,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo lteVopsSupportInfo = new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE, LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */, false /* isEnDcAvailable */, lteVopsSupportInfo); Loading @@ -295,7 +295,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo lteVopsSupportInfo = new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE, LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */, false /* isEnDcAvailable */, lteVopsSupportInfo); Loading Loading @@ -324,7 +324,7 @@ public class CellularNetworkService extends NetworkService { LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE); } return new NetworkRegistrationState(domain, transportType, regState, return new NetworkRegistrationInfo(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, nrIndicators.isDcNrRestricted, nrIndicators.isNrAvailable, nrIndicators.isEndcAvailable, Loading Loading @@ -460,21 +460,21 @@ public class CellularNetworkService extends NetworkService { } @Override public void getNetworkRegistrationState(int domain, NetworkServiceCallback callback) { if (DBG) log("getNetworkRegistrationState for domain " + domain); public void getNetworkRegistrationInfo(int domain, NetworkServiceCallback callback) { if (DBG) log("getNetworkRegistrationInfo for domain " + domain); Message message = null; if (domain == NetworkRegistrationState.DOMAIN_CS) { if (domain == NetworkRegistrationInfo.DOMAIN_CS) { message = Message.obtain(mHandler, GET_CS_REGISTRATION_STATE_DONE); mCallbackMap.put(message, callback); mPhone.mCi.getVoiceRegistrationState(message); } else if (domain == NetworkRegistrationState.DOMAIN_PS) { } else if (domain == NetworkRegistrationInfo.DOMAIN_PS) { message = Message.obtain(mHandler, GET_PS_REGISTRATION_STATE_DONE); mCallbackMap.put(message, callback); mPhone.mCi.getDataRegistrationState(message); } else { loge("getNetworkRegistrationState invalid domain " + domain); callback.onGetNetworkRegistrationStateComplete( loge("getNetworkRegistrationInfo invalid domain " + domain); callback.onGetNetworkRegistrationInfoComplete( NetworkServiceCallback.RESULT_ERROR_INVALID_ARG, null); } } Loading
src/java/com/android/internal/telephony/NetworkRegistrationManager.java +13 −13 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.CarrierConfigManager; import android.telephony.INetworkService; import android.telephony.INetworkServiceCallback; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.NetworkService; import android.telephony.Rlog; import android.telephony.TelephonyManager; Loading Loading @@ -127,24 +127,24 @@ public class NetworkRegistrationManager extends Handler { return (mINetworkService != null) && (mINetworkService.asBinder().isBinderAlive()); } public void unregisterForNetworkRegistrationStateChanged(Handler h) { public void unregisterForNetworkRegistrationInfoChanged(Handler h) { mRegStateChangeRegistrants.remove(h); } public void registerForNetworkRegistrationStateChanged(Handler h, int what, Object obj) { logd("registerForNetworkRegistrationStateChanged"); public void registerForNetworkRegistrationInfoChanged(Handler h, int what, Object obj) { logd("registerForNetworkRegistrationInfoChanged"); mRegStateChangeRegistrants.addUnique(h, what, obj); } private final Map<NetworkRegStateCallback, Message> mCallbackTable = new Hashtable(); public void getNetworkRegistrationState(@NetworkRegistrationState.Domain int domain, public void getNetworkRegistrationInfo(@NetworkRegistrationInfo.Domain int domain, Message onCompleteMessage) { if (onCompleteMessage == null) return; if (!isServiceConnected()) { loge("service not connected. Domain = " + ((domain == NetworkRegistrationState.DOMAIN_CS) ? "CS" : "PS")); + ((domain == NetworkRegistrationInfo.DOMAIN_CS) ? "CS" : "PS")); onCompleteMessage.obj = new AsyncResult(onCompleteMessage.obj, null, new IllegalStateException("Service not connected.")); onCompleteMessage.sendToTarget(); Loading @@ -154,9 +154,9 @@ public class NetworkRegistrationManager extends Handler { NetworkRegStateCallback callback = new NetworkRegStateCallback(); try { mCallbackTable.put(callback, onCompleteMessage); mINetworkService.getNetworkRegistrationState(mPhone.getPhoneId(), domain, callback); mINetworkService.getNetworkRegistrationInfo(mPhone.getPhoneId(), domain, callback); } catch (RemoteException e) { loge("getNetworkRegistrationState RemoteException " + e); loge("getNetworkRegistrationInfo RemoteException " + e); mCallbackTable.remove(callback); onCompleteMessage.obj = new AsyncResult(onCompleteMessage.obj, null, e); onCompleteMessage.sendToTarget(); Loading Loading @@ -190,7 +190,7 @@ public class NetworkRegistrationManager extends Handler { try { service.linkToDeath(mDeathRecipient, 0); mINetworkService.createNetworkServiceProvider(mPhone.getPhoneId()); mINetworkService.registerForNetworkRegistrationStateChanged(mPhone.getPhoneId(), mINetworkService.registerForNetworkRegistrationInfoChanged(mPhone.getPhoneId(), new NetworkRegStateCallback()); } catch (RemoteException exception) { // Remote exception means that the binder already died. Loading @@ -213,9 +213,9 @@ public class NetworkRegistrationManager extends Handler { private class NetworkRegStateCallback extends INetworkServiceCallback.Stub { @Override public void onGetNetworkRegistrationStateComplete( int result, NetworkRegistrationState state) { logd("onGetNetworkRegistrationStateComplete result " public void onGetNetworkRegistrationInfoComplete( int result, NetworkRegistrationInfo state) { logd("onGetNetworkRegistrationInfoComplete result " + result + " state " + state); Message onCompleteMessage = mCallbackTable.remove(this); if (onCompleteMessage != null) { Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +46 −46 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/java/com/android/internal/telephony/dataconnection/DataConnection.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import android.provider.Telephony; import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.DataFailCause; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.TelephonyManager; Loading Loading @@ -2878,7 +2878,7 @@ public class DataConnection extends StateMachine { /** Check if the device is connected to NR 5G Non-Standalone network. */ private boolean isNRConnected() { return mPhone.getServiceState().getNrStatus() == NetworkRegistrationState.NR_STATUS_CONNECTED; == NetworkRegistrationInfo.NR_STATUS_CONNECTED; } private void dumpToLog() { Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.CarrierConfigManager; import android.telephony.CellLocation; import android.telephony.DataFailCause; import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationInfo; import android.telephony.PcoData; import android.telephony.Rlog; import android.telephony.ServiceState; Loading Loading @@ -4794,8 +4794,8 @@ public class DcTracker extends Handler { private int getDataRat() { ServiceState ss = mPhone.getServiceState(); NetworkRegistrationState nrs = ss.getNetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, mTransportType); NetworkRegistrationInfo nrs = ss.getNetworkRegistrationInfo( NetworkRegistrationInfo.DOMAIN_PS, mTransportType); if (nrs != null) { return ServiceState.networkTypeToRilRadioTechnology(nrs.getAccessNetworkTechnology()); } Loading