package com.google.android.material.timepicker;

import android.view.ViewTreeObserver;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class b implements ViewTreeObserver.OnPreDrawListener {
    public final /* synthetic */ ClockFaceView l;

    public b(ClockFaceView clockFaceView) {
        this.l = clockFaceView;
    }

    @Override // android.view.ViewTreeObserver.OnPreDrawListener
    public final boolean onPreDraw() {
        ClockFaceView clockFaceView = this.l;
        if (!clockFaceView.isShown()) {
            return true;
        }
        clockFaceView.getViewTreeObserver().removeOnPreDrawListener(this);
        int height = ((clockFaceView.getHeight() / 2) - clockFaceView.E.f31o) - clockFaceView.M;
        if (height != clockFaceView.C) {
            clockFaceView.C = height;
            clockFaceView.m();
            ClockHandView clockHandView = clockFaceView.E;
            clockHandView.w = clockFaceView.C;
            clockHandView.invalidate();
        }
        return true;
    }
}
