Merge "Change respond-via-sms strings on locale switch." into mnc-dev
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 31b67ec..2b75de2 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -31,7 +31,7 @@
<string name="respond_via_sms_canned_response_3" msgid="3496079065723960450">"Ще ви се обадя по-късно."</string>
<string name="respond_via_sms_canned_response_4" msgid="1698989243040062190">"Сега не мога да говоря. По-късно?"</string>
<string name="respond_via_sms_setting_title" msgid="3754000371039709383">"Бързи отговори"</string>
- <string name="respond_via_sms_setting_title_2" msgid="6104662227299493906">"Редактиране на бързи отговори"</string>
+ <string name="respond_via_sms_setting_title_2" msgid="6104662227299493906">"Редакт. на бързи отговори"</string>
<string name="respond_via_sms_setting_summary" msgid="9150281183930613065"></string>
<string name="respond_via_sms_edittext_dialog_title" msgid="20379890418289778">"Бърз отговор"</string>
<string name="respond_via_sms_confirmation_format" msgid="7229149977515784269">"До <xliff:g id="PHONE_NUMBER">%s</xliff:g> бе изпратено съобщение."</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 8da54f1..7fd4cfd 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -40,8 +40,8 @@
<string name="outgoing_call_error_no_phone_number_supplied" msgid="1940125199802007505">"Per realitzar una trucada, introdueix un número vàlid."</string>
<string name="duplicate_video_call_not_allowed" msgid="3749211605014548386">"En aquest moment no es pot afegir la trucada."</string>
<string name="video_call_not_allowed_if_tty_enabled" msgid="7593649283571253283">"Desactiva el mode de TTY per fer videotrucades."</string>
- <string name="no_vm_number" msgid="4164780423805688336">"Falta el número de correu de veu"</string>
- <string name="no_vm_number_msg" msgid="1300729501030053828">"No hi ha cap número de correu de veu emmagatzemat a la targeta SIM."</string>
+ <string name="no_vm_number" msgid="4164780423805688336">"Falta el número de la bústia de veu"</string>
+ <string name="no_vm_number_msg" msgid="1300729501030053828">"No hi ha cap número de bústia de veu emmagatzemat a la targeta SIM."</string>
<string name="add_vm_number_str" msgid="4676479471644687453">"Afegeix número"</string>
<string name="change_default_dialer_dialog_title" msgid="4430590714918044425">"Vols canviar l\'aplicació de marcador predeterminada?"</string>
<string name="change_default_dialer_with_previous_app_set_text" msgid="3213396537499337949">"Vols fer servir <xliff:g id="NEW_APP">%1$s</xliff:g> en lloc de <xliff:g id="CURRENT_APP">%2$s</xliff:g> com a aplicació de marcador predeterminada?"</string>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index dd973f2..55ff1c4 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -31,7 +31,7 @@
<string name="respond_via_sms_canned_response_3" msgid="3496079065723960450">"ഞാൻ നിങ്ങളെ പിന്നീട് വിളിക്കാം."</string>
<string name="respond_via_sms_canned_response_4" msgid="1698989243040062190">"ഇപ്പോൾ സംസാരിക്കാനാകില്ല. എന്നെ പിന്നീട് വിളിക്കാമോ?"</string>
<string name="respond_via_sms_setting_title" msgid="3754000371039709383">"ദ്രുത പ്രതികരണങ്ങൾ"</string>
- <string name="respond_via_sms_setting_title_2" msgid="6104662227299493906">"ദ്രുത പ്രതികരണങ്ങൾ എഡിറ്റുചെയ്യുക"</string>
+ <string name="respond_via_sms_setting_title_2" msgid="6104662227299493906">"പ്രതികരണം എഡിറ്റുചെയ്യൂ"</string>
<string name="respond_via_sms_setting_summary" msgid="9150281183930613065"></string>
<string name="respond_via_sms_edittext_dialog_title" msgid="20379890418289778">"ദ്രുത പ്രതികരണം"</string>
<string name="respond_via_sms_confirmation_format" msgid="7229149977515784269">"<xliff:g id="PHONE_NUMBER">%s</xliff:g> എന്നതിലേക്ക് സന്ദേശമയച്ചു."</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index d2ca26f..ae0835f 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -22,7 +22,7 @@
<string name="notification_missedCallsTitle" msgid="1361677948941502522">"Apeluri nepreluate"</string>
<string name="notification_missedCallsMsg" msgid="4575787816055205600">"<xliff:g id="NUM_MISSED_CALLS">%s</xliff:g> (de) apeluri nepreluate"</string>
<string name="notification_missedCallTicker" msgid="504686252427747209">"Apel nepreluat de la <xliff:g id="MISSED_CALL_FROM">%s</xliff:g>"</string>
- <string name="notification_missedCall_call_back" msgid="2684890353590890187">"Sunaţi înapoi"</string>
+ <string name="notification_missedCall_call_back" msgid="2684890353590890187">"Sunați"</string>
<string name="notification_missedCall_message" msgid="3049928912736917988">"Mesaj"</string>
<string name="accessibility_call_muted" msgid="2776111226185342220">"Apel cu sunet dezactivat."</string>
<string name="accessibility_speakerphone_enabled" msgid="1988512040421036359">"Difuzor activat."</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 794be54..5c6f0bf 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -22,8 +22,8 @@
<string name="notification_missedCallsTitle" msgid="1361677948941502522">"Zmeškané hovory"</string>
<string name="notification_missedCallsMsg" msgid="4575787816055205600">"Zmeškané hovory: <xliff:g id="NUM_MISSED_CALLS">%s</xliff:g>."</string>
<string name="notification_missedCallTicker" msgid="504686252427747209">"Zmeškaný hovor od volajúceho <xliff:g id="MISSED_CALL_FROM">%s</xliff:g>"</string>
- <string name="notification_missedCall_call_back" msgid="2684890353590890187">"Zavolať späť"</string>
- <string name="notification_missedCall_message" msgid="3049928912736917988">"Správa"</string>
+ <string name="notification_missedCall_call_back" msgid="2684890353590890187">"Zavolať"</string>
+ <string name="notification_missedCall_message" msgid="3049928912736917988">"Napísať"</string>
<string name="accessibility_call_muted" msgid="2776111226185342220">"Zvuk hovoru bol vypnutý."</string>
<string name="accessibility_speakerphone_enabled" msgid="1988512040421036359">"Reproduktor je povolený."</string>
<string name="respond_via_sms_canned_response_1" msgid="2461606462788380215">"Teraz nemôžem hovoriť, o čo ide?"</string>
@@ -41,7 +41,7 @@
<string name="duplicate_video_call_not_allowed" msgid="3749211605014548386">"Hovor momentálne nie je možné pridať."</string>
<string name="video_call_not_allowed_if_tty_enabled" msgid="7593649283571253283">"Ak chcete uskutočňovať videohovory, deaktivujte režim TTY."</string>
<string name="no_vm_number" msgid="4164780423805688336">"Chýba číslo hlasovej schránky"</string>
- <string name="no_vm_number_msg" msgid="1300729501030053828">"Na karte SIM nie je uložené žiadne číslo hlasovej schránky."</string>
+ <string name="no_vm_number_msg" msgid="1300729501030053828">"Na SIM karte nie je uložené žiadne číslo hlasovej schránky."</string>
<string name="add_vm_number_str" msgid="4676479471644687453">"Pridať číslo"</string>
<string name="change_default_dialer_dialog_title" msgid="4430590714918044425">"Chcete zmeniť predvolenú aplikáciu vytáčania?"</string>
<string name="change_default_dialer_with_previous_app_set_text" msgid="3213396537499337949">"Chcete použiť aplikáciu <xliff:g id="NEW_APP">%1$s</xliff:g> namiesto aplikácie <xliff:g id="CURRENT_APP">%2$s</xliff:g> ako predvolenú aplikáciu vytáčania?"</string>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index ee8e4f8..0884a45 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -22,7 +22,7 @@
<string name="notification_missedCallsTitle" msgid="1361677948941502522">"సమాధానం ఇవ్వని కాల్లు"</string>
<string name="notification_missedCallsMsg" msgid="4575787816055205600">"<xliff:g id="NUM_MISSED_CALLS">%s</xliff:g> సమాధానం ఇవ్వని కాల్లు"</string>
<string name="notification_missedCallTicker" msgid="504686252427747209">"<xliff:g id="MISSED_CALL_FROM">%s</xliff:g> నుండి సమాధానం ఇవ్వని కాల్"</string>
- <string name="notification_missedCall_call_back" msgid="2684890353590890187">"తిరిగి కాల్ చేయి"</string>
+ <string name="notification_missedCall_call_back" msgid="2684890353590890187">"కాల్ చేయి"</string>
<string name="notification_missedCall_message" msgid="3049928912736917988">"సందేశం"</string>
<string name="accessibility_call_muted" msgid="2776111226185342220">"కాల్ మ్యూట్ చేయబడింది."</string>
<string name="accessibility_speakerphone_enabled" msgid="1988512040421036359">"స్పీకర్ ఫోన్ ప్రారంభించబడింది."</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 1790095..a30f529 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -18,7 +18,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="telecommAppLabel" product="default" msgid="7207686803224752071">"Phone – керування дзвінками"</string>
<string name="unknown" msgid="6878797917991465859">"Невідомий"</string>
- <string name="notification_missedCallTitle" msgid="7554385905572364535">"Пропущ. виклик"</string>
+ <string name="notification_missedCallTitle" msgid="7554385905572364535">"Пропущений виклик"</string>
<string name="notification_missedCallsTitle" msgid="1361677948941502522">"Пропущ. дзвінки"</string>
<string name="notification_missedCallsMsg" msgid="4575787816055205600">"Пропущ. дзвінк: <xliff:g id="NUM_MISSED_CALLS">%s</xliff:g>"</string>
<string name="notification_missedCallTicker" msgid="504686252427747209">"Пропущ. виклик від <xliff:g id="MISSED_CALL_FROM">%s</xliff:g>"</string>
diff --git a/src/com/android/server/telecom/CallIntentProcessor.java b/src/com/android/server/telecom/CallIntentProcessor.java
index 90db53e..cfec90c 100644
--- a/src/com/android/server/telecom/CallIntentProcessor.java
+++ b/src/com/android/server/telecom/CallIntentProcessor.java
@@ -186,7 +186,7 @@
Intent intent) {
int intentVideoState = intent.getIntExtra(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE,
VideoProfile.STATE_AUDIO_ONLY);
- if (intentVideoState == VideoProfile.STATE_AUDIO_ONLY
+ if (VideoProfile.isAudioOnly(intentVideoState)
|| !callsManager.hasVideoCall()) {
return false;
} else {
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index cd56a90..7283648 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -399,7 +399,7 @@
boolean hasVideoCall() {
for (Call call : mCalls) {
- if (call.getVideoState() != VideoProfile.STATE_AUDIO_ONLY) {
+ if (VideoProfile.isVideo(call.getVideoState())) {
return true;
}
}
@@ -435,7 +435,11 @@
*/
void processIncomingCallIntent(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
Log.d(this, "processIncomingCallIntent");
- Uri handle = extras.getParcelable(TelephonyManager.EXTRA_INCOMING_NUMBER);
+ Uri handle = extras.getParcelable(TelecomManager.EXTRA_INCOMING_CALL_ADDRESS);
+ if (handle == null) {
+ // Required for backwards compatibility
+ handle = extras.getParcelable(TelephonyManager.EXTRA_INCOMING_NUMBER);
+ }
Call call = new Call(
mContext,
this,
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index d1d0c4a..96e9255 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -762,7 +762,7 @@
if (callId != null && isServiceValid("answer")) {
try {
logOutgoing("answer %s %d", callId, videoState);
- if (videoState == VideoProfile.STATE_AUDIO_ONLY) {
+ if (VideoProfile.isAudioOnly(videoState)) {
mServiceInterface.answer(callId);
} else {
mServiceInterface.answerVideo(callId, videoState);
diff --git a/src/com/android/server/telecom/DtmfLocalTonePlayer.java b/src/com/android/server/telecom/DtmfLocalTonePlayer.java
index 562f8d3..a0d2862 100644
--- a/src/com/android/server/telecom/DtmfLocalTonePlayer.java
+++ b/src/com/android/server/telecom/DtmfLocalTonePlayer.java
@@ -19,8 +19,13 @@
import android.content.Context;
import android.media.AudioManager;
import android.media.ToneGenerator;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Message;
import android.provider.Settings;
+import com.android.internal.util.Preconditions;
+
// TODO: Needed for move to system service: import com.android.internal.R;
/**
@@ -39,6 +44,17 @@
/** The context. */
private final Context mContext;
+ /**
+ * Message codes to be used for creating and deleting ToneGenerator object in the tonegenerator
+ * thread.
+ */
+ private static final int EVENT_CREATE_OBJECT = 1;
+ private static final int EVENT_DELETE_OBJECT = 2;
+
+ /** Handler running on the tonegenerator thread. */
+ private Handler mHandler;
+
+
public DtmfLocalTonePlayer(Context context) {
mContext = context;
}
@@ -61,14 +77,15 @@
if (mCall != call) {
return;
}
-
- if (mToneGenerator == null) {
- Log.d(this, "playTone: mToneGenerator == null, %c.", c);
- } else {
- Log.d(this, "starting local tone: %c.", c);
- int tone = getMappedTone(c);
- if (tone != ToneGenerator.TONE_UNKNOWN) {
- mToneGenerator.startTone(tone, -1 /* toneDuration */);
+ synchronized(this) {
+ if (mToneGenerator == null) {
+ Log.d(this, "playTone: mToneGenerator == null, %c.", c);
+ } else {
+ Log.d(this, "starting local tone: %c.", c);
+ int tone = getMappedTone(c);
+ if (tone != ToneGenerator.TONE_UNKNOWN) {
+ mToneGenerator.startTone(tone, -1 /* toneDuration */);
+ }
}
}
}
@@ -83,12 +100,13 @@
if (mCall != call) {
return;
}
-
- if (mToneGenerator == null) {
- Log.d(this, "stopTone: mToneGenerator == null.");
- } else {
- Log.d(this, "stopping local tone.");
- mToneGenerator.stopTone();
+ synchronized(this) {
+ if (mToneGenerator == null) {
+ Log.d(this, "stopTone: mToneGenerator == null.");
+ } else {
+ Log.d(this, "stopping local tone.");
+ mToneGenerator.stopTone();
+ }
}
}
@@ -113,14 +131,8 @@
mCall = call;
if (areLocalTonesEnabled) {
- if (mToneGenerator == null) {
- try {
- mToneGenerator = new ToneGenerator(AudioManager.STREAM_DTMF, 80);
- } catch (RuntimeException e) {
- Log.e(this, e, "Error creating local tone generator.");
- mToneGenerator = null;
- }
- }
+ Log.d(this, "Posting create.");
+ postMessage(EVENT_CREATE_OBJECT);
}
}
@@ -135,14 +147,78 @@
stopTone(call);
mCall = null;
+ Log.d(this, "Posting delete.");
+ postMessage(EVENT_DELETE_OBJECT);
+ }
+ }
- if (mToneGenerator != null) {
- mToneGenerator.release();
- mToneGenerator = null;
+ /**
+ * Posts a message to the tonegenerator-thread handler. Creates the handler if the handler
+ * has not been instantiated.
+ *
+ * @param messageCode The message to post.
+ */
+ private void postMessage(int messageCode) {
+ synchronized(this) {
+ if (mHandler == null) {
+ mHandler = getNewHandler();
+ }
+
+ if (mHandler == null) {
+ Log.d(this, "Message %d skipped because there is no handler.", messageCode);
+ } else {
+ mHandler.obtainMessage(messageCode, null).sendToTarget();
}
}
}
+ /**
+ * Creates a new tonegenerator Handler running in its own thread.
+ */
+ private Handler getNewHandler() {
+ Preconditions.checkState(mHandler == null);
+
+ HandlerThread thread = new HandlerThread("tonegenerator-dtmf");
+ thread.start();
+
+ return new Handler(thread.getLooper()) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch(msg.what) {
+ case EVENT_CREATE_OBJECT:
+ synchronized(DtmfLocalTonePlayer.this) {
+ if (mToneGenerator == null) {
+ try {
+ mToneGenerator = new ToneGenerator(
+ AudioManager.STREAM_DTMF, 80);
+ } catch (RuntimeException e) {
+ Log.e(this, e, "Error creating local tone generator.");
+ mToneGenerator = null;
+ }
+ }
+ }
+ break;
+ case EVENT_DELETE_OBJECT:
+ synchronized(DtmfLocalTonePlayer.this) {
+ if (mToneGenerator != null) {
+ mToneGenerator.release();
+ mToneGenerator = null;
+ }
+ // Delete the handler after the tone generator object is deleted by
+ // the tonegenerator thread.
+ if (mHandler != null && !mHandler.hasMessages(EVENT_CREATE_OBJECT)) {
+ // Stop the handler only if there are no pending CREATE messages.
+ mHandler.removeMessages(EVENT_DELETE_OBJECT);
+ mHandler.getLooper().quitSafely();
+ mHandler = null;
+ }
+ }
+ break;
+ }
+ }
+ };
+ }
+
private static final int getMappedTone(char digit) {
if (digit >= '0' && digit <= '9') {
return ToneGenerator.TONE_DTMF_0 + digit - '0';
diff --git a/src/com/android/server/telecom/PhoneAccountRegistrar.java b/src/com/android/server/telecom/PhoneAccountRegistrar.java
index 83f1207..ee218d7 100644
--- a/src/com/android/server/telecom/PhoneAccountRegistrar.java
+++ b/src/com/android/server/telecom/PhoneAccountRegistrar.java
@@ -117,7 +117,7 @@
private static final String FILE_NAME = "phone-account-registrar-state.xml";
@VisibleForTesting
- public static final int EXPECTED_STATE_VERSION = 6;
+ public static final int EXPECTED_STATE_VERSION = 7;
/** Keep in sync with the same in SipSettings.java */
private static final String SIP_SHARED_PREFERENCES = "SIP_PREFERENCES";
@@ -1203,6 +1203,8 @@
}
}
+ ComponentName pstnComponentName = new ComponentName("com.android.phone",
+ "com.android.services.telephony.TelephonyConnectionService");
ComponentName sipComponentName = new ComponentName("com.android.phone",
"com.android.services.telephony.sip.SipConnectionService");
@@ -1237,6 +1239,12 @@
enabled = true;
}
}
+ if (version < 7) {
+ // Always enabled all PSTN acocunts on upgrade to version 7
+ if (accountHandle.getComponentName().equals(pstnComponentName)) {
+ enabled = true;
+ }
+ }
PhoneAccount.Builder builder = PhoneAccount.builder(accountHandle, label)
.setAddress(address)
diff --git a/src/com/android/server/telecom/Ringer.java b/src/com/android/server/telecom/Ringer.java
index eef8494..0293b76 100644
--- a/src/com/android/server/telecom/Ringer.java
+++ b/src/com/android/server/telecom/Ringer.java
@@ -133,6 +133,7 @@
void silence() {
// Remove all calls from the "ringing" set and then update the ringer.
mRingingCalls.clear();
+ updateRinging();
}
private void onRespondedToIncomingCall(Call call) {
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index f6108d9..ef9bb43 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -195,7 +195,7 @@
synchronized (mLock) {
try {
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [gPA]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [gPA]", accountHandle);
return null;
}
// TODO: Do we really want to return for *any* user?
@@ -260,7 +260,7 @@
try {
PhoneAccountHandle accountHandle = mPhoneAccountRegistrar.getSimCallManager();
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [gsCM]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [gsCM]", accountHandle);
return null;
}
return accountHandle;
@@ -312,15 +312,9 @@
try {
enforcePhoneAccountModificationForPackage(
account.getAccountHandle().getComponentName().getPackageName());
- if (account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)) {
- enforceRegisterCallProviderPermission();
- }
if (account.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
enforceRegisterSimSubscriptionPermission();
}
- if (account.hasCapabilities(PhoneAccount.CAPABILITY_CONNECTION_MANAGER)) {
- enforceRegisterConnectionManagerPermission();
- }
if (account.hasCapabilities(PhoneAccount.CAPABILITY_MULTI_USER)) {
enforceRegisterMultiUser();
}
@@ -388,7 +382,7 @@
}
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [iVMN]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [iVMN]", accountHandle);
return false;
}
@@ -416,7 +410,7 @@
try {
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [gVMN]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [gVMN]", accountHandle);
return null;
}
@@ -444,7 +438,7 @@
synchronized (mLock) {
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [gL1N]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [gL1N]", accountHandle);
return null;
}
@@ -661,7 +655,7 @@
enforcePermissionOrPrivilegedDialer(MODIFY_PHONE_STATE, callingPackage);
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [hMMI]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [hMMI]", accountHandle);
return false;
}
@@ -690,7 +684,7 @@
enforcePermissionOrPrivilegedDialer(MODIFY_PHONE_STATE, callingPackage);
if (!isVisibleToCaller(accountHandle)) {
- Log.w(this, "%s is not visible for the calling user [gA4PA]", accountHandle);
+ Log.d(this, "%s is not visible for the calling user [gA4PA]", accountHandle);
return null;
}
diff --git a/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java b/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
index 6dd5ad6..4f96cc7 100644
--- a/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
+++ b/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
@@ -369,7 +369,7 @@
Bundle extras = new Bundle();
extras.putParcelable(
- TelephonyManager.EXTRA_INCOMING_NUMBER,
+ TelecomManager.EXTRA_INCOMING_CALL_ADDRESS,
Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null));
mTelecomSystem.getTelecomServiceImpl().getBinder()
.addNewIncomingCall(phoneAccountHandle, extras);