[Offline indicator v2] Fix NullPointerException
After switching themes (dark/light), the ConnectivityDetector instance would not be destroyed since it's added as an observer to the NetworkChangeNotifier singleton. This was keeping a lot of objects around and causing invalid status indicator instances to access a null activity reference through a lambda created in TabbedRootUiCoordinator. This CL adds a #destroy method to ConnectivityDetector and a call to it from OfflineIndicatorControllerV2#destroy(). Bug: 1070386 Change-Id: Iee7a9cb913fa8aa62960f602e6f45242e0cc60e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150026Reviewed-by:Jian Li <jianli@chromium.org> Reviewed-by:
Theresa <twellington@chromium.org> Commit-Queue: Sinan Sahin <sinansahin@google.com> Cr-Commit-Position: refs/heads/master@{#759357}
Showing
Please register or sign in to comment