diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2019-04-08 17:14:35 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2019-04-08 21:14:23 +0900 |
commit | 687423b0ee6f2fc9c7c9a48fe171422c28814230 (patch) | |
tree | bb84b65941298968cf0a4226b2bffeceb30145ef /src/android/net/util/NetworkStackUtils.java | |
parent | 2c08f1023991f4707fab19c3647cdb68fbcc06d9 (diff) |
Don't leak captive portal broadcast receivers.
Since aosp/937885, mLaunchCaptivePortalAppBroadcastReceiver is
nulled out, but not unregistered, when exiting MaybeNotifyState.
This causes the BroadcastReceiver to be leaked because it is no
longer unregistered when processing CMD_NETWORK_DISCONNECTED.
Fix this by unregistering the receiver in MaybeNotifyState#exit.
Also remove the unregister call in CMD_NETWORK_DISCONNECTED: it
is no longer necessary, because StateMachine, before quitting,
will call the exit method of the current state and all its
parent states.
Bug: 122164725
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I447b3cfd3821dda19482ed962dd59ec61fc5fc9b
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
0 files changed, 0 insertions, 0 deletions