Lock gralloc buffers with SW_READ/SW_WRITE usage

EmulatedCameraDeviceSessionHwlImpl::ConfigurePipeline will default
some buffers to GRALLOC_USAGE_HW_CAMERA_[READ|WRITE].

This worked with existing Cuttlefish gralloc which ignored usage
flags and just always mmap'ed with PROT_READ|PROT_WRITE.

With upgrading Cuttlefish to Gralloc4 on Minigbm, the lack of
SW_READ|SW_WRITE will result in nothing being mmap'ed and a
nullptr will be returned from lock.

Bug: b/146515640
Test: cts -m CtsCameraTestCases
Change-Id: If308dc3037bb57becb7c44f997256ad65330c682
1 file changed
tree: 17939f769f9eb8e11a3744aa79fa2121f89f16f4
  1. common/
  2. devices/
  3. .clang-format
  4. Android.bp
  5. PREUPLOAD.cfg