package xyz.stream.view.input;

import android.view.View;
import android.view.inputmethod.InputMethodManager;
import com.google.android.gms.measurement.internal.u1;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class d implements Runnable {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ InputView f36531b;

    public /* synthetic */ d(InputView inputView, int i10) {
        this.f36530a = i10;
        this.f36531b = inputView;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f36530a;
        InputView inputView = this.f36531b;
        switch (i10) {
            case 0:
                View viewD = u1.d(inputView.f36512d.inputGrid, 0);
                if (viewD != null) {
                    viewD.requestFocus();
                }
                break;
            default:
                inputView.f36512d.inputPreview.setFocusable(true);
                inputView.f36512d.inputPreview.setFocusableInTouchMode(true);
                inputView.f36512d.inputPreview.requestFocus();
                InputMethodManager inputMethodManager = (InputMethodManager) inputView.getContext().getSystemService("input_method");
                if (inputMethodManager != null) {
                    inputMethodManager.showSoftInput(inputView.f36512d.inputPreview, 1);
                }
                break;
        }
    }
}
