Added methods for searching descriptions to feedmanager
This commit is contained in:
parent
50b02ff77e
commit
0ffc18be1a
|
@ -1344,6 +1344,38 @@ public class FeedManager {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void searchFeedItemDescription(final Context context,
|
||||||
|
final Feed feed, final String query,
|
||||||
|
FeedManager.TaskCallback callback) {
|
||||||
|
dbExec.execute(new FeedManager.Task(new Handler(), callback) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||||
|
adapter.open();
|
||||||
|
Cursor searchResult = adapter.searchItemDescriptions(feed, query);
|
||||||
|
setResult(searchResult);
|
||||||
|
adapter.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchFeedItemContentEncoded(final Context context,
|
||||||
|
final Feed feed, final String query,
|
||||||
|
FeedManager.TaskCallback callback) {
|
||||||
|
dbExec.execute(new FeedManager.Task(new Handler(), callback) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||||
|
adapter.open();
|
||||||
|
Cursor searchResult = adapter.searchItemContentEncoded(feed, query);
|
||||||
|
setResult(searchResult);
|
||||||
|
adapter.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public List<Feed> getFeeds() {
|
public List<Feed> getFeeds() {
|
||||||
return feeds;
|
return feeds;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue