From 659d2f22f093b9549a3d5f7722f6151932c9e93f Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Wed, 9 Jul 2014 10:28:41 -0700 Subject: 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 --- .../android/dialer/dialpad/DialpadFragment.java | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/com/android/dialer/dialpad') 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); } -- cgit v1.2.3