diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java')
-rw-r--r-- | java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java b/java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java index 39c1d02a5..5930dff24 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java +++ b/java/com/android/dialer/simulator/impl/SimulatorVoiceCall.java @@ -19,28 +19,15 @@ package com.android.dialer.simulator.impl; import android.content.Context; import android.os.Bundle; import android.support.annotation.NonNull; -import android.telecom.TelecomManager; -import android.telephony.TelephonyManager; -import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; /** Utilities to simulate phone calls. */ final class SimulatorVoiceCall { public static void addNewIncomingCall(@NonNull Context context) { LogUtil.enterBlock("SimulatorVoiceCall.addNewIncomingCall"); - SimulatorConnectionService.register(context); - - Bundle bundle = new Bundle(); // Set the caller ID to the Google London office. - bundle.putString(TelephonyManager.EXTRA_INCOMING_NUMBER, "+44 (0) 20 7031 3000"); - try { - context - .getSystemService(TelecomManager.class) - .addNewIncomingCall( - SimulatorConnectionService.getConnectionServiceHandle(context), bundle); - } catch (SecurityException e) { - Assert.fail("unable to add call: " + e); - } + String callerId = "+44 (0) 20 7031 3000"; + SimulatorConnectionService.addNewIncomingCall(context, new Bundle(), callerId); } private SimulatorVoiceCall() {} |