Resolve wait timeout in ResultDispatcher::NotifyCallbackThreadLoop

ResultDispatcher::NotifyCallbackThreadLoop wait event after event
is notified and then cause wait timeout. Patch code to check notified flag before wait.

Bug: 192460320
Bug: 192536631

Test: 1. Test basic photo shot and front/rear camera switch function
correctly. And check there is not long idle time in CLOSE stage
      2. P21 Camera Test Checklist & CTS test pass

Change-Id: Ib503bfec73a85df35368fd997a5cc835cd99c583
2 files changed
tree: 2d25e3531cb46af58da650702e39800b001cf709
  1. common/
  2. devices/
  3. .clang-format
  4. Android.bp
  5. METADATA
  6. OWNERS
  7. PREUPLOAD.cfg