summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calldetails
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/calldetails
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/calldetails')
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsActivity.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/java/com/android/dialer/calldetails/CallDetailsActivity.java b/java/com/android/dialer/calldetails/CallDetailsActivity.java
index 3a3c9118a..6ba31e624 100644
--- a/java/com/android/dialer/calldetails/CallDetailsActivity.java
+++ b/java/com/android/dialer/calldetails/CallDetailsActivity.java
@@ -30,10 +30,8 @@ import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
-import android.telephony.TelephonyManager;
import android.view.MenuItem;
import android.widget.Toast;
-import com.android.dialer.assisteddialing.ConcreteCreator;
import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry;
import com.android.dialer.callintent.CallInitiationType;
import com.android.dialer.callintent.CallIntentBuilder;
@@ -243,10 +241,7 @@ public class CallDetailsActivity extends AppCompatActivity
CallIntentBuilder callIntentBuilder =
new CallIntentBuilder(phoneNumber + postDialDigits, CallInitiationType.Type.CALL_DETAILS);
if (canSupportedAssistedDialing) {
- callIntentBuilder.setAllowAssistedDial(
- true,
- ConcreteCreator.createNewAssistedDialingMediator(
- getSystemService(TelephonyManager.class), this));
+ callIntentBuilder.setAllowAssistedDial(true);
}
DialerUtils.startActivityWithErrorToast(this, callIntentBuilder.build());