code: private void changeCursor(@Nullable Cursor newCursor) {
          Cursor oldCursor = mCursor;
          if (mCursor != newCursor) {
              int oldSize = 0;
              int deltaSize = 0;
              if (oldCursor != null) {
                  int oldCount = oldCursor.getCount();
                  oldSize = oldCount;
                  deltaSize -= oldCount;
                  oldCursor.close();
              }
              mCursor = newCursor;
              int newSize = 0;
              if (newCursor != null) {
                  int newCount = newCursor.getCount();
                  deltaSize += newCount;
                  newSize = newCount;
              }
              updateCursorObserver();
              int changed = min(oldSize, newSize);
              if (changed > 0) {
                  notifyItemRangeChanged(0, changed);
              }
              if (deltaSize < 0) {
                  notifyItemRangeRemoved(oldSize + deltaSize, abs(deltaSize));
              } else if (deltaSize > 0) {
                  notifyItemRangeInserted(oldSize, abs(deltaSize));
              }
          }
      }
docs: Switches to the specified cursor, notifying observers of changes as necessary.