summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java10
-rw-r--r--InCallUI/src/com/android/incallui/CallVideoClientNotifier.java2
-rw-r--r--InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java3
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallPresenter.java3
4 files changed, 12 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 3d7371088..c4913b59d 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -232,7 +232,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
// number directly from the telephony layer).
PhoneAccountHandle accountHandle = mPrimary.getAccountHandle();
if (accountHandle != null) {
- TelecommManager mgr = TelecommManager.from(mContext);
+ TelecommManager mgr =
+ (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
PhoneAccount account = mgr.getPhoneAccount(accountHandle);
if (account != null) {
return account.getSubscriptionNumber();
@@ -273,7 +274,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
return;
}
- String simNumber = TelephonyManager.from(mContext).getLine1Number();
+ final TelephonyManager telephonyManager =
+ (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
+ String simNumber = telephonyManager.getLine1Number();
if (!PhoneNumberUtils.compare(callbackNumber, simNumber) && !isEmergencyCall) {
Log.d(this, "Numbers are the same; not showing the callback number");
return;
@@ -630,7 +633,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
private TelecommManager getTelecommManager() {
if (mTelecommManager == null) {
- mTelecommManager = TelecommManager.from(mContext);
+ mTelecommManager =
+ (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
}
return mTelecommManager;
}
diff --git a/InCallUI/src/com/android/incallui/CallVideoClientNotifier.java b/InCallUI/src/com/android/incallui/CallVideoClientNotifier.java
index 2c048997f..d1e7f4c14 100644
--- a/InCallUI/src/com/android/incallui/CallVideoClientNotifier.java
+++ b/InCallUI/src/com/android/incallui/CallVideoClientNotifier.java
@@ -16,8 +16,8 @@
package com.android.incallui;
-import com.google.android.collect.Sets;
import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
import java.util.Set;
diff --git a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
index 08152429d..0bc97eda8 100644
--- a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
+++ b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java
@@ -56,7 +56,8 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
mIsSelected = false;
- mTelecommManager = TelecommManager.from(getActivity());
+ mTelecommManager =
+ (TelecommManager) getActivity().getSystemService(Context.TELECOMM_SERVICE);
mAccountHandles = mTelecommManager.getEnabledPhoneAccounts();
final DialogInterface.OnClickListener selectionListener =
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index 3f94995e0..12c95a3b9 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -16,12 +16,13 @@
package com.android.incallui;
+import com.google.common.base.Preconditions;
+
import com.android.incallui.CallVideoClientNotifier.SurfaceChangeListener;
import com.android.incallui.CallVideoClientNotifier.VideoEventListener;
import com.android.incallui.InCallPresenter.InCallDetailsListener;
import com.android.incallui.InCallPresenter.InCallStateListener;
import com.android.incallui.InCallPresenter.IncomingCallListener;
-import com.android.internal.util.Preconditions;
import android.content.Context;
import android.telecomm.RemoteCallVideoProvider;