commit | bdb1bdf57b8c4348a02fc085b05b7b0f57abe7b5 | [log] [tgz] |
---|---|---|
author | Robert Greenwalt <rgreenwalt@google.com> | Thu Aug 21 09:19:46 2014 -0700 |
committer | Robert Greenwalt <rgreenwalt@google.com> | Thu Aug 21 09:19:46 2014 -0700 |
tree | 918c091f6e0cefd6d2b5ecdf8e0b16da4b764b00 | |
parent | 635bc8bc84fe5da6d667c280bea6d96c46ffa3fd [diff] |
Change the NetworkInfo for disconnected types. Don't send out NetworkInfos with UNKNOWN state for disconnected networks - use DISCONNECTED. bug:17095670 Change-Id: I863bebadc1f9a666572958b49d5e62809f485e5d
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 96f8324..8914728 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -4759,7 +4759,9 @@ result.setType(networkType); return result; } else { - return new NetworkInfo(networkType, 0, "Unknown", ""); + NetworkInfo result = new NetworkInfo(networkType); + result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null); + return result; } }