From 071d0a4f1c8cf6b6131b7aeabfd2c6b0560b413f Mon Sep 17 00:00:00 2001 From: Anne Rong Date: Tue, 29 Sep 2015 15:15:26 -0700 Subject: Rename OnPhoneNumberPickerActionListener methods Bug: 24506966 Change-Id: Ibc1d334fc18235c3d5971364d7024db61c590c46 --- src/com/android/dialer/DialtactsActivity.java | 5 ++--- .../dialer/filterednumber/BlockedNumberSearchActivity.java | 7 +++---- src/com/android/dialer/list/BlockedListSearchFragment.java | 4 ++-- src/com/android/dialer/list/SearchFragment.java | 9 ++------- src/com/android/dialer/list/SpeedDialFragment.java | 5 ++--- 5 files changed, 11 insertions(+), 19 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 6f8f34167..9978bbedc 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -1252,15 +1252,14 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } @Override - public void onPickPhoneNumberAction(Uri dataUri, int callInitiationType) { + public void onPickDataUri(Uri dataUri, int callInitiationType) { mClearSearchOnPause = true; PhoneNumberInteraction.startInteractionForPhoneCall( DialtactsActivity.this, dataUri, callInitiationType); } @Override - public void onCallNumberDirectly(String phoneNumber, boolean isVideoCall, - int callInitiationType) { + public void onPickPhoneNumber(String phoneNumber, boolean isVideoCall, int callInitiationType) { if (phoneNumber == null) { // Invalid phone number, but let the call go through so that InCallUI can show // an error message. diff --git a/src/com/android/dialer/filterednumber/BlockedNumberSearchActivity.java b/src/com/android/dialer/filterednumber/BlockedNumberSearchActivity.java index 5831ddc4a..a8cbfb3ca 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumberSearchActivity.java +++ b/src/com/android/dialer/filterednumber/BlockedNumberSearchActivity.java @@ -137,13 +137,12 @@ public class BlockedNumberSearchActivity extends AppCompatActivity } @Override - public void onPickPhoneNumberAction(Uri dataUri, int callInitiationType) { - Log.w(TAG, "onPickPhoneNumberAction unsupported, ignoring."); + public void onPickDataUri(Uri dataUri, int callInitiationType) { + Log.w(TAG, "onPickDataUri unsupported, ignoring."); } @Override - public void onCallNumberDirectly( - String phoneNumber, boolean isVideoCall, int callInitiationType) { + public void onPickPhoneNumber(String phoneNumber, boolean isVideoCall, int callInitiationType) { blockNumber(phoneNumber); } diff --git a/src/com/android/dialer/list/BlockedListSearchFragment.java b/src/com/android/dialer/list/BlockedListSearchFragment.java index bd1dd6f9e..d02577228 100644 --- a/src/com/android/dialer/list/BlockedListSearchFragment.java +++ b/src/com/android/dialer/list/BlockedListSearchFragment.java @@ -47,12 +47,12 @@ public class BlockedListSearchFragment extends RegularSearchFragment { case DialerPhoneNumberListAdapter.SHORTCUT_INVALID: // Handles click on a search result, either contact or nearby places result. number = adapter.getPhoneNumber(position); - listener.onCallNumberDirectly(number, false, getCallInitiationType(false)); + listener.onPickPhoneNumber(number, false, getCallInitiationType(false)); break; case DialerPhoneNumberListAdapter.SHORTCUT_BLOCK_NUMBER: // Handles click on 'Block number' shortcut to add the user query as a number. number = adapter.getQueryString(); - listener.onCallNumberDirectly(number, false, getCallInitiationType(false)); + listener.onPickPhoneNumber(number, false, getCallInitiationType(false)); break; default: Log.w(TAG, "Ignoring unsupported shortcut type: " + shortcutType); diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java index f75fa0f83..1c895d3af 100644 --- a/src/com/android/dialer/list/SearchFragment.java +++ b/src/com/android/dialer/list/SearchFragment.java @@ -25,13 +25,10 @@ import android.app.DialogFragment; import android.content.Intent; import android.content.res.Configuration; import android.content.res.Resources; -import android.net.Uri; import android.os.Bundle; -import android.provider.ContactsContract; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.animation.Interpolator; @@ -47,13 +44,11 @@ import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; import com.android.contacts.common.list.PhoneNumberPickerFragment; import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.common.util.ViewUtil; -import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.dialer.dialpad.DialpadFragment.ErrorDialogFragment; import com.android.dialer.R; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; import com.android.dialer.widget.EmptyContentView; -import com.android.incallui.Call.LogState; import com.android.phone.common.animation.AnimUtils; public class SearchFragment extends PhoneNumberPickerFragment { @@ -253,7 +248,7 @@ public class SearchFragment extends PhoneNumberPickerFragment { number = adapter.getQueryString(); listener = getOnPhoneNumberPickerListener(); if (listener != null && !checkForProhibitedPhoneNumber(number)) { - listener.onCallNumberDirectly(number, false /* isVideoCall */, + listener.onPickPhoneNumber(number, false /* isVideoCall */, getCallInitiationType(false /* isRemoteDirectory */)); } break; @@ -279,7 +274,7 @@ public class SearchFragment extends PhoneNumberPickerFragment { number = adapter.getQueryString(); listener = getOnPhoneNumberPickerListener(); if (listener != null && !checkForProhibitedPhoneNumber(number)) { - listener.onCallNumberDirectly(number, true /* isVideoCall */, + listener.onPickPhoneNumber(number, true /* isVideoCall */, getCallInitiationType(false /* isRemoteDirectory */)); } break; diff --git a/src/com/android/dialer/list/SpeedDialFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java index 7b72e453d..64129cdea 100644 --- a/src/com/android/dialer/list/SpeedDialFragment.java +++ b/src/com/android/dialer/list/SpeedDialFragment.java @@ -52,7 +52,6 @@ import com.android.contacts.common.list.ContactTileView; import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; import com.android.contacts.common.util.PermissionsUtil; import com.android.dialer.R; -import com.android.dialer.util.DialerUtils; import com.android.dialer.widget.EmptyContentView; import com.android.incallui.Call.LogState; @@ -116,7 +115,7 @@ public class SpeedDialFragment extends Fragment implements OnItemClickListener, @Override public void onContactSelected(Uri contactUri, Rect targetRect) { if (mPhoneNumberPickerActionListener != null) { - mPhoneNumberPickerActionListener.onPickPhoneNumberAction(contactUri, + mPhoneNumberPickerActionListener.onPickDataUri(contactUri, LogState.INITIATION_SPEED_DIAL); } } @@ -124,7 +123,7 @@ public class SpeedDialFragment extends Fragment implements OnItemClickListener, @Override public void onCallNumberDirectly(String phoneNumber) { if (mPhoneNumberPickerActionListener != null) { - mPhoneNumberPickerActionListener.onCallNumberDirectly(phoneNumber, + mPhoneNumberPickerActionListener.onPickPhoneNumber(phoneNumber, false /* isVideoCall */, LogState.INITIATION_SPEED_DIAL); } } -- cgit v1.2.3