From 539d1ab151a62750b1f53f6c009c461ff51c7d41 Mon Sep 17 00:00:00 2001 From: Fengjiang Li Date: Wed, 11 Jun 2025 12:59:40 -0700 Subject: [PATCH] [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 --- .../android/launcher3/taskbar/NavbarButtonsViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index e70e59d655..64b53c51c9 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -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();