Minimize the number of calls to PhoneNumberUtils.isLocalEmergencyNumber.
On a standard outgoing call, isLocalEmergencyNumber was being called
from 30-40 times. Each of these calls requires a system service
invocation.
The Telecom Call object already has an isEmergencyCall() property which
is set any time the handle on the call changes.
When ever possible in Telecom, I have used this already calculated value.
These changes reduce the number of calls to isLocalEmergencyNumber
by about 5-10.
Also removed a duplicate call to setHandle() in the Call constructor.
Bug: 22985202
Change-Id: Ic8662d4ab506486858caf4fbff61c32bae2b7c8c
5 files changed