diff options
author | Nancy Chen <nancychen@google.com> | 2014-07-09 10:28:41 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2014-07-09 17:26:17 -0700 |
commit | 659d2f22f093b9549a3d5f7722f6151932c9e93f (patch) | |
tree | b81cb2d89598ca7b6d31f2ac0be9dacf2039a0b7 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 6fcf29e37dd18aef65f47d3bb87ea340946bfc39 (diff) |
Remove SelectAccountDialogFragment for PhoneAccount on Dialer app (1/2)
One-time select will no longer be available within the dialer app so the
fragment and menu item have been removed.
Bug: 15473965
Change-Id: I13410b328f5b5ce887b8f3a9ba2c734d58008c56
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 0c1450a8c..450b9af75 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -39,7 +39,6 @@ import android.provider.Contacts.People; import android.provider.Contacts.Phones; import android.provider.Contacts.PhonesColumns; import android.provider.Settings; -import android.telecomm.PhoneAccount; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; @@ -68,9 +67,6 @@ import android.widget.TextView; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; - -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.DialtactsActivity; @@ -97,8 +93,6 @@ public class DialpadFragment extends Fragment DialpadKeyButton.OnPressedListener { private static final String TAG = DialpadFragment.class.getSimpleName(); - private static PhoneAccountManager mAccountManager; - /** * This interface allows the DialpadFragment to tell its hosting Activity when and when not * to display the "dial" button. While this is logically part of the DialpadFragment, the @@ -852,9 +846,7 @@ public class DialpadFragment extends Fragment @Override public void show() { final Menu menu = getMenu(); - final MenuItem selectAccount = menu.findItem(R.id.menu_select_account); final MenuItem sendMessage = menu.findItem(R.id.menu_send_message); - selectAccount.setVisible(mAccountManager != null); sendMessage.setVisible(mSmsPackageComponentName != null); boolean enable = !isDigitsEmpty(); @@ -1073,15 +1065,9 @@ public class DialpadFragment extends Fragment // Clear the digits just in case. clearDialpad(); } else { - final PhoneAccount account = mAccountManager != null? - mAccountManager.getCurrentAccount() : null; - - final Intent intent = CallUtil.getCallIntent(number, (getActivity() instanceof DialtactsActivity ? - ((DialtactsActivity) getActivity()).getCallOrigin() : null), - account - ); + ((DialtactsActivity) getActivity()).getCallOrigin() : null)); DialerUtils.startActivityWithErrorToast(getActivity(), intent); hideAndClearDialpad(false); } @@ -1441,10 +1427,6 @@ public class DialpadFragment extends Fragment DialerUtils.startActivityWithErrorToast(getActivity(), smsIntent); return true; } - case R.id.menu_select_account: - SelectAccountDialogFragment.show(getFragmentManager(), mAccountManager); - return true; - default: return false; } @@ -1614,10 +1596,6 @@ public class DialpadFragment extends Fragment return mAnimate; } - public void setAccountManager(PhoneAccountManager accountManager) { - mAccountManager = accountManager; - } - public void setYFraction(float yFraction) { ((DialpadSlidingLinearLayout) getView()).setYFraction(yFraction); } |