package X6FRs_4.FSaI4_7.KQgRr5e_0;

import android.database.Cursor;
import android.widget.Filter;
/* compiled from: CursorFilter.java */
/* loaded from: classes.dex */
public class QxJ9d_1 extends Filter {
    public KQgRr5e_0 KQgRr5e_0;

    /* compiled from: CursorFilter.java */
    /* loaded from: classes.dex */
    public interface KQgRr5e_0 {
        Cursor KQgRr5e_0();

        Cursor KQgRr5e_0(CharSequence charSequence);

        CharSequence KQgRr5e_0(Cursor cursor);

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        void m211KQgRr5e_0(Cursor cursor);
    }

    public QxJ9d_1(KQgRr5e_0 kQgRr5e_0) {
        this.KQgRr5e_0 = kQgRr5e_0;
    }

    @Override // android.widget.Filter
    public CharSequence convertResultToString(Object obj) {
        return this.KQgRr5e_0.KQgRr5e_0((Cursor) obj);
    }

    @Override // android.widget.Filter
    public Filter.FilterResults performFiltering(CharSequence charSequence) {
        Cursor KQgRr5e_02 = this.KQgRr5e_0.KQgRr5e_0(charSequence);
        Filter.FilterResults filterResults = new Filter.FilterResults();
        if (KQgRr5e_02 != null) {
            filterResults.count = KQgRr5e_02.getCount();
            filterResults.values = KQgRr5e_02;
        } else {
            filterResults.count = 0;
            filterResults.values = null;
        }
        return filterResults;
    }

    @Override // android.widget.Filter
    public void publishResults(CharSequence charSequence, Filter.FilterResults filterResults) {
        Cursor KQgRr5e_02 = this.KQgRr5e_0.KQgRr5e_0();
        Object obj = filterResults.values;
        if (obj == null || obj == KQgRr5e_02) {
            return;
        }
        this.KQgRr5e_0.m211KQgRr5e_0((Cursor) obj);
    }
}
