Show dialog if multiple candidates exist
In GB we show a list of phone number to call in Favorites
screen, while we don't now.
Also refrain PhoneNumberInteraction from showing a dialog
by itself but let a nested class do instead. showDialog() is now
obsolete and we should use DialogFragment instead.
Bug: 4743008
Change-Id: I202963c2f03424f07ee386bd9713fde4091a0ae2
diff --git a/src/com/android/contacts/CallContactActivity.java b/src/com/android/contacts/CallContactActivity.java
index 77bf20c..b7c472a 100644
--- a/src/com/android/contacts/CallContactActivity.java
+++ b/src/com/android/contacts/CallContactActivity.java
@@ -32,12 +32,9 @@
*/
public class CallContactActivity extends ContactsActivity implements OnDismissListener {
- private PhoneNumberInteraction mPhoneNumberInteraction;
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- mPhoneNumberInteraction = new PhoneNumberInteraction(this, false, this);
Uri contactUri = getIntent().getData();
if (contactUri == null) {
@@ -51,7 +48,7 @@
}
if (Contacts.CONTENT_ITEM_TYPE.equals(getContentResolver().getType(contactUri))) {
- mPhoneNumberInteraction.startInteraction(contactUri);
+ PhoneNumberInteraction.startInteractionForPhoneCall(this, contactUri);
} else {
startActivity(new Intent(Intent.ACTION_CALL_PRIVILEGED, contactUri));
finish();
@@ -64,14 +61,4 @@
finish();
}
}
-
- @Override
- protected Dialog onCreateDialog(int id, Bundle args) {
- return mPhoneNumberInteraction.onCreateDialog(id, args);
- }
-
- @Override
- protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
- mPhoneNumberInteraction.onPrepareDialog(id, dialog, args);
- }
}