package androidx.appcompat.app;

import android.R;
import android.content.Context;
import android.database.Cursor;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckedTextView;
import android.widget.CursorAdapter;
import androidx.appcompat.app.AlertController;

/* JADX INFO: loaded from: classes.dex */
class b extends CursorAdapter {
    public final int a;
    public final int b;
    public final /* synthetic */ AlertController.RecycleListView c;
    public final /* synthetic */ AlertController d;
    public final /* synthetic */ AlertController.b e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public b(AlertController.b bVar, ContextThemeWrapper contextThemeWrapper, Cursor cursor, AlertController.RecycleListView recycleListView, AlertController alertController) {
        super((Context) contextThemeWrapper, cursor, false);
        this.e = bVar;
        this.c = recycleListView;
        this.d = alertController;
        Cursor cursor2 = getCursor();
        this.a = cursor2.getColumnIndexOrThrow(bVar.ak);
        this.b = cursor2.getColumnIndexOrThrow(bVar.al);
    }

    @Override // android.widget.CursorAdapter
    public final void bindView(View view, Context context, Cursor cursor) {
        ((CheckedTextView) view.findViewById(R.id.text1)).setText(cursor.getString(this.a));
        this.c.setItemChecked(cursor.getPosition(), cursor.getInt(this.b) == 1);
    }

    @Override // android.widget.CursorAdapter
    public final View newView(Context context, Cursor cursor, ViewGroup viewGroup) {
        return this.e.b.inflate(this.d.al, viewGroup, false);
    }
}
