Handle race condition with CallComposerActivity.onBackPressed

For fast users/testing suites, it's possible to hit a race condition
where onBackPressed is called multiple times in a way that allows the
second call to endCallComposerSession to happen and crash.

This CL fixes the issue by checking that the session still exists prior
to calling endCallComposerSession.

I tried to write tests for this, but since the code guards against this
from happening, I wasn't able to get the code into a situation to cause
the crash.

Bug: 64136293
Test: none
PiperOrigin-RevId: 171758119
Change-Id: Ie12fd2f4390329b9bebb503fa3cf0f26d3bc1caf
1 file changed
tree: d51a48886fe21dc7b2ed4ac17fbae3dd382c5f79
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. CONTRIBUTING
  6. LICENSE