Correct the camera stream behavior When VirtualCamera receives a stream stopped event from HalCamera unexpectedly, this change makes it to call stopVideoStream() and ensures the resources are clean up properly. Also, HalCamera is modified not to accept a new frame request when the video stream is not running. Fix: 169364969 Test: Run evs_virtualcamera_fuzzer Change-Id: I3c8b714e38e136d59bf3fd4e7df6efe70438f243 Merged-In: I3c8b714e38e136d59bf3fd4e7df6efe70438f243 (cherry picked from commit ba634b0b87315609131e42e0ca7c82308c836c18) (cherry picked from commit 16b0f2a24a58862da58420f6de2d03c146357ac9)
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.