diff options
author | Bill Peckham <bpeckham@google.com> | 2018-10-09 17:33:34 -0700 |
---|---|---|
committer | Bill Peckham <bpeckham@google.com> | 2018-10-15 17:46:00 -0700 |
commit | ddcaa93e851eb5e57692799446f2ef3fe31436ae (patch) | |
tree | 41f5481541b8c4e26dd8fef5cbba7a24aa1003c7 /telecomm/java/android/telecom/TelecomManager.java | |
parent | 760f366150e46580bfa808a897bc99c3e8907ded (diff) | |
parent | ef229d9195a2bdff34f94420687c0c05f4447a88 (diff) |
Merge QP1A.181008.001
Change-Id: Iff68e8d0501ac5c2998c96f9df4042a94a1ce9e1
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index fed3c3cde954..47f5acbecaa3 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -328,6 +328,15 @@ public class TelecomManager { "android.telecom.extra.CALL_TECHNOLOGY_TYPE"; /** + * Optional extra for communicating the call network technology used by a + * {@link android.telecom.Connection} to Telecom and InCallUI. + * + * @see {@code NETWORK_TYPE_*} in {@link android.telephony.TelephonyManager}. + */ + public static final String EXTRA_CALL_NETWORK_TYPE = + "android.telecom.extra.CALL_NETWORK_TYPE"; + + /** *@hide Extra value used to provide the call type for {@link #ACTION_CALL_TYPE}. */ public static final String EXTRA_CALL_TYPE_CS = @@ -1893,6 +1902,43 @@ public class TelecomManager { } } + /** + * Determines if there is an ongoing emergency call. This can be either an outgoing emergency + * call, as identified by the dialed number, or because a call was identified by the network + * as an emergency call. + * @return {@code true} if there is an ongoing emergency call, {@code false} otherwise. + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) + public boolean isInEmergencyCall() { + try { + if (isServiceConnected()) { + return getTelecomService().isInEmergencyCall(); + } + } catch (RemoteException e) { + Log.e(TAG, "RemoteException isInEmergencyCall: " + e); + return false; + } + return false; + } + + /** + * Handles {@link Intent#ACTION_CALL} intents trampolined from UserCallActivity. + * @param intent The {@link Intent#ACTION_CALL} intent to handle. + * @hide + */ + public void handleCallIntent(Intent intent) { + try { + if (isServiceConnected()) { + getTelecomService().handleCallIntent(intent); + } + } catch (RemoteException e) { + Log.e(TAG, "RemoteException handleCallIntent: " + e); + } + + } + private ITelecomService getTelecomService() { if (mTelecomServiceOverride != null) { return mTelecomServiceOverride; |