Remove OutgoingCallBroadcaster delay when a call not placed.
*** BACKGROUND ***
Our move to have the UI in a separate process caused jank in the outgoing
call sequence.
The activity which receives CALL intents is OutgoingCallBroadcaster.
This activity is responsible for managing third parties that may want to
rewrite or cancel a phone call number. Since this can take some
time--but usually very fast--it is written as a black screen. The result
is:
1) User dials number
2) black screen animates in
3) In call fades into view from the black screen.
The jank was introduced between (2) and (3) because there is a delay in
having the activity from a different process come up (previously both
were in same apk/process). The result was a black screen, then the home
screen flashing before InCall came up.
We resolved that problem by adding a delay in finish()ing
OutgoingCallBroadcaster to remove the flash.
This delay caused a problem for direct dial. Since we no longer
finish() OutgoingCallBroadcaster immediately, any app attemping to
cancel a CALL and replacing it with the new one would see the new CALL
intent go to the old OutgoingCallBroadcaster's onResume() instead.
*** FIX ***
Removing the delay would fix this but would reintroduce the terrible
jank. Instead, we retain the delay when we know the call wasn't
canceled, and remove the delay when the call WAS canceled.
bug:10857203
Change-Id: I775fa37cd2b19cd9a812eb48cd43b4601efcc4ad
1 file changed