package o;

import android.view.MotionEvent;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class T5 extends AbstractC0706aK implements OC {
    public final /* synthetic */ int m;
    public final /* synthetic */ Tj0 n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ T5(Tj0 tj0, int i) {
        super(1);
        this.m = i;
        this.n = tj0;
    }

    @Override // o.OC
    public final Object g(Object obj) {
        boolean zDispatchTouchEvent;
        switch (this.m) {
            case 0:
                InterfaceC1577jV interfaceC1577jV = (InterfaceC1577jV) obj;
                C2207q3 c2207q3 = interfaceC1577jV instanceof C2207q3 ? (C2207q3) interfaceC1577jV : null;
                Tj0 tj0 = this.n;
                if (c2207q3 != null) {
                    c2207q3.getAndroidViewsHandler$ui_release().removeViewInLayout(tj0);
                    AbstractC1692kh0.j(c2207q3.getAndroidViewsHandler$ui_release().getLayoutNodeToHolder()).remove(c2207q3.getAndroidViewsHandler$ui_release().getHolderToLayoutNode().remove(tj0));
                    tj0.setImportantForAccessibility(0);
                }
                tj0.removeAllViewsInLayout();
                return Oh0.a;
            default:
                MotionEvent motionEvent = (MotionEvent) obj;
                int actionMasked = motionEvent.getActionMasked();
                Tj0 tj02 = this.n;
                switch (actionMasked) {
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                        zDispatchTouchEvent = tj02.dispatchTouchEvent(motionEvent);
                        break;
                    default:
                        zDispatchTouchEvent = tj02.dispatchGenericMotionEvent(motionEvent);
                        break;
                }
                return Boolean.valueOf(zDispatchTouchEvent);
        }
    }
}
