From e20930fc565bbe69f1cb300ac4258a5130dd1282 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Thu, 7 Aug 2014 16:17:21 -0700 Subject: Add "CONNECTING" state for before outgoing call broadcast returns Immediately add a call to Telecomm before the outgoing call broadcast intent returns, this will reduce the latency for the InCallUI by allowing the InCallActivity to start before Telecomm has responded. Bug: 16396523 Change-Id: Iada2a6bdb803794a765b81edb2dfb0953445ae43 --- telecomm/java/android/telecomm/Call.java | 7 +++++++ telecomm/java/android/telecomm/CallState.java | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'telecomm/java') diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java index 3374d51..55cb8b1 100644 --- a/telecomm/java/android/telecomm/Call.java +++ b/telecomm/java/android/telecomm/Call.java @@ -69,6 +69,11 @@ public final class Call { */ public static final int STATE_PRE_DIAL_WAIT = 8; + /** + * The state of an outgoing {@code Call}, before Telecomm broadcast intent has returned. + */ + public static final int STATE_CONNECTING = 9; + public static class Details { private final Uri mHandle; private final int mHandlePresentation; @@ -771,6 +776,8 @@ public final class Call { switch (parcelableCallState) { case NEW: return STATE_NEW; + case CONNECTING: + return STATE_CONNECTING; case PRE_DIAL_WAIT: return STATE_PRE_DIAL_WAIT; case DIALING: diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecomm/CallState.java index 9cb05db..cfa78d4 100644 --- a/telecomm/java/android/telecomm/CallState.java +++ b/telecomm/java/android/telecomm/CallState.java @@ -32,6 +32,12 @@ public enum CallState { NEW, /** + * Indicates an outgoing call has been initiated and is waiting for the broadcast intent to + * return and provide call details before proceeding. + */ + CONNECTING, + + /** * Indicates that the call is about to go into the outgoing and dialing state but is waiting for * user input before it proceeds. For example, where no default {@link PhoneAccount} is set, * this is the state where the InCallUI is waiting for the user to select a -- cgit v1.1