Cancel TASKBAR_COLLAPSE/EXPAND CUJ tracking when the stash animation is cancelled
Bug: 362713428 Test: manual Flag: EXEMPT bugfix Change-Id: Ib09a26056ed0d4bae64566eed92279241dd84a90
This commit is contained in:
@@ -62,6 +62,7 @@ import com.android.launcher3.Alarm;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.anim.AnimatedFloat;
|
||||
import com.android.launcher3.anim.AnimationSuccessListener;
|
||||
import com.android.launcher3.anim.AnimatorListeners;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
|
||||
@@ -968,7 +969,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
}
|
||||
int action = expanding ? InteractionJankMonitor.CUJ_TASKBAR_EXPAND :
|
||||
InteractionJankMonitor.CUJ_TASKBAR_COLLAPSE;
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
animator.addListener(new AnimationSuccessListener() {
|
||||
@Override
|
||||
public void onAnimationStart(@NonNull Animator animation) {
|
||||
final Configuration.Builder builder =
|
||||
@@ -980,9 +981,16 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(@NonNull Animator animation) {
|
||||
public void onAnimationSuccess(@NonNull Animator animator) {
|
||||
InteractionJankMonitor.getInstance().end(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(@NonNull Animator animation) {
|
||||
super.onAnimationCancel(animation);
|
||||
|
||||
InteractionJankMonitor.getInstance().cancel(action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user