commit | 9b5334dbad64d7e1278e10a7232c6fa11ec8629e | [log] [tgz] |
---|---|---|
author | wangshengrjxtjcb <sheng.wang@vivo.com> | Tue May 09 09:51:06 2023 +0800 |
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Wed May 17 02:42:14 2023 +0000 |
tree | 84d42ee047940d0516cd49694e2ff566de12c5eb | |
parent | f8d29e401e2dddc955cff331d922d7a1edeb09da [diff] |
Fix agents disconnecting in SUSPENDED state. Network state is not changed to disconnected when a networkagent is disconnected and network state is SUSPENDED. So the function requiresClat return true. Clat is not stoped. Bug: 277682237 Test: atest FrameworksNetTests (cherry picked from https://android-review.googlesource.com/q/commit:fd5d3d90e1da7411104902ddfe859ebd0e4a02fb) Merged-In: I5edfcf64aca5d2d34325d722dd29fab41bcf2600 Change-Id: I5edfcf64aca5d2d34325d722dd29fab41bcf2600
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java index 8ec6eb9..108fc64 100755 --- a/service/src/com/android/server/ConnectivityService.java +++ b/service/src/com/android/server/ConnectivityService.java
@@ -4526,7 +4526,7 @@ // because they lost all their requests or because their score isn't good) // then they would disconnect organically, report their new state and then // disconnect the channel. - if (nai.networkInfo.isConnected()) { + if (nai.networkInfo.isConnected() || nai.networkInfo.isSuspended()) { nai.networkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null); }