Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 64f99792 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Prevent NPE due to race condition in CallAudioRouteStateMachine.

The existing code checked for mCallsManager.getForegroundCall() to be
null and then proceeds to invoke the same method after the null check.
Since CallAudioRouteStateMachine does not happen within the Telecom
lock in all cases, this means the foreground call can change between
calls to mCallsManager.getForegroundCall().

Caching the value ensures we use the same foreground call state for both
operations and avoids a potential NPE.

This is a rare occurrence failure and has only been seen in RTSI testing.
This is already fixed in the new CallAudioRouteController code path whose
flag is ramping up.

Flag: NONE bugfix to correct NPE
Test: Re-run unit tests and CTS tests.
Fixes: 365217452
Change-Id: Ibddb7118ece23c550bb83ac2ede1b9b3fee358d7
parent 28786e78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment