From d1274eb549a37fbf32a534e1b5bfc43267669383 Mon Sep 17 00:00:00 2001 From: d34d Date: Tue, 13 Sep 2016 10:44:14 -0700 Subject: SysUI: Don't set panel bar to null and avoid NPEs This patch removes the onDetachedFromWindow method introduced in change Ieaec759e4378a9a7701e6fba46ed33464caaee0a. It is not necessary to set the panel bar to null in the PanelViews or the PanelHolder in order for these objects to be GC'ed when recreating the status bar after a theme change or a user switch. Change-Id: I67f1e8289d04df2f5daefdb206030d7f0404d714 TICKET: HAM-1551 --- .../src/com/android/systemui/statusbar/phone/PanelBar.java | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index 82b1e1d..e1a400d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -146,16 +146,6 @@ public abstract class PanelBar extends FrameLayout { return result; } - @Override - protected void onDetachedFromWindow() { - super.onDetachedFromWindow(); - for (PanelView pv : mPanels) { - pv.setBar(null); - } - mPanels.clear(); - mPanelHolder.setBar(null); - } - // called from PanelView when self-expanding, too public void startOpeningPanel(PanelView panel) { if (DEBUG) LOG("startOpeningPanel: " + panel); -- cgit v1.1