summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/searchfragment
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-11-07 13:22:58 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-11 12:18:32 -0800
commitfe23fd3894e266095d8c882b8dd66065f7092d5d (patch)
treed2ba5ce8d9702365fbe6faa35dbf5720c438f65a /java/com/android/dialer/searchfragment
parent7f3f33c6f7ee64dda756c3a51a610c9565a7ee63 (diff)
Make CallIntentBuilder parcelable
Multi-SIM and several other new features requires additional user input (ie. select the phone account to call with) or processing (ie. rewrite phone number for assisted dialing) before the call is actually made. The plan is to use a chain of pre-call actions to complete the dialing infomation,with the CallIntentBuilder holding the intermediate steps. For example, a pre-call action can examine the CallIntentBuilder and figure that the PhoneAccountHandle cannot be inferred, and show a dialog for the user the select it. Only after pre-call actions are completed, the intent is built and sent to telecom. Since pre-call actions involves dialogs and the process can be interrupted, the CallIntentBuilder must be persistable so the state can be restored. This CL made it parcelable so it can be stored with onSaveInstanceState(). The AssistedDialingMediator in CallIntentBuilder is temporarily removed as it would be called using a pre-call action in a future CL. Bug: 64216442 Test: CallIntentBuilderTest PiperOrigin-RevId: 174902775 Change-Id: Icf2f8fae620868d1a2f5acf0d08ae0a6bec4fb76
Diffstat (limited to 'java/com/android/dialer/searchfragment')
-rw-r--r--java/com/android/dialer/searchfragment/list/NewSearchFragment.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
index cd42a7476..c0a6700eb 100644
--- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
+++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
@@ -32,7 +32,6 @@ import android.support.annotation.VisibleForTesting;
import android.support.v13.app.FragmentCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
-import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -44,7 +43,6 @@ import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
import com.android.contacts.common.extensions.PhoneDirectoryExtenderAccessor;
import com.android.dialer.animation.AnimUtils;
-import com.android.dialer.assisteddialing.ConcreteCreator;
import com.android.dialer.callcomposer.CallComposerActivity;
import com.android.dialer.callintent.CallInitiationType;
import com.android.dialer.callintent.CallIntentBuilder;
@@ -488,11 +486,7 @@ public final class NewSearchFragment extends Fragment
Intent intent =
new CallIntentBuilder(phoneNumber, callSpecificAppData)
.setIsVideoCall(isVideoCall)
- .setAllowAssistedDial(
- allowAssistedDial,
- ConcreteCreator.createNewAssistedDialingMediator(
- getContext().getSystemService(TelephonyManager.class),
- getContext().getApplicationContext()))
+ .setAllowAssistedDial(allowAssistedDial)
.build();
DialerUtils.startActivityWithErrorToast(getActivity(), intent);
FragmentUtils.getParentUnsafe(this, SearchFragmentListener.class).onCallPlaced();