Renaming Telecomm to Telecom.
- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.
Bug: 17364651
Change-Id: Ic33bafd37200e65431543a9889aed549dbb04831
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9bc9a58..52f93d1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -95,7 +95,7 @@
<uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS" />
<uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />
<uses-permission
- android:name="com.android.telecomm.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" />
+ android:name="com.android.server.telecom.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" />
<!-- This tells the activity manager to not delay any of our activity
start requests, even if they happen immediately after the user
@@ -429,8 +429,8 @@
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />
- <action android:name="android.telecomm.action.SHOW_CALL_SETTINGS" />
- <action android:name="android.telecomm.action.CHANGE_PHONE_ACCOUNTS" />
+ <action android:name="android.telecom.action.SHOW_CALL_SETTINGS" />
+ <action android:name="android.telecom.action.CHANGE_PHONE_ACCOUNTS" />
<action android:name="com.android.phone.CallFeaturesSetting.ADD_VOICEMAIL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@@ -482,7 +482,7 @@
<service android:name="com.android.services.telephony.sip.SipCallServiceProvider"
android:singleUser="true" >
<intent-filter>
- <action android:name="android.telecomm.CallServiceProvider" />
+ <action android:name="android.telecom.CallServiceProvider" />
</intent-filter>
</service>
<service android:name="com.android.services.telephony.sip.SipConnectionService"
@@ -490,7 +490,7 @@
android:singleUser="true"
android:permission="android.permission.BIND_CONNECTION_SERVICE" >
<intent-filter>
- <action android:name="android.telecomm.ConnectionService" />
+ <action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
<receiver android:name="com.android.services.telephony.sip.SipBroadcastReceiver">
@@ -575,11 +575,11 @@
<!-- service to dump telephony information -->
<service android:name="HfaService" android:exported="false"/>
- <!-- Telecomm integration -->
+ <!-- Telecom integration -->
<service android:name="com.android.services.telephony.TelephonyCallServiceProvider"
android:singleUser="true">
<intent-filter>
- <action android:name="android.telecomm.CallServiceProvider" />
+ <action android:name="android.telecom.CallServiceProvider" />
</intent-filter>
</service>
<service
@@ -588,7 +588,7 @@
android:label="@string/pstn_connection_service_label"
android:permission="android.permission.BIND_CONNECTION_SERVICE" >
<intent-filter>
- <action android:name="android.telecomm.ConnectionService" />
+ <action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
<provider
diff --git a/sip/src/com/android/services/telephony/sip/SipAccountRegistry.java b/sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
index 09708b7..9c52324 100644
--- a/sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
+++ b/sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
@@ -20,9 +20,9 @@
import android.net.sip.SipException;
import android.net.sip.SipManager;
import android.net.sip.SipProfile;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.Log;
@@ -143,7 +143,7 @@
}
/**
- * Stops a SIP profile and un-registers its associated {@link android.telecomm.PhoneAccount}.
+ * Stops a SIP profile and un-registers its associated {@link android.telecom.PhoneAccount}.
* Called after a SIP profile is deleted. The {@link AccountEntry} will be removed when the
* service has been stopped. The {@code SipService} fires the {@code ACTION_SIP_REMOVE_PHONE}
* intent, which triggers {@link SipAccountRegistry#removeSipProfile(String)} to perform the
@@ -162,7 +162,7 @@
// Un-register its PhoneAccount.
PhoneAccountHandle handle = SipUtil.createAccountHandle(context, sipUri);
- TelecommManager.from(context).unregisterPhoneAccount(handle);
+ TelecomManager.from(context).unregisterPhoneAccount(handle);
}
/**
@@ -211,7 +211,7 @@
/**
* Performs an asynchronous call to
* {@link SipAccountRegistry#startSipProfiles(android.content.Context, String)}, starting the
- * specified SIP profile and registering its {@link android.telecomm.PhoneAccount}.
+ * specified SIP profile and registering its {@link android.telecom.PhoneAccount}.
*
* @param context The context.
* @param sipUri A specific SIP uri to start.
@@ -229,12 +229,12 @@
/**
* Loops through all SIP accounts from the SIP database, starts each service and registers
- * each with the telecomm framework. If a specific sipUri is specified, this will only register
+ * each with the telecom framework. If a specific sipUri is specified, this will only register
* the associated SIP account.
*
* Also handles migration from using the primary account shared preference to indicate the
* {@link SipProfile} to be used for outgoing Sip connections to using the enabled flag on
- * {@link android.telecomm.PhoneAccount}s to indicate which profiles can be used for outgoing
+ * {@link android.telecom.PhoneAccount}s to indicate which profiles can be used for outgoing
* or ingoing calls.
*
* @param context The context.
@@ -244,7 +244,7 @@
final SipSharedPreferences sipSharedPreferences = new SipSharedPreferences(context);
boolean isReceivingCalls = sipSharedPreferences.isReceivingCallsEnabled();
String primaryProfile = sipSharedPreferences.getPrimaryAccount();
- TelecommManager telecommManager = TelecommManager.from(context);
+ TelecomManager telecomManager = TelecomManager.from(context);
SipManager sipManager = SipManager.newInstance(context);
SipProfileDb profileDb = new SipProfileDb(context);
List<SipProfile> sipProfileList = profileDb.retrieveSipProfileList();
@@ -254,13 +254,13 @@
// profile.
if (sipUri == null || Objects.equals(sipUri, profile.getUriString())) {
PhoneAccount phoneAccount = SipUtil.createPhoneAccount(context, profile);
- telecommManager.registerPhoneAccount(phoneAccount);
+ telecomManager.registerPhoneAccount(phoneAccount);
// If this profile was the primary profile in the past, mark it as enabled.
boolean isPrimaryProfile = primaryProfile != null &&
profile.getUriString().equals(primaryProfile);
if (isPrimaryProfile) {
- telecommManager.setPhoneAccountEnabled(
+ telecomManager.setPhoneAccountEnabled(
phoneAccount.getAccountHandle(), true);
}
}
diff --git a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
index 37ab30c..d3d274d 100644
--- a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
+++ b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
@@ -21,8 +21,8 @@
import android.content.Intent;
import android.net.sip.SipManager;
import android.os.Bundle;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.util.Log;
/**
@@ -51,16 +51,16 @@
if (VERBOSE) log("SIP_REMOVE_PHONE " +
intent.getStringExtra(SipManager.EXTRA_LOCAL_URI));
sipAccountRegistry.removeSipProfile(intent.getStringExtra(SipManager.EXTRA_LOCAL_URI));
- } else if (action.equals(TelecommManager.ACTION_PHONE_ACCOUNT_ENABLED)) {
+ } else if (action.equals(TelecomManager.ACTION_PHONE_ACCOUNT_ENABLED)) {
PhoneAccountHandle phoneAccountHandle = intent.getParcelableExtra(
- TelecommManager.EXTRA_PHONE_ACCOUNT_HANDLE);
+ TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE);
if (phoneAccountHandle == null) {
return;
}
sipAccountRegistry.setPhoneAccountEnabled(context, phoneAccountHandle);
- } else if (action.equals(TelecommManager.ACTION_PHONE_ACCOUNT_DISABLED)) {
+ } else if (action.equals(TelecomManager.ACTION_PHONE_ACCOUNT_DISABLED)) {
PhoneAccountHandle phoneAccountHandle = intent.getParcelableExtra(
- TelecommManager.EXTRA_PHONE_ACCOUNT_HANDLE);
+ TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE);
if (phoneAccountHandle == null) {
return;
}
@@ -76,7 +76,7 @@
if (accountHandle != null) {
Bundle extras = new Bundle();
extras.putParcelable(SipUtil.EXTRA_INCOMING_CALL_INTENT, intent);
- TelecommManager.from(context).addNewIncomingCall(accountHandle, extras);
+ TelecomManager.from(context).addNewIncomingCall(accountHandle, extras);
}
}
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java
index dc7f720..f6089b7 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnection.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnection.java
@@ -19,17 +19,16 @@
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.AudioState;
-import android.telecomm.Connection;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.AudioState;
+import android.telecom.Connection;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneCapabilities;
import android.util.Log;
import com.android.internal.telephony.Call;
import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.sip.SipPhone;
-import java.util.List;
import java.util.Objects;
final class SipConnection extends Connection {
diff --git a/sip/src/com/android/services/telephony/sip/SipConnectionService.java b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
index a9743a6..4060e11 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnectionService.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
@@ -28,11 +28,11 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;
-import android.telecomm.Connection;
-import android.telecomm.ConnectionRequest;
-import android.telecomm.ConnectionService;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.Connection;
+import android.telecom.ConnectionRequest;
+import android.telecom.ConnectionService;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.telephony.DisconnectCause;
import android.util.Log;
@@ -69,7 +69,7 @@
Bundle extras = request.getExtras();
if (extras != null &&
- extras.getString(TelecommManager.GATEWAY_PROVIDER_PACKAGE) != null) {
+ extras.getString(TelecomManager.GATEWAY_PROVIDER_PACKAGE) != null) {
return Connection.createFailedConnection(
DisconnectCause.CALL_BARRED, "Cannot make a SIP call with a gateway number.");
}
@@ -82,7 +82,7 @@
}
final SipConnection connection = new SipConnection();
- connection.setAddress(request.getAddress(), TelecommManager.PRESENTATION_ALLOWED);
+ connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED);
connection.setInitializing();
connection.onAddedToCallService();
boolean attemptCall = true;
diff --git a/sip/src/com/android/services/telephony/sip/SipEditor.java b/sip/src/com/android/services/telephony/sip/SipEditor.java
index fbf3bd1..5a21fe8 100644
--- a/sip/src/com/android/services/telephony/sip/SipEditor.java
+++ b/sip/src/com/android/services/telephony/sip/SipEditor.java
@@ -237,7 +237,7 @@
/**
* Saves a {@link SipProfile} and registers the associated
- * {@link android.telecomm.PhoneAccount}.
+ * {@link android.telecom.PhoneAccount}.
*
* @param p The {@link SipProfile} to register.
* @throws IOException Exception resulting from profile save.
@@ -250,7 +250,7 @@
/**
* Deletes a {@link SipProfile} and un-registers the associated
- * {@link android.telecomm.PhoneAccount}.
+ * {@link android.telecom.PhoneAccount}.
*
* @param p The {@link SipProfile} to delete.
*/
diff --git a/sip/src/com/android/services/telephony/sip/SipSettings.java b/sip/src/com/android/services/telephony/sip/SipSettings.java
index 7747637..875b312 100644
--- a/sip/src/com/android/services/telephony/sip/SipSettings.java
+++ b/sip/src/com/android/services/telephony/sip/SipSettings.java
@@ -39,8 +39,8 @@
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
-import android.telecomm.PhoneAccount;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
diff --git a/sip/src/com/android/services/telephony/sip/SipUtil.java b/sip/src/com/android/services/telephony/sip/SipUtil.java
index 6194902..458aaeb 100644
--- a/sip/src/com/android/services/telephony/sip/SipUtil.java
+++ b/sip/src/com/android/services/telephony/sip/SipUtil.java
@@ -26,9 +26,9 @@
import android.net.sip.SipManager;
import android.net.sip.SipProfile;
import android.provider.Settings;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import java.util.ArrayList;
@@ -60,8 +60,8 @@
}
static boolean isPhoneIdle(Context context) {
- TelecommManager manager = (TelecommManager) context.getSystemService(
- Context.TELECOMM_SERVICE);
+ TelecomManager manager = (TelecomManager) context.getSystemService(
+ Context.TELECOM_SERVICE);
if (manager != null) {
return !manager.isInCall();
}
@@ -95,7 +95,7 @@
}
/**
- * Determines if the {@link android.telecomm.PhoneAccount} associated with a {@link SipProfile}
+ * Determines if the {@link android.tlecom.PhoneAccount} associated with a {@link SipProfile}
* is enabled.
*
* @param context The {@link Context}.
@@ -103,7 +103,7 @@
* @return {@code True} if the {@code PhoneAccount} is enabled.
*/
static boolean isPhoneAccountEnabled(Context context, SipProfile profile) {
- PhoneAccount phoneAccount = TelecommManager.from(context)
+ PhoneAccount phoneAccount = TelecomManager.from(context)
.getPhoneAccount(SipUtil.createAccountHandle(context, profile.getUriString()));
return phoneAccount != null && phoneAccount.isEnabled();
}
diff --git a/src/com/android/phone/CallController.java b/src/com/android/phone/CallController.java
index a25b7a9..3af4d7d 100644
--- a/src/com/android/phone/CallController.java
+++ b/src/com/android/phone/CallController.java
@@ -22,9 +22,7 @@
import com.android.internal.telephony.TelephonyCapabilities;
import com.android.phone.CallGatewayManager.RawGatewayInfo;
import com.android.phone.Constants.CallStatusCode;
-import com.android.phone.ErrorDialogActivity;
-import android.app.AlertDialog;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
@@ -32,7 +30,7 @@
import android.os.Message;
import android.os.SystemProperties;
import android.provider.CallLog.Calls;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
import android.util.Log;
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index bb23292..6947727 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -48,8 +48,8 @@
import android.preference.PreferenceScreen;
import android.provider.ContactsContract.CommonDataKinds;
import android.provider.Settings;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -597,12 +597,12 @@
@Override
public boolean onAccountSelected(AccountSelectionPreference pref, PhoneAccountHandle account) {
- TelecommManager telecommManager = TelecommManager.from(this);
+ TelecomManager telecomManager = TelecomManager.from(this);
if (pref == mDefaultOutgoingAccount) {
- telecommManager.setUserSelectedOutgoingPhoneAccount(account);
+ telecomManager.setUserSelectedOutgoingPhoneAccount(account);
return true;
} else if (pref == mSimCallManagerAccount) {
- telecommManager.setSimCallManager(account);
+ telecomManager.setSimCallManager(account);
return true;
}
return false;
@@ -865,7 +865,8 @@
saveVoiceMailAndForwardingNumber(
getCurrentVoicemailProviderKey(),
new VoiceMailProviderSettings(mSubMenuVoicemailSettings.getPhoneNumber(),
- FWD_SETTINGS_DONT_TOUCH));
+ FWD_SETTINGS_DONT_TOUCH)
+ );
}
@@ -1570,9 +1571,9 @@
mSimCallManagerAccount = (AccountSelectionPreference)
findPreference(WIFI_CALL_MANAGER_ACCOUNT_KEY);
- TelecommManager telecommManager = TelecommManager.from(this);
+ TelecomManager telecomManager = TelecomManager.from(this);
- int allPhoneAccountsCount = telecommManager.getAllPhoneAccountsCount();
+ int allPhoneAccountsCount = telecomManager.getAllPhoneAccountsCount();
// Show the phone accounts preference if there are is more than one phone account (this
// includes disabled phone accounts). The default selection, however, only includes those
// PhoneAccounts which are enabled.
@@ -1584,7 +1585,7 @@
getPreferenceScreen().removePreference(mDefaultOutgoingAccount);
}
- List<PhoneAccountHandle> simCallManagers = telecommManager.getSimCallManagers();
+ List<PhoneAccountHandle> simCallManagers = telecomManager.getSimCallManagers();
if (!simCallManagers.isEmpty()) {
populateSimCallManagerAccountsModel();
mSimCallManagerAccount.setListener(this);
@@ -1700,8 +1701,8 @@
}
if (mButtonTTY != null) {
- TelecommManager telecommManager = TelecommManager.from(this);
- if (telecommManager != null && telecommManager.isTtySupported()) {
+ TelecomManager telecomManager = TelecomManager.from(this);
+ if (telecomManager != null && telecomManager.isTtySupported()) {
mButtonTTY.setOnPreferenceChangeListener(this);
} else {
prefSet.removePreference(mButtonTTY);
@@ -1791,7 +1792,7 @@
if (mButtonTTY != null) {
int settingsTtyMode = Settings.Secure.getInt(getContentResolver(),
Settings.Secure.PREFERRED_TTY_MODE,
- TelecommManager.TTY_MODE_OFF);
+ TelecomManager.TTY_MODE_OFF);
mButtonTTY.setValue(Integer.toString(settingsTtyMode));
updatePreferredTtyModeSummary(settingsTtyMode);
}
@@ -1837,27 +1838,27 @@
int settingsTtyMode = android.provider.Settings.Secure.getInt(
getContentResolver(),
android.provider.Settings.Secure.PREFERRED_TTY_MODE,
- TelecommManager.TTY_MODE_OFF);
+ TelecomManager.TTY_MODE_OFF);
if (DBG) log("handleTTYChange: requesting set TTY mode enable (TTY) to" +
Integer.toString(buttonTtyMode));
if (buttonTtyMode != settingsTtyMode) {
switch(buttonTtyMode) {
- case TelecommManager.TTY_MODE_OFF:
- case TelecommManager.TTY_MODE_FULL:
- case TelecommManager.TTY_MODE_HCO:
- case TelecommManager.TTY_MODE_VCO:
+ case TelecomManager.TTY_MODE_OFF:
+ case TelecomManager.TTY_MODE_FULL:
+ case TelecomManager.TTY_MODE_HCO:
+ case TelecomManager.TTY_MODE_VCO:
android.provider.Settings.Secure.putInt(getContentResolver(),
android.provider.Settings.Secure.PREFERRED_TTY_MODE, buttonTtyMode);
break;
default:
- buttonTtyMode = TelecommManager.TTY_MODE_OFF;
+ buttonTtyMode = TelecomManager.TTY_MODE_OFF;
}
mButtonTTY.setValue(Integer.toString(buttonTtyMode));
updatePreferredTtyModeSummary(buttonTtyMode);
- Intent ttyModeChanged = new Intent(TelecommManager.ACTION_TTY_PREFERRED_MODE_CHANGED);
- ttyModeChanged.putExtra(TelecommManager.EXTRA_TTY_PREFERRED_MODE, buttonTtyMode);
+ Intent ttyModeChanged = new Intent(TelecomManager.ACTION_TTY_PREFERRED_MODE_CHANGED);
+ ttyModeChanged.putExtra(TelecomManager.EXTRA_TTY_PREFERRED_MODE, buttonTtyMode);
sendBroadcastAsUser(ttyModeChanged, UserHandle.ALL);
}
}
@@ -1882,15 +1883,15 @@
private void updatePreferredTtyModeSummary(int TtyMode) {
String [] txts = getResources().getStringArray(R.array.tty_mode_entries);
switch(TtyMode) {
- case TelecommManager.TTY_MODE_OFF:
- case TelecommManager.TTY_MODE_HCO:
- case TelecommManager.TTY_MODE_VCO:
- case TelecommManager.TTY_MODE_FULL:
+ case TelecomManager.TTY_MODE_OFF:
+ case TelecomManager.TTY_MODE_HCO:
+ case TelecomManager.TTY_MODE_VCO:
+ case TelecomManager.TTY_MODE_FULL:
mButtonTTY.setSummary(txts[TtyMode]);
break;
default:
mButtonTTY.setEnabled(false);
- mButtonTTY.setSummary(txts[TelecommManager.TTY_MODE_OFF]);
+ mButtonTTY.setSummary(txts[TelecomManager.TTY_MODE_OFF]);
break;
}
}
@@ -2147,12 +2148,12 @@
return;
}
- TelecommManager telecommManager = TelecommManager.from(this);
- List<PhoneAccountHandle> enabledPhoneAccounts = telecommManager.getEnabledPhoneAccounts();
+ TelecomManager telecomManager = TelecomManager.from(this);
+ List<PhoneAccountHandle> enabledPhoneAccounts = telecomManager.getEnabledPhoneAccounts();
mDefaultOutgoingAccount.setModel(
- telecommManager,
+ telecomManager,
enabledPhoneAccounts,
- telecommManager.getUserSelectedOutgoingPhoneAccount(),
+ telecomManager.getUserSelectedOutgoingPhoneAccount(),
getString(R.string.phone_accounts_ask_every_time));
}
@@ -2165,12 +2166,12 @@
return;
}
- TelecommManager telecommManager = TelecommManager.from(this);
- List<PhoneAccountHandle> simCallManagers = telecommManager.getSimCallManagers();
+ TelecomManager telecomManager = TelecomManager.from(this);
+ List<PhoneAccountHandle> simCallManagers = telecomManager.getSimCallManagers();
mSimCallManagerAccount.setModel(
- telecommManager,
+ telecomManager,
simCallManagers,
- telecommManager.getSimCallManager(),
+ telecomManager.getSimCallManager(),
getString(R.string.wifi_calling_do_not_use));
}
diff --git a/src/com/android/phone/CallGatewayManager.java b/src/com/android/phone/CallGatewayManager.java
index a349d17..bdac983 100644
--- a/src/com/android/phone/CallGatewayManager.java
+++ b/src/com/android/phone/CallGatewayManager.java
@@ -18,13 +18,12 @@
import android.content.Intent;
import android.net.Uri;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
import com.android.internal.telephony.Connection;
-import com.google.android.collect.Maps;
import java.util.concurrent.ConcurrentHashMap;
diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java
index 1a64166..d373b60 100644
--- a/src/com/android/phone/CallNotifier.java
+++ b/src/com/android/phone/CallNotifier.java
@@ -254,7 +254,7 @@
break;
case CallStateMonitor.PHONE_RINGBACK_TONE:
- // DISABLED. The Telecomm and new ConnectionService layers are now responsible.
+ // DISABLED. The Telecom and new ConnectionService layers are now responsible.
// onRingbackTone((AsyncResult) msg.obj);
break;
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index ca42f2a..e29d4c8 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -30,7 +30,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.text.Editable;
import android.text.TextUtils;
@@ -38,7 +38,6 @@
import android.text.method.DialerKeyListener;
import android.util.Log;
import android.view.KeyEvent;
-import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 668038c..feccf95 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -20,43 +20,24 @@
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.StatusBarManager;
-import android.content.AsyncQueryHandler;
import android.content.ComponentName;
-import android.content.ContentResolver;
-import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
-import android.media.AudioManager;
import android.net.Uri;
-import android.os.PowerManager;
import android.os.SystemProperties;
import android.preference.PreferenceManager;
-import android.provider.CallLog.Calls;
-import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.PhoneLookup;
import android.provider.Settings;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
-import android.text.BidiFormatter;
-import android.text.TextDirectionHeuristics;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
-import com.android.internal.telephony.Call;
-import com.android.internal.telephony.CallManager;
-import com.android.internal.telephony.CallerInfo;
-import com.android.internal.telephony.CallerInfoAsyncQuery;
-import com.android.internal.telephony.Connection;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneBase;
-import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyCapabilities;
/**
diff --git a/src/com/android/phone/OtaUtils.java b/src/com/android/phone/OtaUtils.java
index 4a9154f..5f8b2c7 100644
--- a/src/com/android/phone/OtaUtils.java
+++ b/src/com/android/phone/OtaUtils.java
@@ -37,17 +37,15 @@
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.view.ViewStub;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ProgressBar;
-import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.ToggleButton;
diff --git a/src/com/android/phone/OutgoingCallBroadcaster.java b/src/com/android/phone/OutgoingCallBroadcaster.java
index 0f47c12..be95103 100644
--- a/src/com/android/phone/OutgoingCallBroadcaster.java
+++ b/src/com/android/phone/OutgoingCallBroadcaster.java
@@ -28,21 +28,19 @@
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.Uri;
-import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
-import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyCapabilities;
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index c034d8b..fa3d18b 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -28,13 +28,12 @@
import android.content.res.Configuration;
import android.media.AudioManager;
import android.net.Uri;
-import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
import android.os.SystemProperties;
-import android.telecomm.PhoneAccount;
-import android.telecomm.VideoProfile;
+import android.telecom.PhoneAccount;
+import android.telecom.VideoProfile;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -59,10 +58,7 @@
import com.android.internal.telephony.sip.SipPhone;
import com.android.phone.CallGatewayManager.RawGatewayInfo;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Iterator;
import java.util.List;
/**
diff --git a/src/com/android/phone/SimContacts.java b/src/com/android/phone/SimContacts.java
index cc2b992..a069e41 100644
--- a/src/com/android/phone/SimContacts.java
+++ b/src/com/android/phone/SimContacts.java
@@ -38,7 +38,7 @@
import android.provider.ContactsContract.CommonDataKinds.StructuredName;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.RawContacts;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.text.TextUtils;
import android.util.Log;
import android.view.ContextMenu;
diff --git a/src/com/android/phone/settings/AccountSelectionPreference.java b/src/com/android/phone/settings/AccountSelectionPreference.java
index 8469a18..88a12e7 100644
--- a/src/com/android/phone/settings/AccountSelectionPreference.java
+++ b/src/com/android/phone/settings/AccountSelectionPreference.java
@@ -25,8 +25,8 @@
import android.os.UserHandle;
import android.preference.ListPreference;
import android.preference.Preference;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.util.AttributeSet;
import java.util.List;
@@ -63,7 +63,7 @@
}
public void setModel(
- TelecommManager telecommManager,
+ TelecomManager telecomManager,
List<PhoneAccountHandle> accountsList,
PhoneAccountHandle currentSelection,
CharSequence nullSelectionString) {
@@ -75,7 +75,7 @@
int selectedIndex = mAccounts.length; // Points to nullSelectionString by default
int i = 0;
for ( ; i < mAccounts.length; i++) {
- CharSequence label = telecommManager.getPhoneAccount(mAccounts[i]).getLabel();
+ CharSequence label = telecomManager.getPhoneAccount(mAccounts[i]).getLabel();
mEntries[i] = label == null ? null : label.toString();
mEntryValues[i] = Integer.toString(i);
if (Objects.equals(currentSelection, mAccounts[i])) {
diff --git a/src/com/android/phone/settings/PhoneAccountSelectionPreferenceActivity.java b/src/com/android/phone/settings/PhoneAccountSelectionPreferenceActivity.java
index 7dd1190..a5eadbb 100644
--- a/src/com/android/phone/settings/PhoneAccountSelectionPreferenceActivity.java
+++ b/src/com/android/phone/settings/PhoneAccountSelectionPreferenceActivity.java
@@ -25,9 +25,9 @@
import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;
import android.preference.SwitchPreference;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import com.android.internal.util.CharSequences;
import com.android.phone.R;
@@ -49,7 +49,7 @@
implements Preference.OnPreferenceChangeListener {
private static final String CATEGORY_PHONE_ACCOUNTS_KEY = "phone_accounts_list";
- private TelecommManager mTelecommManager;
+ private TelecomManager mTelecomManager;
private PreferenceCategory mPhoneAccountsCategory;
/**
@@ -93,9 +93,9 @@
addPreferencesFromResource(R.xml.phone_account_selection);
mPhoneAccountsCategory = (PreferenceCategory) findPreference(
CATEGORY_PHONE_ACCOUNTS_KEY);
- mTelecommManager = TelecommManager.from(this.getActivity());
+ mTelecomManager = TelecomManager.from(this.getActivity());
- List<PhoneAccount> phoneAccounts = mTelecommManager.getAllPhoneAccounts();
+ List<PhoneAccount> phoneAccounts = mTelecomManager.getAllPhoneAccounts();
Collections.sort(phoneAccounts, new Comparator<PhoneAccount>() {
@Override
public int compare(PhoneAccount o1, PhoneAccount o2) {
@@ -131,7 +131,7 @@
boolean newState = Boolean.valueOf(newValue.toString()).booleanValue();
if (newState != phoneAccountPreference.getPreviousState()) {
- mTelecommManager.setPhoneAccountEnabled(
+ mTelecomManager.setPhoneAccountEnabled(
phoneAccountPreference.getPhoneAccountHandle(), newState);
}
return true;
diff --git a/src/com/android/services/telephony/CdmaConference.java b/src/com/android/services/telephony/CdmaConference.java
index 90f8566..0ede5d5 100644
--- a/src/com/android/services/telephony/CdmaConference.java
+++ b/src/com/android/services/telephony/CdmaConference.java
@@ -16,10 +16,10 @@
package com.android.services.telephony;
-import android.telecomm.Conference;
-import android.telecomm.Connection;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.Conference;
+import android.telecom.Connection;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.PhoneCapabilities;
import com.android.internal.telephony.Call;
import com.android.internal.telephony.CallStateException;
diff --git a/src/com/android/services/telephony/CdmaConferenceController.java b/src/com/android/services/telephony/CdmaConferenceController.java
index e3a0981..dac0b0a 100644
--- a/src/com/android/services/telephony/CdmaConferenceController.java
+++ b/src/com/android/services/telephony/CdmaConferenceController.java
@@ -17,7 +17,7 @@
package com.android.services.telephony;
import android.os.Handler;
-import android.telecomm.Connection;
+import android.telecom.Connection;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/com/android/services/telephony/CdmaConnection.java b/src/com/android/services/telephony/CdmaConnection.java
index b204208..60d32eb 100644
--- a/src/com/android/services/telephony/CdmaConnection.java
+++ b/src/com/android/services/telephony/CdmaConnection.java
@@ -20,7 +20,7 @@
import android.os.Message;
import android.provider.Settings;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.PhoneCapabilities;
import android.telephony.DisconnectCause;
import com.android.internal.telephony.Call;
diff --git a/src/com/android/services/telephony/GsmConference.java b/src/com/android/services/telephony/GsmConference.java
index 00e46fa..81e0fcb 100644
--- a/src/com/android/services/telephony/GsmConference.java
+++ b/src/com/android/services/telephony/GsmConference.java
@@ -16,10 +16,10 @@
package com.android.services.telephony;
-import android.telecomm.PhoneCapabilities;
-import android.telecomm.Conference;
-import android.telecomm.Connection;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.PhoneCapabilities;
+import android.telecom.Conference;
+import android.telecom.Connection;
+import android.telecom.PhoneAccountHandle;
import com.android.internal.telephony.Call;
import com.android.internal.telephony.CallStateException;
diff --git a/src/com/android/services/telephony/GsmConferenceController.java b/src/com/android/services/telephony/GsmConferenceController.java
index 5cc27a7..759ddfa 100644
--- a/src/com/android/services/telephony/GsmConferenceController.java
+++ b/src/com/android/services/telephony/GsmConferenceController.java
@@ -22,8 +22,8 @@
import java.util.List;
import java.util.Set;
-import android.telecomm.Conference;
-import android.telecomm.Connection;
+import android.telecom.Conference;
+import android.telecom.Connection;
import com.android.internal.telephony.Call;
diff --git a/src/com/android/services/telephony/GsmConnection.java b/src/com/android/services/telephony/GsmConnection.java
index ecd851e..479d247 100644
--- a/src/com/android/services/telephony/GsmConnection.java
+++ b/src/com/android/services/telephony/GsmConnection.java
@@ -16,7 +16,7 @@
package com.android.services.telephony;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.PhoneCapabilities;
import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Connection;
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index c7fe084..0c8f8bc 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -27,8 +27,8 @@
import android.os.Handler;
import android.os.Message;
import android.os.UserHandle;
-import android.telecomm.PhoneAccount;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@@ -44,7 +44,7 @@
import java.util.Objects;
/**
- * Listens to incoming-call events from the associated phone object and notifies Telecomm upon each
+ * Listens to incoming-call events from the associated phone object and notifies Telecom upon each
* occurence. One instance of these exists for each of the telephony-based call services.
*/
final class PstnIncomingCallNotifier {
@@ -155,7 +155,7 @@
}
/**
- * Verifies the incoming call and triggers sending the incoming-call intent to Telecomm.
+ * Verifies the incoming call and triggers sending the incoming-call intent to Telecom.
*
* @param asyncResult The result object from the new ringing event.
*/
@@ -165,7 +165,7 @@
if (connection != null) {
Call call = connection.getCall();
- // Final verification of the ringing state before sending the intent to Telecomm.
+ // Final verification of the ringing state before sending the intent to Telecom.
if (call != null && call.getState().isRinging()) {
sendIncomingCallIntent(connection);
}
@@ -188,17 +188,17 @@
}
/**
- * Sends the incoming call intent to telecomm.
+ * Sends the incoming call intent to telecom.
*/
private void sendIncomingCallIntent(Connection connection) {
Bundle extras = null;
- if (connection.getNumberPresentation() == TelecommManager.PRESENTATION_ALLOWED &&
+ if (connection.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED &&
!TextUtils.isEmpty(connection.getAddress())) {
extras = new Bundle();
Uri uri = Uri.fromParts(PhoneAccount.SCHEME_TEL, connection.getAddress(), null);
extras.putParcelable(TelephonyManager.EXTRA_INCOMING_NUMBER, uri);
}
- TelecommManager.from(mPhoneProxy.getContext()).addNewIncomingCall(
- TelecommAccountRegistry.makePstnPhoneAccountHandle(mPhoneProxy), extras);
+ TelecomManager.from(mPhoneProxy.getContext()).addNewIncomingCall(
+ TelecomAccountRegistry.makePstnPhoneAccountHandle(mPhoneProxy), extras);
}
}
diff --git a/src/com/android/services/telephony/TelecommAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
similarity index 91%
rename from src/com/android/services/telephony/TelecommAccountRegistry.java
rename to src/com/android/services/telephony/TelecomAccountRegistry.java
index f6220bb..307c522 100644
--- a/src/com/android/services/telephony/TelecommAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -22,9 +22,9 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.telephony.SubInfoRecord;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -41,14 +41,15 @@
import java.util.List;
/**
- * Owns all data we have registered with Telecomm including handling dynamic addition and
+ * Owns all data we have registered with Telecom including handling dynamic addition and
* removal of SIMs and SIP accounts.
*/
-final class TelecommAccountRegistry {
+final class TelecomAccountRegistry {
private static final boolean DBG = false; /* STOP SHIP if true */
// Slot IDs are zero based indices but the numbered icons represent the first, second,
// etc... SIM in the device. So that means that index 0 is SIM 1, index 1 is SIM 2 and so on.
+
private final static int[] phoneAccountIcons = {
R.drawable.ic_multi_sim1,
R.drawable.ic_multi_sim2,
@@ -78,7 +79,7 @@
}
/**
- * Registers the specified account with Telecomm as a PhoneAccountHandle.
+ * Registers the specified account with Telecom as a PhoneAccountHandle.
*/
private PhoneAccount registerPstnPhoneAccount(boolean isEmergency, boolean isDummyAccount) {
TelephonyManager telephonyManager = TelephonyManager.from(mContext);
@@ -156,8 +157,8 @@
.setEnabled(true)
.build();
- // Register with Telecomm and put into the account entry.
- mTelecommManager.registerPhoneAccount(account);
+ // Register with Telecom and put into the account entry.
+ mTelecomManager.registerPhoneAccount(account);
return account;
}
@@ -194,19 +195,19 @@
}
};
- private static TelecommAccountRegistry sInstance;
+ private static TelecomAccountRegistry sInstance;
private final Context mContext;
- private final TelecommManager mTelecommManager;
+ private final TelecomManager mTelecomManager;
private List<AccountEntry> mAccounts = new LinkedList<AccountEntry>();
- TelecommAccountRegistry(Context context) {
+ TelecomAccountRegistry(Context context) {
mContext = context;
- mTelecommManager = TelecommManager.from(context);
+ mTelecomManager = TelecomManager.from(context);
}
- static synchronized final TelecommAccountRegistry getInstance(Context context) {
+ static synchronized final TelecomAccountRegistry getInstance(Context context) {
if (sInstance == null) {
- sInstance = new TelecommAccountRegistry(context);
+ sInstance = new TelecomAccountRegistry(context);
}
return sInstance;
}
@@ -260,13 +261,12 @@
private void cleanupPhoneAccounts() {
ComponentName telephonyComponentName =
new ComponentName(mContext, TelephonyConnectionService.class);
-
- List<PhoneAccountHandle> accountHandles = mTelecommManager.getAllPhoneAccountHandles();
+ List<PhoneAccountHandle> accountHandles = mTelecomManager.getAllPhoneAccountHandles();
for (PhoneAccountHandle handle : accountHandles) {
if (telephonyComponentName.equals(handle.getComponentName()) &&
!hasAccountEntryForPhoneAccount(handle)) {
Log.d(this, "Unregistering phone account %s.", handle);
- mTelecommManager.unregisterPhoneAccount(handle);
+ mTelecomManager.unregisterPhoneAccount(handle);
}
}
}
@@ -304,8 +304,8 @@
private int getPhoneAccountIcon(int index) {
// A valid slot id doesn't necessarily mean that we have an icon for it.
if (SubscriptionManager.isValidSlotId(index) &&
- index < TelecommAccountRegistry.phoneAccountIcons.length) {
- return TelecommAccountRegistry.phoneAccountIcons[index];
+ index < TelecomAccountRegistry.phoneAccountIcons.length) {
+ return TelecomAccountRegistry.phoneAccountIcons[index];
}
// Invalid indices get the default icon that has no number associated with it.
return defaultPhoneAccountIcon;
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 91fd49e..8b0cf87 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -20,10 +20,10 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.AudioState;
-import android.telecomm.Connection;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.AudioState;
+import android.telecom.Connection;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneCapabilities;
import android.telephony.DisconnectCause;
import com.android.internal.telephony.Call;
@@ -146,7 +146,7 @@
* This is used when {@link TelephonyConnection#updateCallCapabilities()}} is called,
* ensuring the appropriate {@link PhoneCapabilities} are set. Since {@link PhoneCapabilities}
* can be rebuilt at any time it is necessary to track the video capabilities between rebuild.
- * The {@link PhoneCapabilities} (including video capabilities) are communicated to the telecomm
+ * The {@link PhoneCapabilities} (including video capabilities) are communicated to the telecom
* layer.
*/
private boolean mLocalVideoCapable;
@@ -156,7 +156,7 @@
* This is used when {@link TelephonyConnection#updateCallCapabilities()}} is called,
* ensuring the appropriate {@link PhoneCapabilities} are set. Since {@link PhoneCapabilities}
* can be rebuilt at any time it is necessary to track the video capabilities between rebuild.
- * The {@link PhoneCapabilities} (including video capabilities) are communicated to the telecomm
+ * The {@link PhoneCapabilities} (including video capabilities) are communicated to the telecom
* layer.
*/
private boolean mRemoteVideoCapable;
@@ -164,7 +164,7 @@
/**
* Determines the current audio quality for the {@link TelephonyConnection}.
* This is used when {@link TelephonyConnection#updateCallCapabilities}} is called to indicate
- * whether a call has the {@link android.telecomm.CallCapabilities#VoLTE} capability.
+ * whether a call has the {@link android.telecom.CallCapabilities#VoLTE} capability.
*/
private int mAudioQuality;
@@ -269,7 +269,7 @@
// a call on hold while a call-waiting call exists, it'll end up accepting the
// call-waiting call, which is bad if that was not the user's intention. We are
// cheating here and simply skipping it because we know any attempt to hold a call
- // while a call-waiting call is happening is likely a request from Telecomm prior to
+ // while a call-waiting call is happening is likely a request from Telecom prior to
// accepting the call-waiting call.
// TODO: Investigate a better solution. It would be great here if we
// could "fake" hold by silencing the audio and microphone streams for this call
@@ -294,17 +294,17 @@
// Here's the deal--Telephony hold/unhold is weird because whenever there exists
// more than one call, one of them must always be active. In other words, if you
// have an active call and holding call, and you put the active call on hold, it
- // will automatically activate the holding call. This is weird with how Telecomm
- // sends its commands. When a user opts to "unhold" a background call, telecomm
+ // will automatically activate the holding call. This is weird with how Telecom
+ // sends its commands. When a user opts to "unhold" a background call, telecom
// issues hold commands to all active calls, and then the unhold command to the
// background call. This means that we get two commands...each of which reduces to
// switchHoldingAndActive(). The result is that they simply cancel each other out.
- // To fix this so that it works well with telecomm we add a minor hack. If we
+ // To fix this so that it works well with telecom we add a minor hack. If we
// have one telephony call, everything works as normally expected. But if we have
// two or more calls, we will ignore all requests to "unhold" knowing that the hold
// requests already do what we want. If you've read up to this point, I'm very sorry
// that we are doing this. I didn't think of a better solution that wouldn't also
- // make the Telecomm APIs very ugly.
+ // make the Telecom APIs very ugly.
if (!hasMultipleTopLevelCalls()) {
mOriginalConnection.getCall().getPhone().switchHoldingAndActive();
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 38b6001..ab6abc8 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -19,11 +19,11 @@
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
-import android.telecomm.Connection;
-import android.telecomm.ConnectionRequest;
-import android.telecomm.ConnectionService;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.Connection;
+import android.telecom.ConnectionRequest;
+import android.telecom.ConnectionService;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
import android.telephony.DisconnectCause;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
diff --git a/src/com/android/services/telephony/TelephonyGlobals.java b/src/com/android/services/telephony/TelephonyGlobals.java
index 70b287d..11c3c64 100644
--- a/src/com/android/services/telephony/TelephonyGlobals.java
+++ b/src/com/android/services/telephony/TelephonyGlobals.java
@@ -20,7 +20,6 @@
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
-import com.android.internal.telephony.PhoneProxy;
/**
* Singleton entry point for the telephony-services app. Initializes ongoing systems relating to
@@ -62,6 +61,6 @@
mTtyManager = new TtyManager(mContext, phone);
}
- TelecommAccountRegistry.getInstance(mContext).setupOnBoot();
+ TelecomAccountRegistry.getInstance(mContext).setupOnBoot();
}
}
diff --git a/src/com/android/services/telephony/TtyManager.java b/src/com/android/services/telephony/TtyManager.java
index e25f206..f3f11f4 100644
--- a/src/com/android/services/telephony/TtyManager.java
+++ b/src/com/android/services/telephony/TtyManager.java
@@ -23,7 +23,7 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import com.android.internal.telephony.Phone;
@@ -54,7 +54,7 @@
if (ar.exception != null) {
Log.d(TtyManager.this, "queryTTYMode exception: %s", ar.exception);
} else {
- int ttyMode = phoneModeToTelecommMode(((int[]) ar.result)[0]);
+ int ttyMode = phoneModeToTelecomMode(((int[]) ar.result)[0]);
if (ttyMode != mTtyMode) {
Log.d(TtyManager.this, "setting TTY mode failed, attempted %d, got: %d",
mTtyMode, ttyMode);
@@ -72,13 +72,13 @@
mPhone = phone;
IntentFilter intentFilter = new IntentFilter(
- TelecommManager.ACTION_CURRENT_TTY_MODE_CHANGED);
+ TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED);
context.registerReceiver(mReceiver, intentFilter);
- int ttyMode = TelecommManager.TTY_MODE_OFF;
- TelecommManager telecommManager = TelecommManager.from(context);
- if (telecommManager != null) {
- ttyMode = telecommManager.getCurrentTtyMode();
+ int ttyMode = TelecomManager.TTY_MODE_OFF;
+ TelecomManager telecomManager = TelecomManager.from(context);
+ if (telecomManager != null) {
+ ttyMode = telecomManager.getCurrentTtyMode();
}
updateTtyMode(ttyMode);
}
@@ -86,7 +86,7 @@
private void updateTtyMode(int ttyMode) {
Log.v(this, "updateTtyMode %d -> %d", mTtyMode, ttyMode);
mTtyMode = ttyMode;
- mPhone.setTTYMode(telecommModeToPhoneMode(ttyMode),
+ mPhone.setTTYMode(telecomModeToPhoneMode(ttyMode),
mHandler.obtainMessage(MSG_SET_TTY_MODE_RESPONSE));
}
@@ -95,39 +95,39 @@
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
Log.v(TtyManager.this, "onReceive, action: %s", action);
- if (action.equals(TelecommManager.ACTION_CURRENT_TTY_MODE_CHANGED)) {
+ if (action.equals(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED)) {
int ttyMode = intent.getIntExtra(
- TelecommManager.EXTRA_CURRENT_TTY_MODE, TelecommManager.TTY_MODE_OFF);
+ TelecomManager.EXTRA_CURRENT_TTY_MODE, TelecomManager.TTY_MODE_OFF);
updateTtyMode(ttyMode);
}
}
}
- private static int telecommModeToPhoneMode(int telecommMode) {
- switch (telecommMode) {
- case TelecommManager.TTY_MODE_FULL:
+ private static int telecomModeToPhoneMode(int telecomMode) {
+ switch (telecomMode) {
+ case TelecomManager.TTY_MODE_FULL:
return Phone.TTY_MODE_FULL;
- case TelecommManager.TTY_MODE_VCO:
+ case TelecomManager.TTY_MODE_VCO:
return Phone.TTY_MODE_VCO;
- case TelecommManager.TTY_MODE_HCO:
+ case TelecomManager.TTY_MODE_HCO:
return Phone.TTY_MODE_HCO;
- case TelecommManager.TTY_MODE_OFF:
+ case TelecomManager.TTY_MODE_OFF:
default:
return Phone.TTY_MODE_OFF;
}
}
- private static int phoneModeToTelecommMode(int phoneMode) {
+ private static int phoneModeToTelecomMode(int phoneMode) {
switch (phoneMode) {
case Phone.TTY_MODE_FULL:
- return TelecommManager.TTY_MODE_FULL;
+ return TelecomManager.TTY_MODE_FULL;
case Phone.TTY_MODE_VCO:
- return TelecommManager.TTY_MODE_VCO;
+ return TelecomManager.TTY_MODE_VCO;
case Phone.TTY_MODE_HCO:
- return TelecommManager.TTY_MODE_HCO;
+ return TelecomManager.TTY_MODE_HCO;
case Phone.TTY_MODE_OFF:
default:
- return TelecommManager.TTY_MODE_OFF;
+ return TelecomManager.TTY_MODE_OFF;
}
}
}
diff --git a/tests/src/com/android/phone/tests/CallDialTest.java b/tests/src/com/android/phone/tests/CallDialTest.java
index baade32..b30f5b2 100644
--- a/tests/src/com/android/phone/tests/CallDialTest.java
+++ b/tests/src/com/android/phone/tests/CallDialTest.java
@@ -23,7 +23,7 @@
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -34,7 +34,6 @@
import android.widget.Toast;
import com.android.internal.telephony.ITelephony;
-import com.android.phone.Constants;
/**
* Test activity that mimics the behavior of 3rd party apps firing off