In certain situations setImageURI() opens an InputStream but doesn't close it. Here is a workaround:
InputStream is = null;
try {
if(uri != null) {
is = getContentResolver().openInputStream(uri);
Drawable d = Drawable.createFromStream(is, null);
imageView.setImageDrawable(d);
}
} catch(Exception e) {
Log.e(TAG, "Unable to set ImageView from URI: " + e.toString());
} finally {
org.apache.commons.io.IOUtils.closeQuietly(is);
}