Home | History | Annotate | Download | only in music

Lines Matching refs:Cursor

32 import android.database.Cursor;
169 // close its cursor, which we do by assigning a null cursor to it. Doing this
170 // instead of closing the cursor directly keeps the framework from accessing
171 // the closed cursor later.
230 public void init(Cursor c) {
408 intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/track");
431 Cursor cursor;
438 cursor = MusicUtils.query(this, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
442 if (cursor != null) {
443 MusicUtils.shuffleAll(this, cursor);
444 cursor.close();
451 private Cursor getAlbumCursor(AsyncQueryHandler async, String filter) {
460 Cursor ret = null;
523 protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
525 mActivity.init(cursor);
530 int layout, Cursor cursor, String[] from, int[] to) {
531 super(context, layout, cursor, from, to);
548 getColumnIndices(cursor);
552 private void getColumnIndices(Cursor cursor) {
553 if (cursor != null) {
554 mAlbumIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ALBUM);
555 mArtistIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ARTIST);
556 mAlbumArtIndex = cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ALBUM_ART);
559 mIndexer.setCursor(cursor);
561 mIndexer = new MusicAlphabetIndexer(cursor, mAlbumIdx, mResources.getString(
576 public View newView(Context context, Cursor cursor, ViewGroup parent) {
577 View v = super.newView(context, cursor, parent);
590 public void bindView(View view, Context context, Cursor cursor) {
594 String name = cursor.getString(mAlbumIdx);
602 name = cursor.getString(mArtistIdx);
612 String art = cursor.getString(mAlbumArtIndex);
613 long aid = cursor.getLong(0);
631 public void changeCursor(Cursor cursor) {
632 if (mActivity.isFinishing() && cursor != null) {
633 cursor.close();
634 cursor = null;
636 if (cursor != mActivity.mAlbumCursor) {
637 mActivity.mAlbumCursor = cursor;
638 getColumnIndices(cursor);
639 super.changeCursor(cursor);
644 public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
651 Cursor c = mActivity.getAlbumCursor(null, s);
670 private Cursor mAlbumCursor;