Lines Matching defs:cursor

118                     null, // cursor
171 // close its cursor, which we do by assigning a null cursor to it. Doing this
172 // instead of closing the cursor directly keeps the framework from accessing
173 // the closed cursor later.
269 intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/track");
300 Cursor cursor;
307 cursor = MusicUtils.query(this, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
311 if (cursor != null) {
312 MusicUtils.shuffleAll(this, cursor);
313 cursor.close();
583 protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
585 mActivity.init(cursor);
590 Cursor cursor, int glayout, String[] gfrom, int[] gto,
592 super(context, cursor, glayout, gfrom, gto, clayout, cfrom, cto);
604 getColumnIndices(cursor);
611 private void getColumnIndices(Cursor cursor) {
612 if (cursor != null) {
613 mGroupArtistIdIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Artists._ID);
614 mGroupArtistIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Artists.ARTIST);
615 mGroupAlbumIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Artists.NUMBER_OF_ALBUMS);
616 mGroupSongIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Artists.NUMBER_OF_TRACKS);
618 mIndexer.setCursor(cursor);
620 mIndexer = new MusicAlphabetIndexer(cursor, mGroupArtistIdx,
635 public View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) {
636 View v = super.newGroupView(context, cursor, isExpanded, parent);
652 public View newChildView(Context context, Cursor cursor, boolean isLastChild,
654 View v = super.newChildView(context, cursor, isLastChild, parent);
667 public void bindGroupView(View view, Context context, Cursor cursor, boolean isexpanded) {
671 String artist = cursor.getString(mGroupArtistIdx);
679 int numalbums = cursor.getInt(mGroupAlbumIdx);
680 int numsongs = cursor.getInt(mGroupSongIdx);
688 long artistid = cursor.getLong(mGroupArtistIdIdx);
697 public void bindChildView(View view, Context context, Cursor cursor, boolean islast) {
701 String name = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ALBUM));
709 int numsongs = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.NUMBER_OF_SONGS));
710 int numartistsongs = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.NUMBER_OF_SONGS_FOR_ARTIST));
729 args[2] = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Artists.ARTIST));
738 String art = cursor.getString(cursor.getColumnIndexOrThrow(
744 long artIndex = cursor.getLong(0);
750 long aid = cursor.getLong(0);
821 public void changeCursor(Cursor cursor) {
822 if (mActivity.isFinishing() && cursor != null) {
823 cursor.close();
824 cursor = null;
826 if (cursor != mActivity.mArtistCursor) {
827 mActivity.mArtistCursor = cursor;
828 getColumnIndices(cursor);
829 super.changeCursor(cursor);