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/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;
}
}
}