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

Commit 0abf0aeb authored by Abhisek Devkota's avatar Abhisek Devkota Committed by Gerrit Code Review
Browse files

Merge "Revert "Reduce memory leaks by removing all views."" into cm-11.0

parents 5d430a3e 63a5283a
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.
     *