title: get realPath return null on android marshmallow?
body: <p>I am using this function to get the image path from uri:</p>
  
  <pre><code> private static String getRealPathFromURI(Context context, Uri contentUri) {
          Cursor cursor = null;
          try {
              String[] proj = {MediaStore.Images.Media.DATA};
              cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
              int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
              cursor.moveToFirst();
              return cursor.getString(column_index);
          } finally {
              if (cursor != null) {
                  cursor.close();
              }
          }
      }
  </code></pre>
  
  <p>the above function works fine with version &lt; 23 . but it return null with android marshmallow ? </p>
  
  <pre><code>I am using emulator nexus 4 with android 6.0 x86_64
  </code></pre>
  
  <p>the emulator has storage permissions.</p>
  
  <p>what may be the problem ?</p>