title: Failed to create thumbnail, removing original
body: <p>I'm trying to take a picture with the built-in camera application.
  When I take pic with the normal cam, everything ok.
  But When I take pic with the "selfie cam", I get this error : </p>
  
  <pre><code> Failed to create thumbnail, removing original
   java.lang.NullPointerException
  at android.provider.MediaStore$Images$Media.insertImage(MediaStore.java:836)
  at com.spg.movil.util.ImageUtils.saveImageToExternalCacheStorage(ImageUtils.java:94)
  at com.spg.movil.RutaActivity$SavePic.doInBackground(RutaActivity.java:841)
  at com.spg.movil.RutaActivity$SavePic.doInBackground(RutaActivity.java:1)
  at android.os.AsyncTask$2.call(AsyncTask.java:287)
  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
  at java.lang.Thread.run(Thread.java:841)
  </code></pre>
  
  <p>The line which get a NPE is: </p>
  
  <pre><code>            MediaStore.Images.Media.insertImage(context.getContentResolver(),                   (String)file.getAbsolutePath(), file.getName(), file.getName());
  </code></pre>
  
  <p>I debugged and none of the parameters are null...</p>
  
  <p>When I debug, in MediaStore.class, I see code entering into :</p>
  
  <pre><code>public static final String insertImage(ContentResolver cr, Bitmap source,
                                                 String title, String description)
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>public static final String insertImage(ContentResolver cr, String imagePath,
                  String name, String description)
  </code></pre>
  
  <p>I tried to cast the second parameter to string, but it still enter in the method with bad signature...</p>
  
  <p>Any idea???</p>