package com.google.android.material.appbar;

import android.view.View;
import c.f.l.t;

/* JADX INFO: compiled from: ViewOffsetHelper.java */
/* JADX INFO: loaded from: classes.dex */
class d {
    private final View a;

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

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

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

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

    public d(View view) {
        this.a = view;
    }

    private void e() {
        View view = this.a;
        t.N(view, this.f1716d - (view.getTop() - this.f1714b));
        View view2 = this.a;
        t.M(view2, this.f1717e - (view2.getLeft() - this.f1715c));
    }

    public int a() {
        return this.f1716d;
    }

    public void b() {
        this.f1714b = this.a.getTop();
        this.f1715c = this.a.getLeft();
        e();
    }

    public boolean c(int i2) {
        if (this.f1717e == i2) {
            return false;
        }
        this.f1717e = i2;
        e();
        return true;
    }

    public boolean d(int i2) {
        if (this.f1716d == i2) {
            return false;
        }
        this.f1716d = i2;
        e();
        return true;
    }
}
