title: Android: getContext().getContentResolver() sometimes gets NullPointerException
body: <p>I want to ask why we get this annotation:</p>
  
  <blockquote>
    <p>Method invocation getContext.getContentResolver() may produce
    NullPointerException</p>
  </blockquote>
  
  <p>Why is it there and not in other parts of program Fragment/Activity? That approach has been used in tutorial made by Google - here is link for ContentProvider code <a href="https://github.com/udacity/Sunshine-Version-2/blob/sunshine_master/app/src/main/java/com/example/android/sunshine/app/data/WeatherProvider.java" rel="noreferrer">https://github.com/udacity/Sunshine-Version-2/blob/sunshine_master/app/src/main/java/com/example/android/sunshine/app/data/WeatherProvider.java</a> even if you create an aplication with just a blank activity and put that method in a newly created ContentProvider it is there. </p>
  
  <p>Should we use <code>getContext().getContentResolver().notifyChange(uri, null);</code>outside ContentProvider getting the uri passed and then after the update/insert/delete is finished notifyChange? or maybe we can fix it somehow?</p>