diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2019-04-08 21:35:03 -0700 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2019-04-09 06:26:23 +0000 |
commit | e7ec703aa070dfac2f0e3cfc9d9f411afa1418aa (patch) | |
tree | a2cca4f3f7624e9d03f4c3c1f7fd69ea5719c146 /src/android/net/util/NetworkStackUtils.java | |
parent | cfdcd8beb0c649c39f3235b08a47b9cb3026b87b (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
Merged-In: I1db24fe05ada8b3a37a9a60aa568b6153bf51ad8
(cherry picked from commit 3a1c0ad3eee7830d808106649052dd7430e34f92)
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
0 files changed, 0 insertions, 0 deletions