diff options
author | zachh <zachh@google.com> | 2017-10-15 03:12:11 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-15 03:12:11 +0000 |
commit | c65e72a5209b4704acf4e31d8fdd51fb9912fedc (patch) | |
tree | abe92880449fd62a812cbbef4fae354aa065dc18 /java/com/android/dialer/assisteddialing/ConcreteCreator.java | |
parent | df9439576695bb8e9aeb647849d4b0461af4b8b5 (diff) | |
parent | 4114f539e72fa7b3be26949a2b33aa8ce25a68ea (diff) |
Merge changes If86250b1,Ib2a01013
am: 4114f539e7
Change-Id: I7db988c15ae33c9335a534ed103f11aa437f3bfc
Diffstat (limited to 'java/com/android/dialer/assisteddialing/ConcreteCreator.java')
-rw-r--r-- | java/com/android/dialer/assisteddialing/ConcreteCreator.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/com/android/dialer/assisteddialing/ConcreteCreator.java b/java/com/android/dialer/assisteddialing/ConcreteCreator.java index 49d3b1f87..a8a9d2ab3 100644 --- a/java/com/android/dialer/assisteddialing/ConcreteCreator.java +++ b/java/com/android/dialer/assisteddialing/ConcreteCreator.java @@ -23,6 +23,7 @@ import android.os.Build.VERSION_CODES; import android.support.annotation.NonNull; import android.telephony.TelephonyManager; import com.android.dialer.common.LogUtil; +import com.android.dialer.configprovider.ConfigProvider; import com.android.dialer.configprovider.ConfigProviderBindings; /** @@ -50,6 +51,8 @@ public final class ConcreteCreator { public static AssistedDialingMediator createNewAssistedDialingMediator( @NonNull TelephonyManager telephonyManager, @NonNull Context context) { + ConfigProvider configProvider = ConfigProviderBindings.get(context); + if (telephonyManager == null) { LogUtil.i( "ConcreteCreator.createNewAssistedDialingMediator", "provided TelephonyManager was null"); @@ -61,11 +64,13 @@ public final class ConcreteCreator { } if ((Build.VERSION.SDK_INT < BUILD_CODE_FLOOR || Build.VERSION.SDK_INT > BUILD_CODE_CEILING) - || !ConfigProviderBindings.get(context).getBoolean("assisted_dialing_enabled", false)) { + || !configProvider.getBoolean("assisted_dialing_enabled", false)) { return new AssistedDialingMediatorStub(); } - Constraints constraints = new Constraints(context); + Constraints constraints = + new Constraints( + context, configProvider.getString("assisted_dialing_csv_country_codes", "")); return new AssistedDialingMediatorImpl( new LocationDetector(telephonyManager), new NumberTransformer(constraints)); } |