title: getApplicationEnabledSetting(pkgName) got NullPointException error
body: <p>When I use these Method In Intellij IDE(<code>Android Studio</code>), I got these info:
  Method invocation <code>mContext.getPackageManager().getApplicationEnabledSetting(pkgName)</code> may produce <code>java.lang.NullPointerException</code> less... (<code>Ctrl+F1</code>) 
  This inspection reports those conditions in the specified inspection scope that are always true or false, as well as points out where a RuntimeException may be thrown, based on data flow analysis of the code. This inspection also reports Nullable/NotNull contract violations. Annotations to support the contract can be configured (by default @Nullable/@NotNull annotations from annotations.jar will be used)</p>
  
  <p>But only IllegalArgumentException describled in <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#getApplicationEnabledSetting%28java.lang.String%29" rel="nofollow">dev api</a></p>
  
  <p>The question is: <strong>What condition that I will get NULLPOINTEXCEPTION?</strong></p>
  
  <p>I got a simple test Example app,Just use thes method on create()</p>
  
  <pre><code> @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
           int testint= this.getPackageManager().getApplicationEnabledSetting("com.android.mms");//NullPointException
      }
  </code></pre>
  
  <p>Unfortune NullPointException happended. The packageName is Message App,not original
  google's app,modified.
  Thanks</p>