diff options
-rw-r--r-- | api/current.txt | 4 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/Call.java | 16 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/CallState.java | 8 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/InCallAdapter.java | 13 | ||||
-rw-r--r-- | telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl | 3 | ||||
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 1 |
6 files changed, 44 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt index 6e9a157..8ebb834 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28031,6 +28031,7 @@ package android.telecomm { method public int getState(); method public void hold(); method public void phoneAccountClicked(); + method public void phoneAccountSelected(android.telecomm.PhoneAccount); method public void playDtmfTone(char); method public void postDialContinue(boolean); method public void reject(boolean, java.lang.String); @@ -28044,6 +28045,7 @@ package android.telecomm { field public static final int STATE_DISCONNECTED = 7; // 0x7 field public static final int STATE_HOLDING = 3; // 0x3 field public static final int STATE_NEW = 0; // 0x0 + field public static final int STATE_PRE_DIAL_WAIT = 8; // 0x8 field public static final int STATE_RINGING = 2; // 0x2 } @@ -28131,6 +28133,7 @@ package android.telecomm { enum_constant public static final android.telecomm.CallState DISCONNECTED; enum_constant public static final android.telecomm.CallState NEW; enum_constant public static final android.telecomm.CallState ON_HOLD; + enum_constant public static final android.telecomm.CallState PRE_DIAL_WAIT; enum_constant public static final android.telecomm.CallState RINGING; } @@ -28275,6 +28278,7 @@ package android.telecomm { method public void holdCall(java.lang.String); method public void mute(boolean); method public void phoneAccountClicked(java.lang.String); + method public void phoneAccountSelected(java.lang.String, android.telecomm.PhoneAccount); method public void playDtmfTone(java.lang.String, char); method public void postDialContinue(java.lang.String, boolean); method public void rejectCall(java.lang.String, boolean, java.lang.String); diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java index 9f38d0d..5a41acb 100644 --- a/telecomm/java/android/telecomm/Call.java +++ b/telecomm/java/android/telecomm/Call.java @@ -62,6 +62,11 @@ public final class Call { */ public static final int STATE_DISCONNECTED = 7; + /** + * The state of an outgoing {@code Call}, but waiting for user input before proceeding. + */ + public static final int STATE_PRE_DIAL_WAIT = 8; + public static class Details { private final Uri mHandle; private final int mHandlePresentation; @@ -430,6 +435,15 @@ public final class Call { } /** + * Notifies this {@code Call} the a {@code PhoneAccount} has been selected and to proceed + * with placing an outgoing call. + */ + public void phoneAccountSelected(PhoneAccount account) { + mInCallAdapter.phoneAccountSelected(mTelecommCallId, account); + + } + + /** * Instructs this {@code Call} to enter a conference. */ public void conference() { @@ -703,6 +717,8 @@ public final class Call { switch (inCallCallState) { case NEW: return STATE_NEW; + case PRE_DIAL_WAIT: + return STATE_PRE_DIAL_WAIT; case DIALING: return STATE_DIALING; case RINGING: diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecomm/CallState.java index a464da5..7abf4ab 100644 --- a/telecomm/java/android/telecomm/CallState.java +++ b/telecomm/java/android/telecomm/CallState.java @@ -32,6 +32,14 @@ public enum CallState { NEW, /** + * 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 {@link PhoneAccount} + * to call from. + */ + PRE_DIAL_WAIT, + + /** * Indicates that a call is outgoing and in the dialing state. A call transitions to this state * once an outgoing call has begun (e.g., user presses the dial button in Dialer). Calls in this * state usually transition to {@link #ACTIVE} if the call was answered or {@link #DISCONNECTED} diff --git a/telecomm/java/android/telecomm/InCallAdapter.java b/telecomm/java/android/telecomm/InCallAdapter.java index 66cf1df..f228046 100644 --- a/telecomm/java/android/telecomm/InCallAdapter.java +++ b/telecomm/java/android/telecomm/InCallAdapter.java @@ -200,6 +200,19 @@ public final class InCallAdapter { } /** + * Instructs Telecomm to add a PhoneAccount to the specified call + * + * @param callId The identifier of the call + * @param account The PhoneAccount through which to place the call + */ + public void phoneAccountSelected(String callId, PhoneAccount account) { + try { + mAdapter.phoneAccountSelected(callId, account); + } catch (RemoteException e) { + } + } + + /** * Instructs Telecomm to conference the specified call. * * @param callId The unique ID of the call. diff --git a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl index ce0309f..b5b239b 100644 --- a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl +++ b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl @@ -17,6 +17,7 @@ package com.android.internal.telecomm; import android.telecomm.CallAudioState; +import android.telecomm.PhoneAccount; /** * Internal remote callback interface for in-call services. @@ -48,6 +49,8 @@ oneway interface IInCallAdapter { void phoneAccountClicked(String callId); + void phoneAccountSelected(String callId, in PhoneAccount account); + void conference(String callId); void splitFromConference(String callId); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 5e6cb14..6e1ee78 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -24,7 +24,6 @@ import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; -import android.telecomm.PhoneAccount; import android.util.Log; import com.android.internal.telecomm.ITelecommService; |