am 7e552595: am 4c334f3d: Merge "Add ability to add sim-initiated MO call to UI (2/4)" into lmp-dev

* commit '7e552595bda0825787820e3d9bb58b5fad32cd01':
  Add ability to add sim-initiated MO call to UI (2/4)
This commit is contained in:
Yorke Lee
2014-10-07 01:04:30 +00:00
committed by Android Git Automerger
5 changed files with 74 additions and 9 deletions

View File

@@ -50,6 +50,13 @@ public class TelecomManager {
*/
public static final String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
/**
* Similar to {@link #ACTION_INCOMING_CALL}, but is used only by Telephony to add a new
* sim-initiated MO call for carrier testing.
* @hide
*/
public static final String ACTION_NEW_UNKNOWN_CALL = "android.telecom.action.NEW_UNKNOWN_CALL";
/**
* The {@link android.content.Intent} action used to configure a
* {@link android.telecom.ConnectionService}.
@@ -121,6 +128,12 @@ public class TelecomManager {
public static final String EXTRA_OUTGOING_CALL_EXTRAS =
"android.telecom.extra.OUTGOING_CALL_EXTRAS";
/**
* @hide
*/
public static final String EXTRA_UNKNOWN_CALL_HANDLE =
"android.telecom.extra.UNKNOWN_CALL_HANDLE";
/**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the disconnect code.
@@ -801,6 +814,29 @@ public class TelecomManager {
}
}
/**
* Registers a new unknown call with Telecom. This can only be called by the system Telephony
* service. This is invoked when Telephony detects a new unknown connection that was neither
* a new incoming call, nor an user-initiated outgoing call.
*
* @param phoneAccount A {@link PhoneAccountHandle} registered with
* {@link #registerPhoneAccount}.
* @param extras A bundle that will be passed through to
* {@link ConnectionService#onCreateIncomingConnection}.
* @hide
*/
@SystemApi
public void addNewUnknownCall(PhoneAccountHandle phoneAccount, Bundle extras) {
try {
if (isServiceConnected()) {
getTelecomService().addNewUnknownCall(
phoneAccount, extras == null ? new Bundle() : extras);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException adding a new unknown call: " + phoneAccount, e);
}
}
/**
* Processes the specified dial string as an MMI code.
* MMI codes are any sequence of characters entered into the dialpad that contain a "*" or "#".