title: Bitmap not setting in imageView random issue
body: <p>I am trying to fetch file from device storage and showing it in image view .
  Sometimes it is working perfectly fine, but sometimes not. Although bitmap is there but image view remains black.</p>
  <p>Kindly suggest.</p>
  <h1>storage file Location</h1>
  <pre><code> file:/storage/emulated/0/Download/Full-hd-nature-wallpapers-free-download2.jpg
  </code></pre>
  <h1>method which is returning bitmap</h1>
  <p>public static Bitmap convertToBitmap(File file) {</p>
  <pre><code>    URI uri = null;
      try {
            uri = file.toURI();            
         BitmapFactory.Options options = new BitmapFactory.Options();            
          options.inSampleSize = 1;            
          Bitmap bmp = BitmapFactory.decodeStream(uri.toURL().openStream(), new Rect(), options);
  
         //bmp.recycle();
          return bmp;
  
      } catch (Exception e) {
          return null;
      }//catch
  }
  </code></pre>
  <h1>setting image</h1>
  <pre><code>      imageViewPatientImage.setImageBitmap(convertToBitmap(new File(mImagePath));
  </code></pre>