Fix null pointer exception in TelephonyConnection

Sometimes, a race condition will cause getForegroundCall.getImsCall to
return null after a previous null check has already passed. Fix this by
caching the variables locally before the null check so they don't change
from out under us.

Fixes: 157426224
Test: manual
Change-Id: I751a7e777e14287351cfa65af01e50351aee08b8
1 file changed