summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-09-12 22:16:48 -0700
committerTyler Gunn <tgunn@google.com>2014-09-12 22:16:48 -0700
commit4b293f0f08030c97e1bb54d2f79ac2fb1a6e29ae (patch)
tree3d08939fee48787580c0b215084162b578128ea1
parent6861dc525e2caa9ced087e1c11ad0274e6e6ea12 (diff)
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: Ie5ae18f51baa5da2eb9793785ad0c9d83b6343d1
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java8
-rw-r--r--InCallUI/src/com/android/incallui/AudioModeProvider.java4
-rw-r--r--InCallUI/src/com/android/incallui/Call.java62
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonFragment.java2
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java22
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java2
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java43
-rw-r--r--InCallUI/src/com/android/incallui/CallList.java10
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfoUtils.java18
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java6
-rw-r--r--InCallUI/src/com/android/incallui/ContactInfoCache.java12
-rw-r--r--InCallUI/src/com/android/incallui/DialpadPresenter.java4
-rw-r--r--InCallUI/src/com/android/incallui/GlowPadWrapper.java2
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java5
-rw-r--r--InCallUI/src/com/android/incallui/InCallApp.java2
-rw-r--r--InCallUI/src/com/android/incallui/InCallPhoneListener.java2
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java44
-rw-r--r--InCallUI/src/com/android/incallui/InCallServiceImpl.java15
-rw-r--r--InCallUI/src/com/android/incallui/InCallVideoCallListener.java8
-rw-r--r--InCallUI/src/com/android/incallui/Log.java2
-rw-r--r--InCallUI/src/com/android/incallui/PostCharDialogFragment.java5
-rw-r--r--InCallUI/src/com/android/incallui/ProximitySensor.java8
-rw-r--r--InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java17
-rw-r--r--InCallUI/src/com/android/incallui/StatusBarNotifier.java2
-rw-r--r--InCallUI/src/com/android/incallui/TelecomAdapter.java (renamed from InCallUI/src/com/android/incallui/TelecommAdapter.java)26
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallPresenter.java12
26 files changed, 168 insertions, 175 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index aeb0bc3c5..2d861f2dd 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -16,7 +16,7 @@
package com.android.incallui;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.PhoneCapabilities;
import android.app.KeyguardManager;
import android.content.Context;
@@ -158,7 +158,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
== Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST) {
InCallPresenter.getInstance().acceptUpgradeRequest(context);
} else {
- TelecommAdapter.getInstance().answerCall(mCall.getId(), videoState);
+ TelecomAdapter.getInstance().answerCall(mCall.getId(), videoState);
}
}
@@ -168,7 +168,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
*/
public void onDecline() {
Log.d(this, "onDecline " + mCallId);
- TelecommAdapter.getInstance().rejectCall(mCall.getId(), false, null);
+ TelecomAdapter.getInstance().rejectCall(mCall.getId(), false, null);
}
public void onText() {
@@ -179,7 +179,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
public void rejectCallWithMessage(String message) {
Log.d(this, "sendTextToDefaultActivity()...");
- TelecommAdapter.getInstance().rejectCall(mCall.getId(), true, message);
+ TelecomAdapter.getInstance().rejectCall(mCall.getId(), true, message);
onDismissDialog();
}
diff --git a/InCallUI/src/com/android/incallui/AudioModeProvider.java b/InCallUI/src/com/android/incallui/AudioModeProvider.java
index 31ce9ebd7..de22ccb0e 100644
--- a/InCallUI/src/com/android/incallui/AudioModeProvider.java
+++ b/InCallUI/src/com/android/incallui/AudioModeProvider.java
@@ -18,8 +18,8 @@ package com.android.incallui;
import com.google.common.collect.Lists;
-import android.telecomm.AudioState;
-import android.telecomm.Phone;
+import android.telecom.AudioState;
+import android.telecom.Phone;
import java.util.List;
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index 36dd16291..fe3feea55 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -20,12 +20,12 @@ import com.android.contacts.common.CallUtil;
import android.content.Context;
import android.net.Uri;
-import android.telecomm.CallProperties;
-import android.telecomm.PhoneCapabilities;
-import android.telecomm.GatewayInfo;
-import android.telecomm.InCallService.VideoCall;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.VideoProfile;
+import android.telecom.CallProperties;
+import android.telecom.PhoneCapabilities;
+import android.telecom.GatewayInfo;
+import android.telecom.InCallService.VideoCall;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.VideoProfile;
import android.telephony.DisconnectCause;
import java.util.ArrayList;
@@ -120,56 +120,56 @@ public final class Call {
private static final String ID_PREFIX = Call.class.getSimpleName() + "_";
private static int sIdCounter = 0;
- private android.telecomm.Call.Listener mTelecommCallListener =
- new android.telecomm.Call.Listener() {
+ private android.telecom.Call.Listener mTelecommCallListener =
+ new android.telecom.Call.Listener() {
@Override
- public void onStateChanged(android.telecomm.Call call, int newState) {
+ public void onStateChanged(android.telecom.Call call, int newState) {
update();
}
@Override
- public void onParentChanged(android.telecomm.Call call,
- android.telecomm.Call newParent) {
+ public void onParentChanged(android.telecom.Call call,
+ android.telecom.Call newParent) {
update();
}
@Override
- public void onChildrenChanged(android.telecomm.Call call,
- List<android.telecomm.Call> children) {
+ public void onChildrenChanged(android.telecom.Call call,
+ List<android.telecom.Call> children) {
update();
}
@Override
- public void onDetailsChanged(android.telecomm.Call call,
- android.telecomm.Call.Details details) {
+ public void onDetailsChanged(android.telecom.Call call,
+ android.telecom.Call.Details details) {
update();
}
@Override
- public void onCannedTextResponsesLoaded(android.telecomm.Call call,
+ public void onCannedTextResponsesLoaded(android.telecom.Call call,
List<String> cannedTextResponses) {
update();
}
@Override
- public void onPostDialWait(android.telecomm.Call call,
+ public void onPostDialWait(android.telecom.Call call,
String remainingPostDialSequence) {
update();
}
@Override
- public void onVideoCallChanged(android.telecomm.Call call,
+ public void onVideoCallChanged(android.telecom.Call call,
VideoCall videoCall) {
update();
}
@Override
- public void onCallDestroyed(android.telecomm.Call call) {
+ public void onCallDestroyed(android.telecom.Call call) {
call.removeListener(mTelecommCallListener);
}
};
- private final android.telecomm.Call mTelecommCall;
+ private final android.telecom.Call mTelecommCall;
private final String mId;
private int mState = State.INVALID;
private int mDisconnectCause;
@@ -178,14 +178,14 @@ public final class Call {
private InCallVideoCallListener mVideoCallListener;
- public Call(android.telecomm.Call telecommCall) {
+ public Call(android.telecom.Call telecommCall) {
mTelecommCall = telecommCall;
mId = ID_PREFIX + Integer.toString(sIdCounter++);
updateFromTelecommCall();
mTelecommCall.addListener(mTelecommCallListener);
}
- public android.telecomm.Call getTelecommCall() {
+ public android.telecom.Call getTelecommCall() {
return mTelecommCall;
}
@@ -221,20 +221,20 @@ public final class Call {
private static int translateState(int state) {
switch (state) {
- case android.telecomm.Call.STATE_CONNECTING:
+ case android.telecom.Call.STATE_CONNECTING:
return Call.State.CONNECTING;
- case android.telecomm.Call.STATE_PRE_DIAL_WAIT:
+ case android.telecom.Call.STATE_PRE_DIAL_WAIT:
return Call.State.PRE_DIAL_WAIT;
- case android.telecomm.Call.STATE_DIALING:
- case android.telecomm.Call.STATE_NEW:
+ case android.telecom.Call.STATE_DIALING:
+ case android.telecom.Call.STATE_NEW:
return Call.State.DIALING;
- case android.telecomm.Call.STATE_RINGING:
+ case android.telecom.Call.STATE_RINGING:
return Call.State.INCOMING;
- case android.telecomm.Call.STATE_ACTIVE:
+ case android.telecom.Call.STATE_ACTIVE:
return Call.State.ACTIVE;
- case android.telecomm.Call.STATE_HOLDING:
+ case android.telecom.Call.STATE_HOLDING:
return Call.State.ONHOLD;
- case android.telecomm.Call.STATE_DISCONNECTED:
+ case android.telecom.Call.STATE_DISCONNECTED:
return Call.State.DISCONNECTED;
default:
return Call.State.INVALID;
@@ -346,7 +346,7 @@ public final class Call {
}
public String getParentId() {
- android.telecomm.Call parentCall = mTelecommCall.getParent();
+ android.telecom.Call parentCall = mTelecommCall.getParent();
if (parentCall != null) {
return CallList.getInstance().getCallByTelecommCall(parentCall).getId();
}
diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java
index 2dae7a444..64f74ff6f 100644
--- a/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -19,7 +19,7 @@ package com.android.incallui;
import android.content.Context;
import android.graphics.drawable.LayerDrawable;
import android.os.Bundle;
-import android.telecomm.AudioState;
+import android.telecom.AudioState;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.Menu;
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index 57c90be29..f6228bc23 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -17,10 +17,10 @@
package com.android.incallui;
import android.content.Context;
-import android.telecomm.AudioState;
-import android.telecomm.InCallService.VideoCall;
-import android.telecomm.PhoneCapabilities;
-import android.telecomm.VideoProfile;
+import android.telecom.AudioState;
+import android.telecom.InCallService.VideoCall;
+import android.telecom.PhoneCapabilities;
+import android.telecom.VideoProfile;
import com.android.incallui.AudioModeProvider.AudioModeListener;
@@ -134,7 +134,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
// if it turns out to be slow
Log.d(this, "Sending new Audio Mode: " + AudioState.audioRouteToString(mode));
- TelecommAdapter.getInstance().setAudioRoute(mode);
+ TelecomAdapter.getInstance().setAudioRoute(mode);
}
/**
@@ -162,7 +162,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
public void muteClicked(boolean checked) {
Log.d(this, "turning on mute: " + checked);
- TelecommAdapter.getInstance().mute(checked);
+ TelecomAdapter.getInstance().mute(checked);
}
public void holdClicked(boolean checked) {
@@ -171,10 +171,10 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
}
if (checked) {
Log.i(this, "Putting the call on hold: " + mCall);
- TelecommAdapter.getInstance().holdCall(mCall.getId());
+ TelecomAdapter.getInstance().holdCall(mCall.getId());
} else {
Log.i(this, "Removing the call from hold: " + mCall);
- TelecommAdapter.getInstance().unholdCall(mCall.getId());
+ TelecomAdapter.getInstance().unholdCall(mCall.getId());
}
}
@@ -184,11 +184,11 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
}
Log.i(this, "Swapping the call: " + mCall);
- TelecommAdapter.getInstance().swap(mCall.getId());
+ TelecomAdapter.getInstance().swap(mCall.getId());
}
public void mergeClicked() {
- TelecommAdapter.getInstance().merge(mCall.getId());
+ TelecomAdapter.getInstance().merge(mCall.getId());
}
public void addCallClicked() {
@@ -198,7 +198,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
// Simulate a click on the mute button
muteClicked(true);
- TelecommAdapter.getInstance().addCall();
+ TelecomAdapter.getInstance().addCall();
}
public void changeToVoiceClicked() {
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index fc5c79bd6..809e66616 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -27,7 +27,7 @@ import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
import android.telephony.DisconnectCause;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 36a6b31d2..ef7b4acc1 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -22,13 +22,12 @@ import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
-import android.telecomm.PhoneCapabilities;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.StatusHints;
-import android.telecomm.TelecommManager;
-import android.telecomm.VideoProfile;
+import android.telecom.PhoneCapabilities;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.StatusHints;
+import android.telecom.TelecomManager;
+import android.telecom.VideoProfile;
import android.telephony.DisconnectCause;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
@@ -65,7 +64,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
private ContactCacheEntry mSecondaryContactInfo;
private CallTimer mCallTimer;
private Context mContext;
- private TelecommManager mTelecommManager;
+ private TelecomManager mTelecomManager;
public static class ContactLookupCallback implements ContactInfoCacheCallback {
private final WeakReference<CallCardPresenter> mCallCardPresenter;
@@ -259,7 +258,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
@Override
- public void onDetailsChanged(Call call, android.telecomm.Call.Details details) {
+ public void onDetailsChanged(Call call, android.telecom.Call.Details details) {
updatePrimaryCallState();
}
@@ -269,8 +268,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
// number directly from the telephony layer).
PhoneAccountHandle accountHandle = mPrimary.getAccountHandle();
if (accountHandle != null) {
- TelecommManager mgr =
- (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
+ TelecomManager mgr =
+ (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
PhoneAccount account = mgr.getPhoneAccount(accountHandle);
if (account != null) {
return getNumberFromHandle(account.getSubscriptionAddress());
@@ -318,7 +317,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
if (statusHints != null) {
Bundle extras = statusHints.getExtras();
if (extras != null) {
- callbackNumber = extras.getString(TelecommManager.EXTRA_CALL_BACK_NUMBER);
+ callbackNumber = extras.getString(TelecomManager.EXTRA_CALL_BACK_NUMBER);
}
}
}
@@ -503,7 +502,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
if (accountHandle == null) {
return null;
}
- return getTelecommManager().getPhoneAccount(accountHandle);
+ return getTelecomManager().getPhoneAccount(accountHandle);
}
/**
@@ -521,7 +520,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
*/
private Drawable getCallProviderIcon(Call call) {
PhoneAccount account = getAccountForCall(call);
- if (account != null && getTelecommManager().hasMultipleEnabledAccounts()) {
+ if (account != null && getTelecomManager().hasMultipleEnabledAccounts()) {
return account.getIcon(mContext);
}
return null;
@@ -532,7 +531,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
*/
private String getCallProviderLabel(Call call) {
PhoneAccount account = getAccountForCall(call);
- if (account != null && getTelecommManager().hasMultipleEnabledAccounts()) {
+ if (account != null && getTelecomManager().hasMultipleEnabledAccounts()) {
return account.getLabel().toString();
}
return null;
@@ -616,7 +615,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
Log.i(this, "Swapping call to foreground: " + mSecondary);
- TelecommAdapter.getInstance().unholdCall(mSecondary.getId());
+ TelecomAdapter.getInstance().unholdCall(mSecondary.getId());
}
public void endCallClicked() {
@@ -625,7 +624,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
Log.i(this, "Disconnecting call: " + mPrimary);
- TelecommAdapter.getInstance().disconnectCall(mPrimary.getId());
+ TelecomAdapter.getInstance().disconnectCall(mPrimary.getId());
}
private String getNumberFromHandle(Uri handle) {
@@ -669,11 +668,11 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
void showManageConferenceCallButton(boolean visible);
}
- private TelecommManager getTelecommManager() {
- if (mTelecommManager == null) {
- mTelecommManager =
- (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
+ private TelecomManager getTelecomManager() {
+ if (mTelecomManager == null) {
+ mTelecomManager =
+ (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
}
- return mTelecommManager;
+ return mTelecomManager;
}
}
diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java
index 8c5b467ec..7e3ec21e4 100644
--- a/InCallUI/src/com/android/incallui/CallList.java
+++ b/InCallUI/src/com/android/incallui/CallList.java
@@ -22,7 +22,7 @@ import com.google.common.base.Preconditions;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.Phone;
+import android.telecom.Phone;
import android.telephony.DisconnectCause;
import java.util.Collections;
@@ -48,7 +48,7 @@ public class CallList implements InCallPhoneListener {
private static CallList sInstance = new CallList();
private final HashMap<String, Call> mCallById = new HashMap<>();
- private final HashMap<android.telecomm.Call, Call> mCallByTelecommCall = new HashMap<>();
+ private final HashMap<android.telecom.Call, Call> mCallByTelecommCall = new HashMap<>();
private final HashMap<String, List<String>> mCallTextReponsesMap = Maps.newHashMap();
/**
* ConcurrentHashMap constructor params: 8 is initial table size, 0.9f is
@@ -71,7 +71,7 @@ public class CallList implements InCallPhoneListener {
private Phone.Listener mPhoneListener = new Phone.Listener() {
@Override
- public void onCallAdded(Phone phone, android.telecomm.Call telecommCall) {
+ public void onCallAdded(Phone phone, android.telecom.Call telecommCall) {
Call call = new Call(telecommCall);
if (call.getState() == Call.State.INCOMING) {
onIncoming(call, call.getCannedSmsResponses());
@@ -80,7 +80,7 @@ public class CallList implements InCallPhoneListener {
}
}
@Override
- public void onCallRemoved(Phone phone, android.telecomm.Call telecommCall) {
+ public void onCallRemoved(Phone phone, android.telecom.Call telecommCall) {
if (mCallByTelecommCall.containsKey(telecommCall)) {
Call call = mCallByTelecommCall.get(telecommCall);
call.setState(Call.State.DISCONNECTED);
@@ -313,7 +313,7 @@ public class CallList implements InCallPhoneListener {
return mCallById.get(callId);
}
- public Call getCallByTelecommCall(android.telecomm.Call telecommCall) {
+ public Call getCallByTelecommCall(android.telecom.Call telecommCall) {
return mCallByTelecommCall.get(telecommCall);
}
diff --git a/InCallUI/src/com/android/incallui/CallerInfoUtils.java b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
index cc38a0e96..9fd45e413 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoUtils.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
@@ -4,8 +4,8 @@ import android.content.Context;
import android.content.Loader;
import android.content.Loader.OnLoadCompleteListener;
import android.net.Uri;
-import android.telecomm.PhoneAccount;
-import android.telecomm.TelecommManager;
+import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.Log;
@@ -41,7 +41,7 @@ public class CallerInfoUtils {
// TODO: Have phoneapp send a Uri when it knows the contact that triggered this call.
- if (info.numberPresentation == TelecommManager.PRESENTATION_ALLOWED) {
+ if (info.numberPresentation == TelecomManager.PRESENTATION_ALLOWED) {
// Start the query with the number provided from the call.
Log.d(TAG, "==> Actually starting CallerInfoAsyncQuery.startQuery()...");
CallerInfoAsyncQuery.startQuery(QUERY_TOKEN, context, info, listener, call);
@@ -107,9 +107,9 @@ public class CallerInfoUtils {
final String[] absentNumberValues =
context.getResources().getStringArray(R.array.absent_num);
if (Arrays.asList(absentNumberValues).contains(number)
- && presentation == TelecommManager.PRESENTATION_ALLOWED) {
+ && presentation == TelecomManager.PRESENTATION_ALLOWED) {
number = context.getString(R.string.unknown);
- ci.numberPresentation = TelecommManager.PRESENTATION_UNKNOWN;
+ ci.numberPresentation = TelecomManager.PRESENTATION_UNKNOWN;
}
// Check for other special "corner cases" for CNAP and fix them similarly. Corner
@@ -117,16 +117,16 @@ public class CallerInfoUtils {
// if we think we have an allowed presentation, or if the CallerInfo presentation doesn't
// match the presentation passed in for verification (meaning we changed it previously
// because it's a corner case and we're being called from a different entry point).
- if (ci.numberPresentation == TelecommManager.PRESENTATION_ALLOWED
+ if (ci.numberPresentation == TelecomManager.PRESENTATION_ALLOWED
|| (ci.numberPresentation != presentation
- && presentation == TelecommManager.PRESENTATION_ALLOWED)) {
+ && presentation == TelecomManager.PRESENTATION_ALLOWED)) {
// For all special strings, change number & numberPrentation.
if (isCnapSpecialCaseRestricted(number)) {
number = context.getString(R.string.private_num);
- ci.numberPresentation = TelecommManager.PRESENTATION_RESTRICTED;
+ ci.numberPresentation = TelecomManager.PRESENTATION_RESTRICTED;
} else if (isCnapSpecialCaseUnknown(number)) {
number = context.getString(R.string.unknown);
- ci.numberPresentation = TelecommManager.PRESENTATION_UNKNOWN;
+ ci.numberPresentation = TelecomManager.PRESENTATION_UNKNOWN;
}
Log.d(TAG, "SpecialCnap: number=" + toLogSafePhoneNumber(number)
+ "; presentation now=" + ci.numberPresentation);
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
index ba01e7597..269f37d9c 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
@@ -18,7 +18,7 @@ package com.android.incallui;
import android.content.Context;
import android.net.Uri;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.PhoneCapabilities;
import android.text.TextUtils;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
@@ -166,13 +166,13 @@ public class ConferenceManagerPresenter
public void separateConferenceConnection(int rowId) {
if (rowId < mCallerIds.length) {
- TelecommAdapter.getInstance().separateCall(mCallerIds[rowId]);
+ TelecomAdapter.getInstance().separateCall(mCallerIds[rowId]);
}
}
public void endConferenceConnection(int rowId) {
if (rowId < mCallerIds.length) {
- TelecommAdapter.getInstance().disconnectCall(mCallerIds[rowId]);
+ TelecomAdapter.getInstance().disconnectCall(mCallerIds[rowId]);
}
}
diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java
index 570b2de4f..4623c3b0f 100644
--- a/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -24,7 +24,7 @@ import android.net.Uri;
import android.os.Looper;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import com.android.contacts.common.util.PhoneNumberHelper;
@@ -153,7 +153,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
int presentationMode = call.getNumberPresentation();
if (callerInfo.contactExists || callerInfo.isEmergencyNumber() ||
callerInfo.isVoiceMailNumber()) {
- presentationMode = TelecommManager.PRESENTATION_ALLOWED;
+ presentationMode = TelecomManager.PRESENTATION_ALLOWED;
}
final ContactCacheEntry cacheEntry = buildEntry(mContext, callId,
@@ -389,7 +389,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
// (or potentially some other default based on the presentation.)
displayName = getPresentationString(context, presentation);
Log.d(TAG, " ==> no name *or* number! displayName = " + displayName);
- } else if (presentation != TelecommManager.PRESENTATION_ALLOWED) {
+ } else if (presentation != TelecomManager.PRESENTATION_ALLOWED) {
// This case should never happen since the network should never send a phone #
// AND a restricted presentation. However we leave it here in case of weird
// network behavior
@@ -426,7 +426,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
} else {
// We do have a valid "name" in the CallerInfo. Display that
// in the "name" slot, and the phone number in the "number" slot.
- if (presentation != TelecommManager.PRESENTATION_ALLOWED) {
+ if (presentation != TelecomManager.PRESENTATION_ALLOWED) {
// This case should never happen since the network should never send a name
// AND a restricted presentation. However we leave it here in case of weird
// network behavior
@@ -479,9 +479,9 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
*/
private static String getPresentationString(Context context, int presentation) {
String name = context.getString(R.string.unknown);
- if (presentation == TelecommManager.PRESENTATION_RESTRICTED) {
+ if (presentation == TelecomManager.PRESENTATION_RESTRICTED) {
name = context.getString(R.string.private_num);
- } else if (presentation == TelecommManager.PRESENTATION_PAYPHONE) {
+ } else if (presentation == TelecomManager.PRESENTATION_PAYPHONE) {
name = context.getString(R.string.payphone);
}
return name;
diff --git a/InCallUI/src/com/android/incallui/DialpadPresenter.java b/InCallUI/src/com/android/incallui/DialpadPresenter.java
index c36ead7a8..d76e6e9b7 100644
--- a/InCallUI/src/com/android/incallui/DialpadPresenter.java
+++ b/InCallUI/src/com/android/incallui/DialpadPresenter.java
@@ -61,7 +61,7 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi>
// Append this key to the "digits" widget.
getUi().appendDigitsToField(c);
// Plays the tone through Telecomm.
- TelecommAdapter.getInstance().playDtmfTone(mCall.getId(), c);
+ TelecomAdapter.getInstance().playDtmfTone(mCall.getId(), c);
} else {
Log.d(this, "ignoring dtmf request for '" + c + "'");
}
@@ -73,7 +73,7 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi>
public void stopDtmf() {
if (mCall != null) {
Log.d(this, "stopping remote tone");
- TelecommAdapter.getInstance().stopDtmfTone(mCall.getId());
+ TelecomAdapter.getInstance().stopDtmfTone(mCall.getId());
}
}
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
index 1a14f0b84..47547125b 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -19,7 +19,7 @@ package com.android.incallui;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
import android.util.AttributeSet;
import android.view.View;
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index db161a563..f4f8ca602 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -32,7 +32,6 @@ import android.os.Bundle;
import android.telephony.DisconnectCause;
import android.text.TextUtils;
import android.view.MenuItem;
-import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.KeyEvent;
@@ -380,7 +379,7 @@ public class InCallActivity extends Activity {
case KeyEvent.KEYCODE_MUTE:
// toggle mute
- TelecommAdapter.getInstance().mute(!AudioModeProvider.getInstance().getMute());
+ TelecomAdapter.getInstance().mute(!AudioModeProvider.getInstance().getMute());
return true;
// Various testing/debugging features, enabled ONLY when VERBOSE == true.
@@ -515,7 +514,7 @@ public class InCallActivity extends Activity {
// wants to use the dialpad toward the exact line, so un-hold the holding line.
final Call call = CallList.getInstance().getActiveOrBackgroundCall();
if (call != null && call.getState() == State.ONHOLD) {
- TelecommAdapter.getInstance().unholdCall(call.getId());
+ TelecomAdapter.getInstance().unholdCall(call.getId());
}
}
}
diff --git a/InCallUI/src/com/android/incallui/InCallApp.java b/InCallUI/src/com/android/incallui/InCallApp.java
index d645ca110..d6f4f42de 100644
--- a/InCallUI/src/com/android/incallui/InCallApp.java
+++ b/InCallUI/src/com/android/incallui/InCallApp.java
@@ -21,7 +21,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
/**
* Top-level Application class for the InCall app.
diff --git a/InCallUI/src/com/android/incallui/InCallPhoneListener.java b/InCallUI/src/com/android/incallui/InCallPhoneListener.java
index c2be3e6f8..2fd6afe22 100644
--- a/InCallUI/src/com/android/incallui/InCallPhoneListener.java
+++ b/InCallUI/src/com/android/incallui/InCallPhoneListener.java
@@ -16,7 +16,7 @@
package com.android.incallui;
-import android.telecomm.Phone;
+import android.telecom.Phone;
/**
* Interface implemented by In-Call components that maintain a reference to the Telecomm API
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index ad78708cc..241056d89 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -21,10 +21,10 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.telecomm.PhoneCapabilities;
-import android.telecomm.Phone;
-import android.telecomm.PhoneAccountHandle;
-import android.telecomm.VideoProfile;
+import android.telecom.PhoneCapabilities;
+import android.telecom.Phone;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.VideoProfile;
import android.text.TextUtils;
import android.view.Surface;
import android.view.View;
@@ -90,27 +90,27 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
bringToForeground(showDialpad);
}
@Override
- public void onCallAdded(Phone phone, android.telecomm.Call call) {
+ public void onCallAdded(Phone phone, android.telecom.Call call) {
call.addListener(mCallListener);
}
@Override
- public void onCallRemoved(Phone phone, android.telecomm.Call call) {
+ public void onCallRemoved(Phone phone, android.telecom.Call call) {
call.removeListener(mCallListener);
}
};
- private final android.telecomm.Call.Listener mCallListener =
- new android.telecomm.Call.Listener() {
+ private final android.telecom.Call.Listener mCallListener =
+ new android.telecom.Call.Listener() {
@Override
- public void onPostDialWait(android.telecomm.Call call, String remainingPostDialSequence) {
+ public void onPostDialWait(android.telecom.Call call, String remainingPostDialSequence) {
onPostDialCharWait(
CallList.getInstance().getCallByTelecommCall(call).getId(),
remainingPostDialSequence);
}
@Override
- public void onDetailsChanged(android.telecomm.Call call,
- android.telecomm.Call.Details details) {
+ public void onDetailsChanged(android.telecom.Call call,
+ android.telecom.Call.Details details) {
for (InCallDetailsListener listener : mDetailsListeners) {
listener.onDetailsChanged(CallList.getInstance().getCallByTelecommCall(call),
details);
@@ -119,7 +119,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
@Override
public void onConferenceableCallsChanged(
- android.telecomm.Call call, List<android.telecomm.Call> conferenceableCalls) {
+ android.telecom.Call call, List<android.telecom.Call> conferenceableCalls) {
Log.i(this, "onConferenceableCallsChanged: " + call);
for (InCallDetailsListener listener : mDetailsListeners) {
listener.onDetailsChanged(CallList.getInstance().getCallByTelecommCall(call),
@@ -462,7 +462,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
Call call = mCallList.getWaitingForAccountCall();
if (call != null) {
String callId = call.getId();
- TelecommAdapter.getInstance().phoneAccountSelected(callId, accountHandle);
+ TelecomAdapter.getInstance().phoneAccountSelected(callId, accountHandle);
}
}
@@ -471,7 +471,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
Call call = mCallList.getWaitingForAccountCall();
if (call != null) {
String callId = call.getId();
- TelecommAdapter.getInstance().disconnectCall(callId);
+ TelecomAdapter.getInstance().disconnectCall(callId);
}
}
@@ -496,7 +496,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
}
if (call != null) {
- TelecommAdapter.getInstance().disconnectCall(call.getId());
+ TelecomAdapter.getInstance().disconnectCall(call.getId());
}
}
@@ -513,7 +513,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
Call call = mCallList.getIncomingCall();
if (call != null) {
- TelecommAdapter.getInstance().answerCall(call.getId(), videoState);
+ TelecomAdapter.getInstance().answerCall(call.getId(), videoState);
showInCall(false, false/* newOutgoingCall */);
}
}
@@ -531,7 +531,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
Call call = mCallList.getIncomingCall();
if (call != null) {
- TelecommAdapter.getInstance().rejectCall(call.getId(), false, null);
+ TelecomAdapter.getInstance().rejectCall(call.getId(), false, null);
}
}
@@ -654,7 +654,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
// (1) Attempt to answer a call
if (incomingCall != null) {
- TelecommAdapter.getInstance().answerCall(
+ TelecomAdapter.getInstance().answerCall(
incomingCall.getId(), VideoProfile.VideoState.AUDIO_ONLY);
return true;
}
@@ -674,10 +674,10 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
// (2) Attempt actions on conference calls
if (canMerge) {
- TelecommAdapter.getInstance().merge(activeCall.getId());
+ TelecomAdapter.getInstance().merge(activeCall.getId());
return true;
} else if (canSwap) {
- TelecommAdapter.getInstance().swap(activeCall.getId());
+ TelecomAdapter.getInstance().swap(activeCall.getId());
return true;
}
}
@@ -695,7 +695,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
// (4) unhold call
if (heldCall.getState() == Call.State.ONHOLD && canHold) {
- TelecommAdapter.getInstance().unholdCall(heldCall.getId());
+ TelecomAdapter.getInstance().unholdCall(heldCall.getId());
return true;
}
}
@@ -1094,7 +1094,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
}
public interface InCallDetailsListener {
- public void onDetailsChanged(Call call, android.telecomm.Call.Details details);
+ public void onDetailsChanged(Call call, android.telecom.Call.Details details);
}
public interface InCallOrientationListener {
diff --git a/InCallUI/src/com/android/incallui/InCallServiceImpl.java b/InCallUI/src/com/android/incallui/InCallServiceImpl.java
index f19220199..37e16a3bf 100644
--- a/InCallUI/src/com/android/incallui/InCallServiceImpl.java
+++ b/InCallUI/src/com/android/incallui/InCallServiceImpl.java
@@ -16,11 +16,8 @@
package com.android.incallui;
-import android.app.Service;
-import android.content.Intent;
-import android.os.IBinder;
-import android.telecomm.InCallService;
-import android.telecomm.Phone;
+import android.telecom.InCallService;
+import android.telecom.Phone;
/**
* Used to receive updates about calls from the Telecomm component. This service is bound to
@@ -35,13 +32,13 @@ public class InCallServiceImpl extends InCallService {
Log.v(this, "onPhoneCreated");
CallList.getInstance().setPhone(phone);
AudioModeProvider.getInstance().setPhone(phone);
- TelecommAdapter.getInstance().setPhone(phone);
+ TelecomAdapter.getInstance().setPhone(phone);
InCallPresenter.getInstance().setPhone(phone);
InCallPresenter.getInstance().setUp(
getApplicationContext(),
CallList.getInstance(),
AudioModeProvider.getInstance());
- TelecommAdapter.getInstance().setContext(InCallServiceImpl.this);
+ TelecomAdapter.getInstance().setContext(InCallServiceImpl.this);
}
@Override
@@ -50,8 +47,8 @@ public class InCallServiceImpl extends InCallService {
// Tear down the InCall system
CallList.getInstance().clearPhone();
AudioModeProvider.getInstance().clearPhone();
- TelecommAdapter.getInstance().clearPhone();
- TelecommAdapter.getInstance().setContext(null);
+ TelecomAdapter.getInstance().clearPhone();
+ TelecomAdapter.getInstance().setContext(null);
CallList.getInstance().clearOnDisconnect();
InCallPresenter.getInstance().tearDown();
}
diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java
index 62817d29c..363bd4144 100644
--- a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java
+++ b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java
@@ -16,10 +16,10 @@
package com.android.incallui;
-import android.telecomm.CameraCapabilities;
-import android.telecomm.Connection;
-import android.telecomm.InCallService.VideoCall;
-import android.telecomm.VideoProfile;
+import android.telecom.CameraCapabilities;
+import android.telecom.Connection;
+import android.telecom.InCallService.VideoCall;
+import android.telecom.VideoProfile;
/**
* Implements the InCallUI Video Call Listener.
diff --git a/InCallUI/src/com/android/incallui/Log.java b/InCallUI/src/com/android/incallui/Log.java
index f609c549c..5e13c790b 100644
--- a/InCallUI/src/com/android/incallui/Log.java
+++ b/InCallUI/src/com/android/incallui/Log.java
@@ -17,7 +17,7 @@
package com.android.incallui;
import android.net.Uri;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.telephony.PhoneNumberUtils;
import java.security.MessageDigest;
diff --git a/InCallUI/src/com/android/incallui/PostCharDialogFragment.java b/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
index 5925acee7..e1edbc75b 100644
--- a/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
+++ b/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
@@ -16,7 +16,6 @@
package com.android.incallui;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
@@ -52,7 +51,7 @@ public class PostCharDialogFragment extends DialogFragment {
builder.setPositiveButton(R.string.pause_prompt_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
- TelecommAdapter.getInstance().postDialContinue(mCallId, true);
+ TelecomAdapter.getInstance().postDialContinue(mCallId, true);
}
});
builder.setNegativeButton(R.string.pause_prompt_no, new DialogInterface.OnClickListener() {
@@ -71,6 +70,6 @@ public class PostCharDialogFragment extends DialogFragment {
public void onCancel(DialogInterface dialog) {
super.onCancel(dialog);
- TelecommAdapter.getInstance().postDialContinue(mCallId, false);
+ TelecomAdapter.getInstance().postDialContinue(mCallId, false);
}
}
diff --git a/InCallUI/src/com/android/incallui/ProximitySensor.java b/InCallUI/src/com/android/incallui/ProximitySensor.java
index 5bde190c1..5b9a5eca7 100644
--- a/InCallUI/src/com/android/incallui/ProximitySensor.java
+++ b/InCallUI/src/com/android/incallui/ProximitySensor.java
@@ -19,7 +19,7 @@ package com.android.incallui;
import android.content.Context;
import android.content.res.Configuration;
import android.os.PowerManager;
-import android.telecomm.AudioState;
+import android.telecom.AudioState;
import com.android.incallui.AudioModeProvider.AudioModeListener;
import com.android.incallui.InCallPresenter.InCallState;
@@ -63,7 +63,7 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
mAccelerometerListener.enable(false);
- TelecommAdapter.getInstance().turnOffProximitySensor(true);
+ TelecomAdapter.getInstance().turnOffProximitySensor(true);
}
/**
@@ -210,12 +210,12 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
Log.d(this, "Turning on proximity sensor");
// Phone is in use! Arrange for the screen to turn off
// automatically when the sensor detects a close object.
- TelecommAdapter.getInstance().turnOnProximitySensor();
+ TelecomAdapter.getInstance().turnOnProximitySensor();
} else {
Log.d(this, "Turning off proximity sensor");
// Phone is either idle, or ringing. We don't want any special proximity sensor
// behavior in either case.
- TelecommAdapter.getInstance().turnOffProximitySensor(screenOnImmediately);
+ TelecomAdapter.getInstance().turnOffProximitySensor(screenOnImmediately);
}
}
}
diff --git a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
index d44047d67..aeb14dfbf 100644
--- a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
+++ b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
@@ -16,8 +16,8 @@
package com.android.incallui;
-import android.telecomm.PhoneAccount;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -26,7 +26,7 @@ import android.app.FragmentManager;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -36,7 +36,6 @@ import android.widget.ListAdapter;
import android.widget.TextView;
import com.android.contacts.common.R;
-import com.android.contacts.common.editor.SelectAccountDialogFragment;
import java.util.List;
@@ -46,7 +45,7 @@ import java.util.List;
public class SelectPhoneAccountDialogFragment extends DialogFragment {
private List<PhoneAccountHandle> mAccountHandles;
private boolean mIsSelected;
- private TelecommManager mTelecommManager;
+ private TelecomManager mTelecomManager;
private final String mUriScheme;
/**
@@ -69,9 +68,9 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
mIsSelected = false;
- mTelecommManager =
- (TelecommManager) getActivity().getSystemService(Context.TELECOMM_SERVICE);
- mAccountHandles = mTelecommManager.getPhoneAccountsSupportingScheme(mUriScheme);
+ mTelecomManager =
+ (TelecomManager) getActivity().getSystemService(Context.TELECOM_SERVICE);
+ mAccountHandles = mTelecomManager.getPhoneAccountsSupportingScheme(mUriScheme);
final DialogInterface.OnClickListener selectionListener =
new DialogInterface.OnClickListener() {
@@ -128,7 +127,7 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment {
}
PhoneAccountHandle accountHandle = getItem(position);
- PhoneAccount account = mTelecommManager.getPhoneAccount(accountHandle);
+ PhoneAccount account = mTelecomManager.getPhoneAccount(accountHandle);
holder.textView.setText(account.getLabel());
holder.imageView.setImageDrawable(account.getIcon(mContext));
return rowView;
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index 752283646..4fa9c39ff 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -29,7 +29,7 @@ import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import android.os.Message;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
import android.text.TextUtils;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
diff --git a/InCallUI/src/com/android/incallui/TelecommAdapter.java b/InCallUI/src/com/android/incallui/TelecomAdapter.java
index bf7f51d07..5f32c7e47 100644
--- a/InCallUI/src/com/android/incallui/TelecommAdapter.java
+++ b/InCallUI/src/com/android/incallui/TelecomAdapter.java
@@ -20,33 +20,33 @@ import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.os.Looper;
-import android.telecomm.InCallAdapter;
-import android.telecomm.Phone;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.InCallAdapter;
+import android.telecom.Phone;
+import android.telecom.PhoneAccountHandle;
-import android.telecomm.PhoneCapabilities;
+import android.telecom.PhoneCapabilities;
import com.google.common.base.Preconditions;
import java.util.List;
/** Wrapper around {@link InCallAdapter} that only forwards calls to the adapter when it's valid. */
-final class TelecommAdapter implements InCallPhoneListener {
+final class TelecomAdapter implements InCallPhoneListener {
private static final String ADD_CALL_MODE_KEY = "add_call_mode";
- private static TelecommAdapter sInstance;
+ private static TelecomAdapter sInstance;
private Context mContext;
private Phone mPhone;
- static TelecommAdapter getInstance() {
+ static TelecomAdapter getInstance() {
Preconditions.checkState(Looper.getMainLooper().getThread() == Thread.currentThread());
if (sInstance == null) {
- sInstance = new TelecommAdapter();
+ sInstance = new TelecomAdapter();
}
return sInstance;
}
- private TelecommAdapter() {
+ private TelecomAdapter() {
}
void setContext(Context context) {
@@ -63,7 +63,7 @@ final class TelecommAdapter implements InCallPhoneListener {
mPhone = null;
}
- private android.telecomm.Call getTelecommCallById(String callId) {
+ private android.telecom.Call getTelecommCallById(String callId) {
return CallList.getInstance().getCallById(callId).getTelecommCall();
}
@@ -149,8 +149,8 @@ final class TelecommAdapter implements InCallPhoneListener {
void merge(String callId) {
if (mPhone != null) {
- android.telecomm.Call call = getTelecommCallById(callId);
- List<android.telecomm.Call> conferenceable = call.getConferenceableCalls();
+ android.telecom.Call call = getTelecommCallById(callId);
+ List<android.telecom.Call> conferenceable = call.getConferenceableCalls();
if (!conferenceable.isEmpty()) {
call.conference(conferenceable.get(0));
} else {
@@ -166,7 +166,7 @@ final class TelecommAdapter implements InCallPhoneListener {
void swap(String callId) {
if (mPhone != null) {
- android.telecomm.Call call = getTelecommCallById(callId);
+ android.telecom.Call call = getTelecommCallById(callId);
int capabilities = call.getDetails().getCallCapabilities();
if (0 != (capabilities & PhoneCapabilities.SWAP_CONFERENCE)) {
call.swapConference();
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index 452360554..ed0024126 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -19,9 +19,9 @@ package com.android.incallui;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Handler;
-import android.telecomm.AudioState;
-import android.telecomm.CameraCapabilities;
-import android.telecomm.InCallService.VideoCall;
+import android.telecom.AudioState;
+import android.telecom.CameraCapabilities;
+import android.telecom.InCallService.VideoCall;
import android.view.Surface;
import com.android.contacts.common.CallUtil;
@@ -340,7 +340,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
* @param details The new call details.
*/
@Override
- public void onDetailsChanged(Call call, android.telecomm.Call.Details details) {
+ public void onDetailsChanged(Call call, android.telecom.Call.Details details) {
// If the details change is not for the currently active call no update is required.
if (!call.equals(mPrimaryCall)) {
return;
@@ -427,7 +427,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
mPreVideoAudioMode = AudioModeProvider.getInstance().getAudioMode();
- TelecommAdapter.getInstance().setAudioRoute(AudioState.ROUTE_SPEAKER);
+ TelecomAdapter.getInstance().setAudioRoute(AudioState.ROUTE_SPEAKER);
}
/**
@@ -442,7 +442,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
ui.showVideoUi(false);
if (mPreVideoAudioMode != AudioModeProvider.AUDIO_MODE_INVALID) {
- TelecommAdapter.getInstance().setAudioRoute(mPreVideoAudioMode);
+ TelecomAdapter.getInstance().setAudioRoute(mPreVideoAudioMode);
mPreVideoAudioMode = AudioModeProvider.AUDIO_MODE_INVALID;
}
}