Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18ac337e authored by Jack Yu's avatar Jack Yu
Browse files

Fixed misleading debug messages

The data network type of a NetworkInfo was incorrectly
set. Connectivity service debug messages were showing
incorrect network type which is misleading.

Fixed by using transport type to get the correct data
network type.

Test: Manual
Bug: 138660856
Merged-In: I717d1d736273cbbd2df39486b72e6954904f693c
Change-Id: I717d1d736273cbbd2df39486b72e6954904f693c
parent 8b2721f3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1642,7 +1642,14 @@ public class DataConnection extends StateMachine {

    private void updateNetworkInfo() {
        final ServiceState state = mPhone.getServiceState();
        final int subtype = state.getDataNetworkType();

        NetworkRegistrationInfo nri = state.getNetworkRegistrationInfo(
                NetworkRegistrationInfo.DOMAIN_PS, mTransportType);
        int subtype = TelephonyManager.NETWORK_TYPE_UNKNOWN;
        if (nri != null) {
            subtype = nri.getAccessNetworkTechnology();
        }

        mNetworkInfo.setSubtype(subtype, TelephonyManager.getNetworkTypeName(subtype));
        mNetworkInfo.setRoaming(state.getDataRoaming());
    }