summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-11-30 01:09:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-11-30 01:09:36 +0000
commitb1e7530af2bfa14984525e23be17ac1ac5db6b8d (patch)
treef014d4d8bf517691586a84dfa43a37099d12061a
parent226b01b4fb3a6342dd5acf5531d9c44744eab031 (diff)
parentaa5a8ad237407a8a3be6947c57a5fbd4d7b61bc2 (diff)
Merge changes Id7954667,I22de38dc
* changes: Bump API ceiling for Assisted Dialing. Add flag to control default assisted dialing state during precall flow.
-rw-r--r--java/com/android/dialer/assisteddialing/ConcreteCreator.java5
-rw-r--r--java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java9
2 files changed, 11 insertions, 3 deletions
diff --git a/java/com/android/dialer/assisteddialing/ConcreteCreator.java b/java/com/android/dialer/assisteddialing/ConcreteCreator.java
index 1563b3513..8a5661e03 100644
--- a/java/com/android/dialer/assisteddialing/ConcreteCreator.java
+++ b/java/com/android/dialer/assisteddialing/ConcreteCreator.java
@@ -41,8 +41,9 @@ public final class ConcreteCreator {
// Floor set at N due to use of Optional.
protected static final int BUILD_CODE_FLOOR = Build.VERSION_CODES.N;
- // Ceiling set at O because this feature will ship as part of the framework in P.
- @VisibleForTesting public static final int BUILD_CODE_CEILING = Build.VERSION_CODES.O;
+ // Ceiling set at O_MR1 because this feature will ship as part of the framework in P.
+ // TODO(erfanian): Switch to public build constant when 27 is available in public master.
+ @VisibleForTesting public static final int BUILD_CODE_CEILING = 27;
/**
* Creates a new AssistedDialingMediator
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();
}