From df22018185375d2de96673ee8f16d1520283d662 Mon Sep 17 00:00:00 2001 From: Ihab Awad Date: Mon, 30 Jun 2014 21:24:41 -0700 Subject: Rename Telecomm "Subscription" to "Account" (4/7) Change-Id: Ibefa8bedc4996014fc0a62b3deaa0aed0eec2b10 --- InCallUI/src/com/android/incallui/Call.java | 12 +++---- .../src/com/android/incallui/CallCardFragment.java | 10 +++--- .../com/android/incallui/CallCardPresenter.java | 38 +++++++++------------- .../com/android/incallui/InCallServiceImpl.java | 2 +- 4 files changed, 27 insertions(+), 35 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index d87c49384..22cc18234 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -21,9 +21,9 @@ import android.os.RemoteException; import android.telecomm.CallCapabilities; import android.telecomm.CallNumberPresentation; import android.telecomm.CallServiceDescriptor; +import android.telecomm.PhoneAccount; import android.telecomm.RemoteCallVideoProvider; import android.telecomm.GatewayInfo; -import android.telecomm.Subscription; import android.telephony.DisconnectCause; import com.google.common.collect.ImmutableSortedSet; @@ -109,7 +109,7 @@ public final class Call { private long mConnectTimeMillis = 0; private Uri mHandle; private GatewayInfo mGatewayInfo; - private Subscription mSubscription; + private PhoneAccount mAccount; private CallServiceDescriptor mCurrentCallServiceDescriptor; private CallServiceDescriptor mHandoffCallServiceDescriptor; private RemoteCallVideoProvider mCallVideoProvider; @@ -222,12 +222,12 @@ public final class Call { mGatewayInfo = gatewayInfo; } - public Subscription getSubscription() { - return mSubscription; + public PhoneAccount getAccount() { + return mAccount; } - public void setSubscription(Subscription subscription) { - mSubscription = subscription; + public void setAccount(PhoneAccount account) { + mAccount = account; } /** The descriptor for the call service currently routing this call. */ diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 933fbca30..701622044 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -455,7 +455,7 @@ public class CallCardFragment extends BaseFragment if (mIsWiFiCachedValue == true) { return mContext.getResources().getDrawable(R.drawable.ic_in_call_wifi); } - Subscription subscription = mPrimary.getSubscription(); - if (subscription != null) { - return subscription.getIcon(mContext); + PhoneAccount account = mPrimary.getAccount(); + if (account != null) { + return account.getIcon(mContext); } return null; } /** * Returns the label (line of text above the number/name) for any given call. - * For example, "calling via [Subscription/Google Voice/Wifi]" for outgoing calls. + * For example, "calling via [Account/Google Voice/Wifi]" for outgoing calls. */ private String getConnectionLabel() { if (hasOutgoingGatewayCall() && getUi() != null) { @@ -472,28 +464,28 @@ public class CallCardPresenter extends Presenter return null; } } - Subscription subscription = mPrimary.getSubscription(); - if (mIsWiFiCachedValue == true || subscription != null) { - // Label will be either subscription name or WiFi connection + PhoneAccount account = mPrimary.getAccount(); + if (mIsWiFiCachedValue == true || account != null) { + // Label will be either account name or WiFi connection // TODO: get the name of the wifi connection String wifiString = mContext.getString(R.string.wifi_constant); - return subscription == null? wifiString : subscription.getLabel(mContext); + return account == null? wifiString : account.getLabel(mContext); } return null; } private String getSecondaryCallProviderLabel() { - Subscription subscription = mSecondary.getSubscription(); - if (subscription != null) { - return subscription.getLabel(mContext); + PhoneAccount account = mSecondary.getAccount(); + if (account != null) { + return account.getLabel(mContext); } return null; } private Drawable getSecondaryCallProviderIcon() { - Subscription subscription = mSecondary.getSubscription(); - if (subscription != null) { - return subscription.getIcon(mContext); + PhoneAccount account = mSecondary.getAccount(); + if (account != null) { + return account.getIcon(mContext); } return null; } diff --git a/InCallUI/src/com/android/incallui/InCallServiceImpl.java b/InCallUI/src/com/android/incallui/InCallServiceImpl.java index 121321a13..c12920886 100644 --- a/InCallUI/src/com/android/incallui/InCallServiceImpl.java +++ b/InCallUI/src/com/android/incallui/InCallServiceImpl.java @@ -124,7 +124,7 @@ public class InCallServiceImpl extends InCallService { call.setCapabilities(telecommCall.getCapabilities()); call.setConnectTimeMillis(telecommCall.getConnectTimeMillis()); call.setGatewayInfo(telecommCall.getGatewayInfo()); - call.setSubscription(telecommCall.getSubscription()); + call.setAccount(telecommCall.getAccount()); call.setCurrentCallServiceDescriptor(telecommCall.getCurrentCallServiceDescriptor()); call.setHandoffCallServiceDescriptor(telecommCall.getHandoffCallServiceDescriptor()); call.setState(translateState(telecommCall.getState())); -- cgit v1.2.3