[Memory Leak] Fix leak of rotation button view from NavbarButtonsViewController#mFloatingRotationButton

Clear mFloatingRotationButton from NavbarButtonsViewController#onDestroy()

Fix: 424253928
Test: manual - rotate screen in comet and verfiy no leaks
Flag: NONE - released code
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b693a10d6493556ef30d7011eee6804bd7890f89)
Merged-In: I43ef6bcf67e44e76eb17d80e0d996d2066f154e0
Change-Id: I43ef6bcf67e44e76eb17d80e0d996d2066f154e0
This commit is contained in:
Fengjiang Li authored and Android Build Coastguard Worker committed 2025-06-17 18:15:53 -07:00
1 parent 6f1453026e
commit 539d1ab151
1 file changed
+1 -1
@@ -1242,9 +1242,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
public void onDestroy() {
mPropertyHolders.clear();
mControllers.rotationButtonController.unregisterListeners();
if (mFloatingRotationButton != null) {
mFloatingRotationButton.hide();
mFloatingRotationButton = null;
}
moveNavButtonsBackToTaskbarWindow();