Merge "ImageWriter: always detach the origially attached buffer" into rvc-dev am: baa0a1faa3 am: 01045bfcdf am: 0365aa98fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11988333

Change-Id: I320fe599b0099cac1b8c2a3aaffcbbd93bcb2d9e