package com.google.android.material.appbar;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.LinearLayout;
import androidx.annotation.Nullable;

/* JADX INFO: loaded from: classes2.dex */
public final class k extends LinearLayout.LayoutParams {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f22201a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public i f22202b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Interpolator f22203c;

    public k(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.f22201a = 1;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, x8.m.AppBarLayout_Layout);
        this.f22201a = typedArrayObtainStyledAttributes.getInt(x8.m.AppBarLayout_Layout_layout_scrollFlags, 0);
        this.f22202b = createScrollEffectFromInt(typedArrayObtainStyledAttributes.getInt(x8.m.AppBarLayout_Layout_layout_scrollEffect, 0));
        int i10 = x8.m.AppBarLayout_Layout_layout_scrollInterpolator;
        if (typedArrayObtainStyledAttributes.hasValue(i10)) {
            this.f22203c = AnimationUtils.loadInterpolator(context, typedArrayObtainStyledAttributes.getResourceId(i10, 0));
        }
        typedArrayObtainStyledAttributes.recycle();
    }

    @Nullable
    private i createScrollEffectFromInt(int i10) {
        if (i10 != 1) {
            return null;
        }
        return new j();
    }

    @Nullable
    public i getScrollEffect() {
        return this.f22202b;
    }

    public void setScrollEffect(@Nullable i iVar) {
        this.f22202b = iVar;
    }
}
