diff options
author | Ihab Awad <ihab@google.com> | 2014-06-30 21:24:01 -0700 |
---|---|---|
committer | Ihab Awad <ihab@google.com> | 2014-07-02 12:38:30 -0700 |
commit | 1d1bd0da0b32a5b8cb1c7c5585acccb180b19849 (patch) | |
tree | 9bca7648e00e95e177c8fd52fa775f3e16769228 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | e9b9290142e0e0e767536bc0e8f89f80f7ad3926 (diff) |
Rename Telecomm "Subscription" to "Account" (3/7)
Change-Id: I866e9d4f629a2b23acb3d3d3f2baeb0a674522f7
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 9752aa7fb..f9139c7b7 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -34,13 +34,11 @@ import android.media.AudioManager; import android.media.ToneGenerator; import android.net.Uri; import android.os.Bundle; -import android.os.RemoteException; -import android.os.ServiceManager; import android.provider.Contacts.People; import android.provider.Contacts.Phones; import android.provider.Contacts.PhonesColumns; import android.provider.Settings; -import android.telecomm.Subscription; +import android.telecomm.PhoneAccount; import android.telecomm.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; @@ -59,8 +57,6 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; -import android.view.ViewTreeObserver; -import android.view.ViewTreeObserver.OnPreDrawListener; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.EditText; @@ -68,13 +64,12 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.PopupMenu; -import android.widget.TableRow; import android.widget.TextView; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; -import com.android.contacts.common.SubscriptionManager; -import com.android.contacts.common.dialog.SelectSubscriptionDialogFragment; +import com.android.contacts.common.PhoneAccountManager; +import com.android.contacts.common.dialog.SelectAccountDialogFragment; import com.android.contacts.common.util.PhoneNumberFormatter; import com.android.contacts.common.util.StopWatch; import com.android.dialer.NeededForReflection; @@ -101,7 +96,7 @@ public class DialpadFragment extends Fragment DialpadKeyButton.OnPressedListener { private static final String TAG = DialpadFragment.class.getSimpleName(); - private static SubscriptionManager mSubscriptionManager; + private static PhoneAccountManager mAccountManager; /** * This interface allows the DialpadFragment to tell its hosting Activity when and when not @@ -856,9 +851,9 @@ public class DialpadFragment extends Fragment @Override public void show() { final Menu menu = getMenu(); - final MenuItem selectSubscription = menu.findItem(R.id.menu_select_subscription); + final MenuItem selectAccount = menu.findItem(R.id.menu_select_account); final MenuItem sendMessage = menu.findItem(R.id.menu_send_message); - selectSubscription.setVisible(mSubscriptionManager != null); + selectAccount.setVisible(mAccountManager != null); sendMessage.setVisible(mSmsPackageComponentName != null); boolean enable = !isDigitsEmpty(); @@ -1077,14 +1072,15 @@ public class DialpadFragment extends Fragment // Clear the digits just in case. clearDialpad(); } else { - final Subscription subscription = mSubscriptionManager != null? - mSubscriptionManager.getCurrentSubscription() : null; + final PhoneAccount account = mAccountManager != null? + mAccountManager.getCurrentAccount() : null; final Intent intent = CallUtil.getCallIntent(number, (getActivity() instanceof DialtactsActivity ? ((DialtactsActivity) getActivity()).getCallOrigin() : null), - subscription); + account + ); DialerUtils.startActivityWithErrorToast(getActivity(), intent); hideAndClearDialpad(false); } @@ -1444,8 +1440,8 @@ public class DialpadFragment extends Fragment DialerUtils.startActivityWithErrorToast(getActivity(), smsIntent); return true; } - case R.id.menu_select_subscription: - SelectSubscriptionDialogFragment.show(getFragmentManager(), mSubscriptionManager); + case R.id.menu_select_account: + SelectAccountDialogFragment.show(getFragmentManager(), mAccountManager); return true; default: @@ -1617,8 +1613,8 @@ public class DialpadFragment extends Fragment return mAnimate; } - public void setSubscriptionManager(SubscriptionManager subscriptionManager) { - mSubscriptionManager = subscriptionManager; + public void setAccountManager(PhoneAccountManager accountManager) { + mAccountManager = accountManager; } public void setYFraction(float yFraction) { |