diff options
author | Evan Charlton <evanc@google.com> | 2014-07-20 12:32:00 -0700 |
---|---|---|
committer | Evan Charlton <evanc@google.com> | 2014-07-20 14:40:46 -0700 |
commit | b6f45c2768f5af916ee3257542a3ab03611c1f5e (patch) | |
tree | 03e5ec51a0e21ad7bbaff0a73c3397f034b1e735 | |
parent | 662f2404499c330e732b8742d6f720af512c8232 (diff) |
Rename PhoneAccountMetadata to PhoneAccount
Change-Id: I4597b14110c1cee7f637ec125b839852ef0f34c4
4 files changed, 29 insertions, 29 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 96a0bf43e..24294a03b 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -312,7 +312,7 @@ public final class Call { } public PhoneAccountHandle getAccountHandle() { - return mTelecommCall.getDetails().getAccount(); + return mTelecommCall.getDetails().getAccountHandle(); } public RemoteCallVideoProvider getCallVideoProvider() { diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index db1c56b08..a17729051 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -22,8 +22,8 @@ import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.telecomm.CallCapabilities; +import android.telecomm.PhoneAccount; import android.telecomm.PhoneAccountHandle; -import android.telecomm.PhoneAccountMetadata; import android.telecomm.StatusHints; import android.telecomm.TelecommManager; import android.telephony.DisconnectCause; @@ -228,9 +228,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> PhoneAccountHandle accountHandle = mPrimary.getAccountHandle(); if (accountHandle != null) { TelecommManager mgr = TelecommManager.from(mContext); - PhoneAccountMetadata metadata = mgr.getPhoneAccountMetadata(accountHandle); - if (metadata != null) { - return metadata.getSubscriptionNumber(); + PhoneAccount account = mgr.getPhoneAccount(accountHandle); + if (account != null) { + return account.getSubscriptionNumber(); } } return null; @@ -484,9 +484,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> private Drawable getConnectionIcon() { PhoneAccountHandle accountHandle = mPrimary.getAccountHandle(); if (accountHandle != null) { - PhoneAccountMetadata data = getTelecommManager().getPhoneAccountMetadata(accountHandle); - if (data != null) { - return data.getIcon(mContext); + PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle); + if (account != null) { + return account.getIcon(mContext); } } return null; @@ -511,9 +511,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } PhoneAccountHandle accountHandle = mPrimary.getAccountHandle(); if (accountHandle != null) { - PhoneAccountMetadata data = getTelecommManager().getPhoneAccountMetadata(accountHandle); - if (data != null) { - return data.getLabel(); + PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle); + if (account != null) { + return account.getLabel(); } } return null; @@ -522,9 +522,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> private String getSecondaryCallProviderLabel() { PhoneAccountHandle accountHandle = mSecondary.getAccountHandle(); if (accountHandle != null) { - PhoneAccountMetadata data = getTelecommManager().getPhoneAccountMetadata(accountHandle); - if (data != null) { - return data.getLabel(); + PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle); + if (account != null) { + return account.getLabel(); } } return null; @@ -533,9 +533,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> private Drawable getSecondaryCallProviderIcon() { PhoneAccountHandle accountHandle = mSecondary.getAccountHandle(); if (accountHandle != null) { - PhoneAccountMetadata data = getTelecommManager().getPhoneAccountMetadata(accountHandle); - if (data != null) { - return data.getIcon(mContext); + PhoneAccount account = getTelecommManager().getPhoneAccount(accountHandle); + if (account != null) { + return account.getIcon(mContext); } } return null; diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index ac802f0a0..cc7f1b9a0 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -695,7 +695,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { // we get an incoming call. final boolean startStartupSequence = (InCallState.INCOMING == newState); - // A dialog to show on top of the InCallUI to select a PhoneAccountHandle + // A dialog to show on top of the InCallUI to select a PhoneAccount final boolean showAccountPicker = (InCallState.WAITING_FOR_ACCOUNT == newState); // A new outgoing call indicates that the user just now dialed a number and when that diff --git a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java index 47c96e780..08152429d 100644 --- a/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java +++ b/InCallUI/src/com/android/incallui/SelectPhoneAccountDialogFragment.java @@ -16,6 +16,7 @@ package com.android.incallui; +import android.telecomm.PhoneAccount; import android.telecomm.PhoneAccountHandle; import android.app.AlertDialog; @@ -25,7 +26,6 @@ import android.app.FragmentManager; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.telecomm.PhoneAccountMetadata; import android.telecomm.TelecommManager; import android.view.LayoutInflater; import android.view.View; @@ -43,7 +43,7 @@ import java.util.List; * Dialog that allows the user to switch between default SIM cards */ public class SelectPhoneAccountDialogFragment extends DialogFragment { - private List<PhoneAccountHandle> mAccountHandless; + private List<PhoneAccountHandle> mAccountHandles; private boolean mIsSelected; private TelecommManager mTelecommManager; @@ -57,14 +57,14 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { mIsSelected = false; mTelecommManager = TelecommManager.from(getActivity()); - mAccountHandless = mTelecommManager.getEnabledPhoneAccounts(); + mAccountHandles = mTelecommManager.getEnabledPhoneAccounts(); final DialogInterface.OnClickListener selectionListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mIsSelected = true; - PhoneAccountHandle selectedAccountHandle = mAccountHandless.get(which); + PhoneAccountHandle selectedAccountHandle = mAccountHandles.get(which); InCallPresenter.getInstance().handleAccountSelection(selectedAccountHandle); } }; @@ -74,7 +74,7 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment { ListAdapter selectAccountListAdapter = new SelectAccountListAdapter( builder.getContext(), R.layout.select_account_list_item, - mAccountHandless); + mAccountHandles); return builder.setTitle(R.string.select_account_dialog_title) .setAdapter(selectAccountListAdapter, selectionListener) @@ -86,8 +86,8 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment { private int mResId; public SelectAccountListAdapter( - Context context, int resource, List<PhoneAccountHandle> objects) { - super(context, resource, objects); + Context context, int resource, List<PhoneAccountHandle> accountHandles) { + super(context, resource, accountHandles); mContext = context; mResId = resource; } @@ -113,10 +113,10 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment { holder = (ViewHolder) rowView.getTag(); } - PhoneAccountHandle item = getItem(position); - PhoneAccountMetadata itemMetadata = mTelecommManager.getPhoneAccountMetadata(item); - holder.textView.setText(itemMetadata.getLabel()); - holder.imageView.setImageDrawable(itemMetadata.getIcon(mContext)); + PhoneAccountHandle accountHandle = getItem(position); + PhoneAccount account = mTelecommManager.getPhoneAccount(accountHandle); + holder.textView.setText(account.getLabel()); + holder.imageView.setImageDrawable(account.getIcon(mContext)); return rowView; } |