ev.java 1.67 KB
import android.database.Cursor;
import android.widget.Filter;
import android.widget.Filter.FilterResults;

public final class ev
  extends Filter
{
  ev.a a;
  
  public ev(ev.a parama)
  {
    this.a = parama;
  }
  
  public final CharSequence convertResultToString(Object paramObject)
  {
    return this.a.convertToString((Cursor)paramObject);
  }
  
  protected final Filter.FilterResults performFiltering(CharSequence paramCharSequence)
  {
    paramCharSequence = this.a.runQueryOnBackgroundThread(paramCharSequence);
    Filter.FilterResults localFilterResults = new Filter.FilterResults();
    if (paramCharSequence != null)
    {
      localFilterResults.count = paramCharSequence.getCount();
      localFilterResults.values = paramCharSequence;
      return localFilterResults;
    }
    localFilterResults.count = 0;
    localFilterResults.values = null;
    return localFilterResults;
  }
  
  protected final void publishResults(CharSequence paramCharSequence, Filter.FilterResults paramFilterResults)
  {
    paramCharSequence = this.a.getCursor();
    if ((paramFilterResults.values != null) && (paramFilterResults.values != paramCharSequence)) {
      this.a.changeCursor((Cursor)paramFilterResults.values);
    }
  }
  
  public static abstract interface a
  {
    public abstract void changeCursor(Cursor paramCursor);
    
    public abstract CharSequence convertToString(Cursor paramCursor);
    
    public abstract Cursor getCursor();
    
    public abstract Cursor runQueryOnBackgroundThread(CharSequence paramCharSequence);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/ev.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */