title: FileProvider crash - npe attempting to invoke XmlResourceParser on a null String
body: <p>This is a part of my manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.asd"
      android:versionCode="118"
      android:versionName="118" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="14"
          android:targetSdkVersion="19" /&gt;
  
  
      &lt;application
          android:name="com.example.asd.AsdApplication"
          android:allowBackup="true"
          android:allowTaskReparenting="true"
          android:theme="@style/AsdTheme" &gt;
          ...
  
          &lt;provider
              android:name="com.example.asd.database.hq.ContentProviderDB"
              android:authorities="ourContentProviderAuthorities" &gt;
          &lt;/provider&gt;
          &lt;provider
              android:name="android.support.v4.content.FileProvider"
              android:authorities="com.example.asd.fileprovider"
              android:exported="false"
              android:grantUriPermissions="true"&gt;
              &lt;meta-data
                  android:name="android.support.FILE_PROVIDER_PATHS"
                  android:resource="@xml/filepaths" /&gt;
          &lt;/provider&gt;
  
         ...
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>This is the filepaths file in raw/xml/filepaths.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;files-path name="media"/&gt;
  &lt;/paths&gt;
  </code></pre>
  
  <p>I download a video from internet and save it to internal storage this way:</p>
  
  <pre><code>public static boolean saveInputStreamToInternalStorageFile(Context context, String filename, byte[] dataToWrite, Context ctx) {
      FileOutputStream fos;
      try {
          fos = new FileOutputStream(context.getFilesDir() + File.separator + filename);
  
          ObjectOutputStream oos = new ObjectOutputStream(fos);
          oos.writeObject(dataToWrite);
          oos.close();
          return true;
      } catch (FileNotFoundException e) {
          e.printStackTrace();
          return false;
      } catch (IOException e) {
          e.printStackTrace();
          return false;
      }
  }
  </code></pre>
  
  <p>I try to use it like so:</p>
  
  <pre><code>private void playVideoFromDeviceWithWorkaround(String fileName) {
  
      File newFile = new File(getFilesDir(), fileName);
      Uri contentUri = FileProvider.getUriForFile(getApplicationContext(), "com.example.asd", newFile);
  
      try {
          vvVideoFullscreen.setVideoURI(contentUri);
          showMediaControls = true;
          playVideo();
      } catch (Exception e) {
          playVideoFromNetwork();
      }
  
  }
  </code></pre>
  
  <p>At this line:</p>
  
  <pre><code>Uri contentUri = FileProvider.getUriForFile(getApplicationContext(), "com.example.asd", newFile); 
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
  at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:560)
  at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:534)
  at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:376)
  </code></pre>