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

Commit 59e88e77 authored by Chalard Jean's avatar Chalard Jean Committed by Automerger Merge Worker
Browse files

Merge "Fix a bug where modern network agents start in UNKNOWN" am: fc2b3994 am: 63b234d1

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460964

Change-Id: I1acdfe14a14bfca15967efe2d97b653691e259f8
parents 441c5bc2 63b234d1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -353,10 +353,11 @@ public abstract class NetworkAgent {

    private static NetworkInfo getLegacyNetworkInfo(final NetworkAgentConfig config) {
        // The subtype can be changed with (TODO) setLegacySubtype, but it starts
        // with the type and an empty description.
        // with 0 (TelephonyManager.NETWORK_TYPE_UNKNOWN) and an empty description.
        final NetworkInfo ni = new NetworkInfo(config.legacyType, 0, config.legacyTypeName, "");
        ni.setIsAvailable(true);
        ni.setExtraInfo(config.getLegacyExtraInfo());
        ni.setDetailedState(NetworkInfo.DetailedState.CONNECTING, null /* reason */,
                config.getLegacyExtraInfo());
        return ni;
    }