Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3ffa491 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Cannot direct dial or video call from Dialer search results.

- Change made in partner CL introduced a regression in dialing from
the search results:
https://partner-android-review.googlesource.com/#/c/206297/
The problem with that change is that it was intended to ensure that the +
was not stripped off when dialing from the dial pad.  It had the
unintential impact of rendering direct dial from the search box inoperative.
since mAddToContactNumber was null in this case.

Bug: 20068746
Change-Id: Ic3a75ccf00164e7c865cc633a6a16d1699227ed2
parent b1dff5e8
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -180,9 +180,10 @@ public class SearchFragment extends PhoneNumberPickerFragment {
        final DialerPhoneNumberListAdapter adapter = (DialerPhoneNumberListAdapter) getAdapter();
        final int shortcutType = adapter.getShortcutTypeFromPosition(position);
        final OnPhoneNumberPickerActionListener listener;
        final String phoneNumber = TextUtils.isEmpty(mAddToContactNumber) ?
                adapter.getQueryString() : mAddToContactNumber;

        boolean ret = checkForProhibitedPhoneNumber(mAddToContactNumber);

        boolean ret = checkForProhibitedPhoneNumber(phoneNumber);
        switch (shortcutType) {
            case DialerPhoneNumberListAdapter.SHORTCUT_INVALID:
                super.onItemClick(position, id);
@@ -190,7 +191,7 @@ public class SearchFragment extends PhoneNumberPickerFragment {
            case DialerPhoneNumberListAdapter.SHORTCUT_DIRECT_CALL:
                listener = getOnPhoneNumberPickerListener();
                if (listener != null && !ret) {
                    listener.onCallNumberDirectly(mAddToContactNumber);
                    listener.onCallNumberDirectly(phoneNumber);
                }
                break;
            case DialerPhoneNumberListAdapter.SHORTCUT_ADD_NUMBER_TO_CONTACTS:
@@ -203,7 +204,7 @@ public class SearchFragment extends PhoneNumberPickerFragment {
            case DialerPhoneNumberListAdapter.SHORTCUT_MAKE_VIDEO_CALL:
                listener = getOnPhoneNumberPickerListener();
                if (listener != null && !ret) {
                    listener.onCallNumberDirectly(mAddToContactNumber, true /* isVideoCall */);
                    listener.onCallNumberDirectly(phoneNumber, true /* isVideoCall */);
                }
                break;
        }