package androidx.leanback.widget;

import android.transition.Scene;
import android.transition.Transition;
import android.transition.TransitionManager;
import android.view.View;
import android.view.ViewGroup;
import androidx.leanback.widget.BrowseFrameLayout;
import com.strmr.ps.R;
import defpackage.ju9;

/* JADX INFO: loaded from: classes.dex */
public class m0 {
    public final ViewGroup a;
    public final View b;
    public final Transition c;
    public final Transition d;
    public final Scene e;
    public final Scene f;
    public final BrowseFrameLayout.b g = new a();

    public class a implements BrowseFrameLayout.b {
        public a() {
        }

        @Override // androidx.leanback.widget.BrowseFrameLayout.b
        public final View a(int i, View view) {
            m0 m0Var = m0.this;
            View view2 = m0Var.b;
            if (view != view2 && i == 33) {
                return view2;
            }
            int i2 = view.getLayoutDirection() == 1 ? 17 : 66;
            if (!m0Var.b.hasFocus()) {
                return null;
            }
            if (i == 130 || i == i2) {
                return m0Var.a;
            }
            return null;
        }
    }

    public m0(View view, ViewGroup viewGroup) {
        if (viewGroup == null || view == null) {
            throw new IllegalArgumentException("Views may not be null");
        }
        this.a = viewGroup;
        this.b = view;
        this.c = ju9.e(viewGroup.getContext(), R.transition.lb_title_out);
        this.d = ju9.e(viewGroup.getContext(), R.transition.lb_title_in);
        this.e = ju9.c(viewGroup, new n0(this));
        this.f = ju9.c(viewGroup, new o0(this));
    }

    public final void a(boolean z) {
        if (z) {
            TransitionManager.go(this.e, this.d);
        } else {
            TransitionManager.go(this.f, this.c);
        }
    }
}
