code: public static boolean compareCursors(Cursor c1, Cursor c2) {
          if (c1 == null || c2 == null) {
              return false;
          }
  
          int numColumns = c1.getColumnCount();
          if (numColumns != c2.getColumnCount()) {
              return false;
          }
  
          if (c1.getCount() != c2.getCount()) {
              return false;
          }
  
          c1.moveToPosition(-1);
          c2.moveToPosition(-1);
          while (c1.moveToNext() && c2.moveToNext()) {
              for (int i = 0; i < numColumns; i++) {
                  if (!TextUtils.equals(c1.getString(i), c2.getString(i))) {
                      return false;
                  }
              }
          }
  
          return true;
      }
docs: Compares two cursors to see if they contain the same data.
  
  @return Returns true of the cursors contain the same data and are not
  null, false otherwise