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

Commit 7bba6478 authored by Bill Lin's avatar Bill Lin
Browse files

Avoid warning log from InteractionJankMonitor in VolumeDialogImpl

the two intents ACTION_CLOSE_SYSTEM_DIALOGS, ACTION_SCREEN_OFF
have a race in VolumeDialogImpl, so the JankLinster may begin
a tracing on a DialogView which has detachted from window.

Test: Manually press VolumeKey and Press power key to screen off
      InteractionJankMonitor warning log should not showing.
Bug: 232066671
Change-Id: Ic8f973372bbe1bda0f8dbab58d99269a2d766e46
parent a9cdc4a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1271,6 +1271,10 @@ public class VolumeDialogImpl implements VolumeDialog,
        return new Animator.AnimatorListener() {
            @Override
            public void onAnimationStart(@NonNull Animator animation) {
                if (!v.isAttachedToWindow()) {
                    if (D.BUG) Log.d(TAG, "onAnimationStart view do not attached to window:" + v);
                    return;
                }
                mInteractionJankMonitor.begin(Builder.withView(CUJ_VOLUME_CONTROL, v).setTag(type)
                        .setTimeout(timeout));
            }