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

Skip to content
Commit 93a6fd8d authored by Tyler Gunn's avatar Tyler Gunn
Browse files

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.

A large number of these invocations were coming from InCall UI.

To fix this:
1. Added an isEmergencyCall property to the InCall Call object.
isLocalEmergencyNumber is recalculated any time the mTelecomCall's
handle changes.
2. Replaced calls to isLocalEmergencyNumber in CallCardPresenter with
calls to the InCall call cached version; this easily cuts out around 15
calls to isLocalEmergencyNumber.
3. Replaced code in InCallPresenter; this accounted for 2-3 calls to
isLocalEmergencyNumber.

Bug: 22985202
Change-Id: Ia61204bb0ed6171b24c116e8c681b3924ce54f1d

# Conflicts:
#	src/com/android/incallui/Call.java
parent 15d3e25f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment