54 lines
1.5 KiB
Java
54 lines
1.5 KiB
Java
package o;
|
|
|
|
import android.database.Cursor;
|
|
import android.widget.Filter;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class yQj extends Filter {
|
|
private LWm a;
|
|
|
|
/* loaded from: classes.dex */
|
|
interface LWm {
|
|
void wQ_(Cursor cursor);
|
|
|
|
CharSequence wR_(Cursor cursor);
|
|
|
|
Cursor wS_();
|
|
|
|
Cursor wT_(CharSequence charSequence);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public yQj(LWm lWm) {
|
|
this.a = lWm;
|
|
}
|
|
|
|
@Override // android.widget.Filter
|
|
public final CharSequence convertResultToString(Object obj) {
|
|
return this.a.wR_((Cursor) obj);
|
|
}
|
|
|
|
@Override // android.widget.Filter
|
|
protected final Filter.FilterResults performFiltering(CharSequence charSequence) {
|
|
Cursor wT_ = this.a.wT_(charSequence);
|
|
Filter.FilterResults filterResults = new Filter.FilterResults();
|
|
if (wT_ != null) {
|
|
filterResults.count = wT_.getCount();
|
|
filterResults.values = wT_;
|
|
} else {
|
|
filterResults.count = 0;
|
|
filterResults.values = null;
|
|
}
|
|
return filterResults;
|
|
}
|
|
|
|
@Override // android.widget.Filter
|
|
protected final void publishResults(CharSequence charSequence, Filter.FilterResults filterResults) {
|
|
Cursor wS_ = this.a.wS_();
|
|
if (filterResults.values == null || filterResults.values == wS_) {
|
|
return;
|
|
}
|
|
this.a.wQ_((Cursor) filterResults.values);
|
|
}
|
|
}
|