diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-14 02:56:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-14 02:56:06 +0000 |
commit | 4114f539e72fa7b3be26949a2b33aa8ce25a68ea (patch) | |
tree | 07cd8d9e54558ed3e773871179726dd76e99c3bf /java/com/android/dialer/assisteddialing/ConcreteCreator.java | |
parent | f09b9f8f65c5dfd6ffff7526648ce7306f12f0c5 (diff) | |
parent | 20c2ff76b873471d41abf34b98abb414e4605c36 (diff) |
Merge changes If86250b1,Ib2a01013
* changes:
Fixed crash which occurred when clearing call log containing enriched call data.
Add config provider value for dynamic locales for assisted dialing.
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)); } |