summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java24
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java24
2 files changed, 3 insertions, 45 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index b40a5fc41..7e14e228c 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -37,7 +37,6 @@ import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents;
import android.speech.RecognizerIntent;
import android.support.v4.view.ViewPager;
-import android.telecomm.PhoneAccount;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.text.TextUtils;
@@ -63,10 +62,8 @@ import android.widget.PopupMenu;
import android.widget.Toast;
import com.android.contacts.common.CallUtil;
-import com.android.contacts.common.PhoneAccountManager;
import com.android.contacts.common.activity.TransactionSafeActivity;
import com.android.contacts.common.dialog.ClearFrequentsDialog;
-import com.android.contacts.common.dialog.SelectAccountDialogFragment;
import com.android.contacts.common.interactions.ImportExportDialogFragment;
import com.android.contacts.common.list.OnPhoneNumberPickerActionListener;
import com.android.contacts.common.widget.FloatingActionButtonController;
@@ -199,11 +196,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
private boolean mIsLandscape;
/**
- * Information about the currently selected account.
- */
- private PhoneAccountManager mAccountManager = null;
-
- /**
* The position of the currently selected tab in the attached {@link ListsFragment}.
*/
private int mCurrentTabPosition = 0;
@@ -390,10 +382,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mIsLandscape = getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE;
- if (getTelephonyManager().getAccounts().size() > 1 && ENABLE_ACCOUNT_SELECT) {
- mAccountManager = new PhoneAccountManager(getTelephonyManager());
- }
-
final View floatingActionButtonContainer = findViewById(
R.id.floating_action_button_container);
mFloatingActionButton = (ImageButton) findViewById(R.id.floating_action_button);
@@ -601,9 +589,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
case R.id.menu_call_settings:
handleMenuSettings();
return true;
- case R.id.menu_select_account:
- SelectAccountDialogFragment.show(getFragmentManager(), mAccountManager);
- return true;
}
return false;
}
@@ -638,7 +623,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
}
mIsDialpadShown = true;
mDialpadFragment.setAnimate(animate);
- mDialpadFragment.setAccountManager(mAccountManager);
final FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.show(mDialpadFragment);
@@ -776,8 +760,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
final OptionsPopupMenu popupMenu = new OptionsPopupMenu(this, invoker);
popupMenu.inflate(R.menu.dialtacts_options);
final Menu menu = popupMenu.getMenu();
- final MenuItem selectAccount = menu.findItem(R.id.menu_select_account);
- selectAccount.setVisible(mAccountManager != null);
popupMenu.setOnMenuItemClickListener(this);
return popupMenu;
}
@@ -1112,11 +1094,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
@Override
public void onCallNumberDirectly(String phoneNumber, boolean isVideoCall) {
- final PhoneAccount account = mAccountManager != null ?
- mAccountManager.getCurrentAccount() : null;
Intent intent = isVideoCall ?
- CallUtil.getVideoCallIntent(phoneNumber, getCallOrigin(), account) :
- CallUtil.getCallIntent(phoneNumber, getCallOrigin(), account);
+ CallUtil.getVideoCallIntent(phoneNumber, getCallOrigin()) :
+ CallUtil.getCallIntent(phoneNumber, getCallOrigin());
DialerUtils.startActivityWithErrorToast(this, intent);
mClearSearchOnPause = true;
}
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);
}