Add a timeout when loading and releasing screenshot shutter sound
Right now, we load the sound on the background but must release
it on the main thread since the service is being destroyed. There's
currently no timeout, so if the sound fails to load for some reason
this will never succeed and will block forever. This means that
once the screenshots process attempts destruction (e.g. when the UI
is dismissed) no further screenshots can be taken.
This change adds a timeout so that even if the camera sound fails
to load, the process is still able to close successfully.
Bug: 273688513
Test: manual; take successive screenshots on a device where audio load
fails (see bug)
Change-Id: I0801c39547304cbab15c5f0589298002e1c7c70a
Change-Id: Ica277e15a1c55d1e5487d4791bd1dce137c35674
1 file changed