package com.google.android.material.appbar;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import androidx.coordinatorlayout.widget.CoordinatorLayout;

/* JADX INFO: compiled from: ViewOffsetBehavior.java */
/* JADX INFO: loaded from: classes.dex */
class c<V extends View> extends CoordinatorLayout.c<V> {
    private d a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private int f1712b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private int f1713c;

    public c() {
        this.f1712b = 0;
        this.f1713c = 0;
    }

    public int D() {
        d dVar = this.a;
        if (dVar != null) {
            return dVar.a();
        }
        return 0;
    }

    protected void E(CoordinatorLayout coordinatorLayout, V v, int i2) {
        coordinatorLayout.I(v, i2);
    }

    public boolean F(int i2) {
        d dVar = this.a;
        if (dVar != null) {
            return dVar.d(i2);
        }
        this.f1712b = i2;
        return false;
    }

    @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.c
    public boolean l(CoordinatorLayout coordinatorLayout, V v, int i2) {
        E(coordinatorLayout, v, i2);
        if (this.a == null) {
            this.a = new d(v);
        }
        this.a.b();
        int i3 = this.f1712b;
        if (i3 != 0) {
            this.a.d(i3);
            this.f1712b = 0;
        }
        int i4 = this.f1713c;
        if (i4 == 0) {
            return true;
        }
        this.a.c(i4);
        this.f1713c = 0;
        return true;
    }

    public c(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.f1712b = 0;
        this.f1713c = 0;
    }
}
