summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2017-11-29 14:49:47 -0800
committerCopybara-Service <copybara-piper@google.com>2017-11-29 17:03:56 -0800
commitaff2a94e0c7ef06992d0e54f1b298842bba76229 (patch)
treedf66ef3626911aeb5eab2a3a75b064dd979229e9
parent226b01b4fb3a6342dd5acf5531d9c44744eab031 (diff)
Add flag to control default assisted dialing state during precall flow.
Currently, the only other client that is initiating calls is Contacts, and we consider that to be a non-idle-dial. Bug: 69860859 Test: existing unit tests PiperOrigin-RevId: 177367226 Change-Id: I22de38dc973f5a1eecfe42833110690744c317fd
-rw-r--r--java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java b/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java
index a7811fe6a..f79546e54 100644
--- a/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java
+++ b/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java
@@ -23,6 +23,8 @@ import android.os.Bundle;
import android.support.annotation.Nullable;
import com.android.dialer.callintent.CallInitiationType.Type;
import com.android.dialer.callintent.CallIntentBuilder;
+import com.android.dialer.configprovider.ConfigProvider;
+import com.android.dialer.configprovider.ConfigProviderBindings;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.precall.PreCall;
@@ -50,13 +52,18 @@ public class LaunchPreCallActivity extends Activity {
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Logger.get(this).logImpression(DialerImpression.Type.PRECALL_INITIATED_EXTERNAL);
+
+ ConfigProvider configProvider = ConfigProviderBindings.get(getApplicationContext());
Intent intent = getIntent();
CallIntentBuilder builder = new CallIntentBuilder(intent.getData(), Type.EXTERNAL_INITIATION);
builder
.setPhoneAccountHandle(intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE))
.setIsVideoCall(intent.getBooleanExtra(EXTRA_IS_VIDEO_CALL, false))
.setCallSubject(intent.getStringExtra(EXTRA_CALL_SUBJECT))
- .setAllowAssistedDial(intent.getBooleanExtra(EXTRA_ALLOW_ASSISTED_DIAL, false));
+ .setAllowAssistedDial(
+ intent.getBooleanExtra(
+ EXTRA_ALLOW_ASSISTED_DIAL,
+ configProvider.getBoolean("assisted_dialing_default_precall_state", false)));
PreCall.start(this, builder);
finish();
}