code: private Cursor addAllMediaBucketItem(@Nullable Cursor cursor) {
          if (cursor == null || !cursor.moveToPosition(0)) {
              return null;
          }
          ensureActivityAttached();
          long id = ALL_MEDIA_BUCKET_ID;
          String label = mActivity.getString(R.string.activity_gallery_bucket_all_media);
          String data = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));
          MatrixCursor allMediaRow = new MatrixCursor(BUCKET_PROJECTION);
          allMediaRow.newRow()
                  .add(id)
                  .add(label)
                  .add(data);
          return new MergeCursor(new Cursor[]{allMediaRow, cursor});
      }
docs: Add "All Media" item as the first row of bucket items.
  
  @param cursor The original data of all bucket items
  @return The data with "All Media" item added