summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/Call.java5
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java8
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java4
3 files changed, 12 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index f47a4c39a..d82346ebb 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -34,6 +34,7 @@ import android.text.TextUtils;
import com.android.contacts.common.CallUtil;
import com.android.contacts.common.compat.SdkVersionOverride;
+import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.dialer.util.IntentUtil;
import com.android.incallui.compat.telecom.DetailsCompat;
@@ -176,6 +177,7 @@ public class Call {
return mCameraDirection;
}
+ @Override
public String toString() {
return "(CameraDir:" + getCameraDir() + ")";
}
@@ -608,7 +610,8 @@ public class Call {
if (mPhoneAccountHandle != null) {
TelecomManager mgr = InCallPresenter.getInstance().getTelecomManager();
- PhoneAccount phoneAccount = mgr.getPhoneAccount(mPhoneAccountHandle);
+ PhoneAccount phoneAccount =
+ TelecomManagerCompat.getPhoneAccount(mgr, mPhoneAccountHandle);
if (phoneAccount != null) {
mIsCallSubjectSupported = phoneAccount.hasCapabilities(
PhoneAccount.CAPABILITY_CALL_SUBJECT);
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 47b63c0f9..a0c1cef86 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -385,7 +385,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
PhoneAccountHandle accountHandle = mPrimary.getAccountHandle();
if (accountHandle != null) {
TelecomManager mgr = InCallPresenter.getInstance().getTelecomManager();
- PhoneAccount account = mgr.getPhoneAccount(accountHandle);
+ PhoneAccount account = TelecomManagerCompat.getPhoneAccount(mgr, accountHandle);
if (account != null) {
return getNumberFromHandle(account.getSubscriptionAddress());
}
@@ -823,7 +823,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
if (accountHandle == null) {
return null;
}
- return InCallPresenter.getInstance().getTelecomManager().getPhoneAccount(accountHandle);
+ return TelecomManagerCompat.getPhoneAccount(
+ InCallPresenter.getInstance().getTelecomManager(),
+ accountHandle);
}
/**
@@ -843,7 +845,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
PhoneAccount account = getAccountForCall(call);
TelecomManager mgr = InCallPresenter.getInstance().getTelecomManager();
if (account != null && !TextUtils.isEmpty(account.getLabel())
- && mgr.getCallCapablePhoneAccounts().size() > 1) {
+ && TelecomManagerCompat.getCallCapablePhoneAccounts(mgr).size() > 1) {
return account.getLabel().toString();
}
return null;
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index d4dbda82a..f50da8dbd 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -44,6 +44,7 @@ import android.view.WindowManager;
import com.android.contacts.common.GeoUtil;
import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.compat.SdkVersionOverride;
+import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
import com.android.contacts.common.interactions.TouchPointManager;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
@@ -1791,7 +1792,8 @@ public class InCallPresenter implements CallList.Listener,
final TelecomManager tm = getTelecomManager();
if (tm != null) {
- final PhoneAccount account = tm.getPhoneAccount(phoneAccountHandle);
+ final PhoneAccount account =
+ TelecomManagerCompat.getPhoneAccount(tm, phoneAccountHandle);
// For single-sim devices, there will be no selected highlight color, so the phone
// account will default to NO_HIGHLIGHT_COLOR.
if (account != null && CompatUtils.isLollipopMr1Compatible()) {