Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63a5283a authored by Abhisek Devkota's avatar Abhisek Devkota
Browse files

Revert "Reduce memory leaks by removing all views."

This reverts commit a61cab78.

This is causing BT icon to get caught up in "all views" removal. Backing this out until Clark can look into it.

Change-Id: Ied8f45f035492ee351e6b24fa0ae88c2abfbf9ea
parent a61cab78
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -3222,7 +3222,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    private void recreateStatusBar() {
        mRecreating = true;
        mStatusBarContainer.removeAllViews();
        removeAllViews(mStatusBarWindow);

        // extract icons from the soon-to-be recreated viewgroup.
        int nIcons = mStatusIcons.getChildCount();
@@ -3269,17 +3268,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        mRecreating = false;
    }

    private void removeAllViews(ViewGroup parent) {
        int N = parent.getChildCount();
        for (int i = 0; i < N; i++) {
            View child = parent.getChildAt(i);
            if (child instanceof ViewGroup) {
                removeAllViews((ViewGroup) child);
            }
        }
        parent.removeAllViews();
    }

    /**
     * Reload some of our resources when the configuration changes.
     *