package defpackage;

import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.view.Choreographer;
import android.view.Choreographer$VsyncCallback;

/* JADX INFO: renamed from: ᵕᵥᵗ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class ChoreographerVsyncCallbackC2344 extends AbstractC1358 implements Choreographer$VsyncCallback {

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final Handler f9205;

    public ChoreographerVsyncCallbackC2344(Choreographer choreographer, DisplayManager displayManager) {
        super(choreographer, displayManager);
        this.f9205 = AbstractC0956.m3260(null);
    }

    @Override // android.hardware.display.DisplayManager.DisplayListener
    public final void onDisplayChanged(int i) {
        if (i == 0) {
            this.f5627.postVsyncCallback(this);
        }
    }

    public final void onVsync(Choreographer.FrameData frameData) {
        this.f5628 = frameData.getFrameTimeNanos();
        Choreographer.FrameTimeline[] frameTimelines = frameData.getFrameTimelines();
        if (frameTimelines.length >= 2) {
            long expectedPresentationTimeNanos = frameTimelines[1].getExpectedPresentationTimeNanos() - frameTimelines[0].getExpectedPresentationTimeNanos();
            this.f5630 = expectedPresentationTimeNanos != 0 ? expectedPresentationTimeNanos : -9223372036854775807L;
        } else {
            this.f5630 = -9223372036854775807L;
        }
        this.f9205.postDelayed(new RunnableC4972(16, this), 500L);
    }

    @Override // defpackage.AbstractC1358
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo3148() {
        this.f5629.unregisterDisplayListener(this);
        this.f9205.removeCallbacksAndMessages(null);
        this.f5627.removeVsyncCallback(this);
        this.f5628 = -9223372036854775807L;
        this.f5630 = -9223372036854775807L;
    }

    @Override // defpackage.AbstractC1358
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo3149() {
        this.f5629.registerDisplayListener(this, AbstractC0956.m3260(null));
        this.f5627.postVsyncCallback(this);
    }
}
