title: contentResolver returns null
body: <p>Instead of using direct query to db im using contentResolver but it returns null. And i dont know do i need to add some code or there is a mistake in mine.</p>
  
  <pre><code>private void displayDatabaseInfo() {
      // Define a projection that specifies which columns from the database
      // you will actually use after this query.
      String[] projection = {
              PetEntry._ID,
              PetEntry.COLUMN_PET_NAME,
              PetEntry.COLUMN_PET_BREED,
              PetEntry.COLUMN_PET_GENDER,
              PetEntry.COLUMN_PET_WEIGHT };
  
      // Perform a query on the provider using the ContentResolver.
      // Use the {@link PetEntry#CONTENT_URI} to access the pet data.
      Cursor cursor = getContentResolver().query(
              PetEntry.CONTENT_URI,   // The content URI of the words table
              projection,             // The columns to return for each row
              null,                   // Selection criteria
              null,                   // Selection criteria
              null);                  // The sort order for the returned rows
  
      Log.v(LOG_TAG, "Проверка курсора " + cursor);
  
  
  
      TextView displayView = (TextView) findViewById(R.id.text_view_pet);
  
      if (cursor != null){
      try {
  
  
              // Create a header in the Text View that looks like this:
              //
              // The pets table contains &lt;number of rows in Cursor&gt; pets.
              // _id - name - breed - gender - weight
              //
              // In the while loop below, iterate through the rows of the cursor and display
              // the information from each column in this order.
              displayView.setText("The pets table contains " + cursor.getCount() + " pets.\n\n");
              displayView.append(PetEntry._ID + " - " +
                      PetEntry.COLUMN_PET_NAME + " - " +
                      PetEntry.COLUMN_PET_BREED + " - " +
                      PetEntry.COLUMN_PET_GENDER + " - " +
                      PetEntry.COLUMN_PET_WEIGHT + "\n");
  
              // Figure out the index of each column
              int idColumnIndex = cursor.getColumnIndex(PetEntry._ID);
              int nameColumnIndex = cursor.getColumnIndex(PetEntry.COLUMN_PET_NAME);
              int breedColumnIndex = cursor.getColumnIndex(PetEntry.COLUMN_PET_BREED);
              int genderColumnIndex = cursor.getColumnIndex(PetEntry.COLUMN_PET_GENDER);
              int weightColumnIndex = cursor.getColumnIndex(PetEntry.COLUMN_PET_WEIGHT);
  
              // Iterate through all the returned rows in the cursor
              while (cursor.moveToNext()) {
                  // Use that index to extract the String or Int value of the word
                  // at the current row the cursor is on.
                  int currentID = cursor.getInt(idColumnIndex);
                  String currentName = cursor.getString(nameColumnIndex);
                  String currentBreed = cursor.getString(breedColumnIndex);
                  int currentGender = cursor.getInt(genderColumnIndex);
                  int currentWeight = cursor.getInt(weightColumnIndex);
                  // Display the values from each column of the current row in the cursor in the TextView
                  displayView.append(("\n" + currentID + " - " +
                          currentName + " - " +
                          currentBreed + " - " +
                          currentGender + " - " +
                          currentWeight));
              }
  
      } finally {
          // Always close the cursor when you're done reading from it. This releases all its
          // resources and makes it invalid.
          cursor.close();
      }
      }
  }
  </code></pre>
  
  <p>Before that i got an error null exception. After added if/else statement exceptions dissapeared but anyway it doesnt work and returns null</p>