diff --git a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java
index d700fb6..ce95c57 100644
--- a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java
+++ b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java
@@ -23,8 +23,8 @@
 import android.support.annotation.Nullable;
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.LogUtil;
-import com.android.dialer.inject.ApplicationContext;
 import com.android.dialer.storage.StorageComponent;
+import com.android.dialer.storage.Unencrypted;
 import com.android.dialer.strictmode.StrictModeUtils;
 import javax.inject.Inject;
 
@@ -49,14 +49,14 @@
  *     /data/user_de/0/com.android.dialer/shared_prefs/com.android.dialer_preferences.xml
  * </pre>
  */
-class SharedPrefConfigProvider implements ConfigProvider {
+public class SharedPrefConfigProvider implements ConfigProvider {
   private static final String PREF_PREFIX = "config_provider_prefs_";
 
-  private final Context appContext;
+  private final SharedPreferences sharedPreferences;
 
   @Inject
-  SharedPrefConfigProvider(@ApplicationContext Context appContext) {
-    this.appContext = appContext;
+  SharedPrefConfigProvider(@Unencrypted SharedPreferences sharedPreferences) {
+    this.sharedPreferences = sharedPreferences;
   }
 
   /** Service to write values into {@link SharedPrefConfigProvider} using adb. */
@@ -93,25 +93,29 @@
     }
   }
 
+  /** Set a boolean config value. */
+  public void putBoolean(String key, boolean value) {
+    sharedPreferences.edit().putBoolean(PREF_PREFIX + key, value).apply();
+  }
+
   @Override
   public String getString(String key, String defaultValue) {
     // Reading shared prefs on the main thread is generally safe since a single instance is cached.
     return StrictModeUtils.bypass(
-        () -> getSharedPrefs(appContext).getString(PREF_PREFIX + key, defaultValue));
+        () -> sharedPreferences.getString(PREF_PREFIX + key, defaultValue));
   }
 
   @Override
   public long getLong(String key, long defaultValue) {
     // Reading shared prefs on the main thread is generally safe since a single instance is cached.
-    return StrictModeUtils.bypass(
-        () -> getSharedPrefs(appContext).getLong(PREF_PREFIX + key, defaultValue));
+    return StrictModeUtils.bypass(() -> sharedPreferences.getLong(PREF_PREFIX + key, defaultValue));
   }
 
   @Override
   public boolean getBoolean(String key, boolean defaultValue) {
     // Reading shared prefs on the main thread is generally safe since a single instance is cached.
     return StrictModeUtils.bypass(
-        () -> getSharedPrefs(appContext).getBoolean(PREF_PREFIX + key, defaultValue));
+        () -> sharedPreferences.getBoolean(PREF_PREFIX + key, defaultValue));
   }
 
   private static SharedPreferences getSharedPrefs(Context appContext) {
diff --git a/java/com/android/dialer/configprovider/SharedPrefConfigProviderModule.java b/java/com/android/dialer/configprovider/SharedPrefConfigProviderModule.java
index fe1c908..4af8bfe 100644
--- a/java/com/android/dialer/configprovider/SharedPrefConfigProviderModule.java
+++ b/java/com/android/dialer/configprovider/SharedPrefConfigProviderModule.java
@@ -16,14 +16,17 @@
 
 package com.android.dialer.configprovider;
 
+import com.android.dialer.storage.StorageModule;
 import dagger.Binds;
 import dagger.Module;
 import javax.inject.Singleton;
 
 /** Dagger module providing {@link ConfigProvider} based on shared preferences. */
-@Module
+@Module(includes = StorageModule.class)
 public abstract class SharedPrefConfigProviderModule {
 
+  private SharedPrefConfigProviderModule() {}
+
   @Binds
   @Singleton
   abstract ConfigProvider to(SharedPrefConfigProvider impl);
diff --git a/java/com/android/dialer/main/impl/MainActivity.java b/java/com/android/dialer/main/impl/MainActivity.java
index 1d705f0..2046b04 100644
--- a/java/com/android/dialer/main/impl/MainActivity.java
+++ b/java/com/android/dialer/main/impl/MainActivity.java
@@ -21,9 +21,9 @@
 import android.os.Bundle;
 import android.support.v4.content.LocalBroadcastManager;
 import com.android.dialer.blockreportspam.ShowBlockReportSpamDialogReceiver;
+import com.android.dialer.calllog.config.CallLogConfigComponent;
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.LogUtil;
-import com.android.dialer.configprovider.ConfigProviderBindings;
 import com.android.dialer.interactions.PhoneNumberInteraction.DisambigDialogDismissedListener;
 import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorCode;
 import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorListener;
@@ -53,7 +53,7 @@
 
   /** Returns intent that will open MainActivity to the specified tab. */
   public static Intent getShowTabIntent(Context context, @TabIndex int tabIndex) {
-    if (ConfigProviderBindings.get(context).getBoolean("nui_peer_enabled", false)) {
+    if (CallLogConfigComponent.get(context).callLogConfig().isNewPeerEnabled()) {
       // TODO(calderwoodra): implement this in NewMainActivityPeer
       return null;
     }
@@ -82,7 +82,7 @@
   }
 
   protected MainActivityPeer getNewPeer() {
-    if (ConfigProviderBindings.get(this).getBoolean("nui_peer_enabled", false)) {
+    if (CallLogConfigComponent.get(this).callLogConfig().isNewPeerEnabled()) {
       return new NewMainActivityPeer(this);
     } else {
       return new OldMainActivityPeer(this);
