Loading src/java/com/android/internal/telephony/HalVersion.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ import java.util.Objects; * HIDL versioning</a>. */ public class HalVersion implements Comparable<HalVersion> { /** The HAL Version indicating that the version is unknown or invalid */ public static final HalVersion UNKNOWN = new HalVersion(-1, -1); public final int major; public final int minor; Loading src/java/com/android/internal/telephony/LocaleTracker.java +3 −18 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class LocaleTracker extends Handler { public void updateOperatorNumeric(String operatorNumeric) { // Check if the operator numeric changes. if (!Objects.equals(mOperatorNumeric, operatorNumeric)) { String msg = "Operator numeric changes to " + operatorNumeric; String msg = "Operator numeric changes to \"" + operatorNumeric + "\""; if (DBG) log(msg); mLocalLog.log(msg); mOperatorNumeric = operatorNumeric; Loading @@ -286,23 +286,8 @@ public class LocaleTracker extends Handler { return; } List<CellInfo> cellInfoList = (List<CellInfo>) ar.result; String msg = "getCellInfo: cell info=" + cellInfoList; String msg = "processCellInfo: cell info=" + cellInfoList; if (DBG) log(msg); if (cellInfoList != null) { // We only log when cell identity changes, otherwise the local log is flooded with cell // info. if (mCellInfoList == null || cellInfoList.size() != mCellInfoList.size()) { mLocalLog.log(msg); } else { for (int i = 0; i < cellInfoList.size(); i++) { if (!Objects.equals(mCellInfoList.get(i).getCellIdentity(), cellInfoList.get(i).getCellIdentity())) { mLocalLog.log(msg); break; } } } } mCellInfoList = cellInfoList; updateLocale(); } Loading Loading @@ -412,7 +397,7 @@ public class LocaleTracker extends Handler { boolean countryChanged = false; if (!Objects.equals(countryIso, mCurrentCountryIso)) { String msg = "updateLocale: Change the current country to \"" + countryIso + "\", mcc = " + mcc; + "\", mcc = " + mcc + ", mCellInfoList = " + mCellInfoList; log(msg); mLocalLog.log(msg); mCurrentCountryIso = countryIso; Loading src/java/com/android/internal/telephony/Phone.java +4 −4 Original line number Diff line number Diff line Loading @@ -2210,10 +2210,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mNotifier.notifyMessageWaitingChanged(this); } public void notifyDataConnection(String apnType, PhoneConstants.DataState state) { mNotifier.notifyDataConnection(this, apnType, state); } public void notifyDataConnection(String apnType) { mNotifier.notifyDataConnection(this, apnType, getDataConnectionState(apnType)); } Loading Loading @@ -2248,6 +2244,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mNotifier.notifySignalStrength(this); } public PhoneConstants.DataState getDataConnectionState(String apnType) { return PhoneConstants.DataState.DISCONNECTED; } public void notifyCellInfo(List<CellInfo> cellInfo) { AsyncResult ar = new AsyncResult(null, cellInfo, null); mCellInfoRegistrants.notifyRegistrants(ar); Loading src/java/com/android/internal/telephony/PhoneSwitcher.java +15 −11 Original line number Diff line number Diff line Loading @@ -599,6 +599,9 @@ public class PhoneSwitcher extends Handler { } } notifyActiveDataSubIdChanged(mSubscriptionController.getSubIdUsingPhoneId( mPreferredDataPhoneId)); // Notify all registrants. mActivePhoneRegistrants.notifyRegistrants(); } Loading Loading @@ -859,7 +862,6 @@ public class PhoneSwitcher extends Handler { logDataSwitchEvent(TelephonyEvent.EventState.EVENT_STATE_START, DataSwitch.Reason.DATA_SWITCH_REASON_CBRS); onEvaluate(REQUESTS_UNCHANGED, "preferredDataSubscriptionIdChanged"); notifyPreferredDataSubIdChanged(); registerDefaultNetworkChangeCallback(); } } Loading @@ -884,16 +886,6 @@ public class PhoneSwitcher extends Handler { subId, needValidation ? 1 : 0, callback).sendToTarget(); } private void notifyPreferredDataSubIdChanged() { ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService( "telephony.registry")); try { tr.notifyPreferredDataSubIdChanged(mPreferredDataSubId); } catch (RemoteException ex) { // Should never happen because TelephonyRegistry service should always be available. } } private boolean isCallActive(Phone phone) { if (phone == null) { return false; Loading Loading @@ -926,6 +918,18 @@ public class PhoneSwitcher extends Handler { dataSwitch.state = state; dataSwitch.reason = reason; TelephonyMetrics.getInstance().writeDataSwitch(dataSwitch); } private void notifyActiveDataSubIdChanged(int activeDataSubId) { ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService( "telephony.registry")); try { log("notifyActiveDataSubIdChanged to " + activeDataSubId); tr.notifyActiveDataSubIdChanged(activeDataSubId); } catch (RemoteException ex) { // Should never happen because its always available. } } public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { Loading src/java/com/android/internal/telephony/RIL.java +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public class RIL extends BaseCommands implements CommandsInterface { private final ClientWakelockTracker mClientWakelockTracker = new ClientWakelockTracker(); /** @hide */ public static final HalVersion RADIO_HAL_VERSION_UNKNOWN = new HalVersion(-1, -1); public static final HalVersion RADIO_HAL_VERSION_UNKNOWN = HalVersion.UNKNOWN; /** @hide */ public static final HalVersion RADIO_HAL_VERSION_1_0 = new HalVersion(1, 0); Loading Loading
src/java/com/android/internal/telephony/HalVersion.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ import java.util.Objects; * HIDL versioning</a>. */ public class HalVersion implements Comparable<HalVersion> { /** The HAL Version indicating that the version is unknown or invalid */ public static final HalVersion UNKNOWN = new HalVersion(-1, -1); public final int major; public final int minor; Loading
src/java/com/android/internal/telephony/LocaleTracker.java +3 −18 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class LocaleTracker extends Handler { public void updateOperatorNumeric(String operatorNumeric) { // Check if the operator numeric changes. if (!Objects.equals(mOperatorNumeric, operatorNumeric)) { String msg = "Operator numeric changes to " + operatorNumeric; String msg = "Operator numeric changes to \"" + operatorNumeric + "\""; if (DBG) log(msg); mLocalLog.log(msg); mOperatorNumeric = operatorNumeric; Loading @@ -286,23 +286,8 @@ public class LocaleTracker extends Handler { return; } List<CellInfo> cellInfoList = (List<CellInfo>) ar.result; String msg = "getCellInfo: cell info=" + cellInfoList; String msg = "processCellInfo: cell info=" + cellInfoList; if (DBG) log(msg); if (cellInfoList != null) { // We only log when cell identity changes, otherwise the local log is flooded with cell // info. if (mCellInfoList == null || cellInfoList.size() != mCellInfoList.size()) { mLocalLog.log(msg); } else { for (int i = 0; i < cellInfoList.size(); i++) { if (!Objects.equals(mCellInfoList.get(i).getCellIdentity(), cellInfoList.get(i).getCellIdentity())) { mLocalLog.log(msg); break; } } } } mCellInfoList = cellInfoList; updateLocale(); } Loading Loading @@ -412,7 +397,7 @@ public class LocaleTracker extends Handler { boolean countryChanged = false; if (!Objects.equals(countryIso, mCurrentCountryIso)) { String msg = "updateLocale: Change the current country to \"" + countryIso + "\", mcc = " + mcc; + "\", mcc = " + mcc + ", mCellInfoList = " + mCellInfoList; log(msg); mLocalLog.log(msg); mCurrentCountryIso = countryIso; Loading
src/java/com/android/internal/telephony/Phone.java +4 −4 Original line number Diff line number Diff line Loading @@ -2210,10 +2210,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mNotifier.notifyMessageWaitingChanged(this); } public void notifyDataConnection(String apnType, PhoneConstants.DataState state) { mNotifier.notifyDataConnection(this, apnType, state); } public void notifyDataConnection(String apnType) { mNotifier.notifyDataConnection(this, apnType, getDataConnectionState(apnType)); } Loading Loading @@ -2248,6 +2244,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mNotifier.notifySignalStrength(this); } public PhoneConstants.DataState getDataConnectionState(String apnType) { return PhoneConstants.DataState.DISCONNECTED; } public void notifyCellInfo(List<CellInfo> cellInfo) { AsyncResult ar = new AsyncResult(null, cellInfo, null); mCellInfoRegistrants.notifyRegistrants(ar); Loading
src/java/com/android/internal/telephony/PhoneSwitcher.java +15 −11 Original line number Diff line number Diff line Loading @@ -599,6 +599,9 @@ public class PhoneSwitcher extends Handler { } } notifyActiveDataSubIdChanged(mSubscriptionController.getSubIdUsingPhoneId( mPreferredDataPhoneId)); // Notify all registrants. mActivePhoneRegistrants.notifyRegistrants(); } Loading Loading @@ -859,7 +862,6 @@ public class PhoneSwitcher extends Handler { logDataSwitchEvent(TelephonyEvent.EventState.EVENT_STATE_START, DataSwitch.Reason.DATA_SWITCH_REASON_CBRS); onEvaluate(REQUESTS_UNCHANGED, "preferredDataSubscriptionIdChanged"); notifyPreferredDataSubIdChanged(); registerDefaultNetworkChangeCallback(); } } Loading @@ -884,16 +886,6 @@ public class PhoneSwitcher extends Handler { subId, needValidation ? 1 : 0, callback).sendToTarget(); } private void notifyPreferredDataSubIdChanged() { ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService( "telephony.registry")); try { tr.notifyPreferredDataSubIdChanged(mPreferredDataSubId); } catch (RemoteException ex) { // Should never happen because TelephonyRegistry service should always be available. } } private boolean isCallActive(Phone phone) { if (phone == null) { return false; Loading Loading @@ -926,6 +918,18 @@ public class PhoneSwitcher extends Handler { dataSwitch.state = state; dataSwitch.reason = reason; TelephonyMetrics.getInstance().writeDataSwitch(dataSwitch); } private void notifyActiveDataSubIdChanged(int activeDataSubId) { ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService( "telephony.registry")); try { log("notifyActiveDataSubIdChanged to " + activeDataSubId); tr.notifyActiveDataSubIdChanged(activeDataSubId); } catch (RemoteException ex) { // Should never happen because its always available. } } public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { Loading
src/java/com/android/internal/telephony/RIL.java +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public class RIL extends BaseCommands implements CommandsInterface { private final ClientWakelockTracker mClientWakelockTracker = new ClientWakelockTracker(); /** @hide */ public static final HalVersion RADIO_HAL_VERSION_UNKNOWN = new HalVersion(-1, -1); public static final HalVersion RADIO_HAL_VERSION_UNKNOWN = HalVersion.UNKNOWN; /** @hide */ public static final HalVersion RADIO_HAL_VERSION_1_0 = new HalVersion(1, 0); Loading