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

Commit f445f2e6 authored by Sindhu B's avatar Sindhu B Committed by Android (Google) Code Review
Browse files

Merge "Fix: Remove the updateListeners from QSIconViewImpl.java which was...

Merge "Fix: Remove the updateListeners from QSIconViewImpl.java which was causing memory leak in the SystemUI process." into main
parents 8702e554 3a51f31f
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1195,6 +1195,16 @@ flag {
  bug: "352600066"
}

flag {
   namespace: "systemui"
   name: "remove_update_listener_in_qs_icon_view_impl"
   description: "Remove update listeners in QsIconViewImpl class to avoid memory leak."
   bug: "327078684"
   metadata {
       purpose: PURPOSE_BUGFIX
   }
}

flag {
   name: "sim_pin_race_condition_on_restart"
   namespace: "systemui"
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@

package com.android.systemui.qs.tileimpl;

import static com.android.systemui.Flags.removeUpdateListenerInQsIconViewImpl;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ArgbEvaluator;
@@ -204,6 +206,9 @@ public class QSIconViewImpl extends QSIconView {
            values.setEvaluator(ArgbEvaluator.getInstance());
            mColorAnimator.setValues(values);
            mColorAnimator.removeAllListeners();
            if (removeUpdateListenerInQsIconViewImpl()) {
                mColorAnimator.removeAllUpdateListeners();
            }
            mColorAnimator.addUpdateListener(animation -> {
                setTint(iv, (int) animation.getAnimatedValue());
            });