diff --git a/java/com/android/dialer/app/res/values/bliss_strings.xml b/java/com/android/dialer/app/res/values/bliss_strings.xml
new file mode 100644
index 0000000..5fed220
--- /dev/null
+++ b/java/com/android/dialer/app/res/values/bliss_strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Nitrogen OS
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <string name="other_settings_label">Other settings</string>
+
+    <!-- Dialer postcall -->
+    <string name="enable_post_call_title">Post call snackbar</string>
+    <string name="enable_post_call_summary">Enable post call notifications at the bottom of screen</string>
+
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/app/res/xml/other_settings.xml b/java/com/android/dialer/app/res/xml/other_settings.xml
new file mode 100644
index 0000000..697a6ce
--- /dev/null
+++ b/java/com/android/dialer/app/res/xml/other_settings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  ~ Copyright (C) 2014 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <SwitchPreference
+        android:key="enable_post_call"
+        android:title="@string/enable_post_call_title"
+        android:summary="@string/enable_post_call_summary" />
+
+</PreferenceScreen>
diff --git a/java/com/android/dialer/app/settings/DialerSettingsActivity.java b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
index 6ffa62a..972c0c7 100644
--- a/java/com/android/dialer/app/settings/DialerSettingsActivity.java
+++ b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
@@ -122,6 +122,11 @@
     TelephonyManager telephonyManager =
         (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
 
+    Header OtherSettingsHeader = new Header();
+    OtherSettingsHeader.titleRes = R.string.other_settings_label;
+    OtherSettingsHeader.fragment = OtherSettingsFragment.class.getName();
+    target.add(OtherSettingsHeader);
+
     // "Call Settings" (full settings) is shown if the current user is primary user and there
     // is only one SIM. Otherwise, "Calling accounts" is shown.
     boolean isPrimaryUser = isPrimaryUser();
@@ -179,6 +184,8 @@
       target.add(assistedDialingSettingsHeader);
     }
 
+
+
     if (showAbout()) {
       Header aboutPhoneHeader = new Header();
       aboutPhoneHeader.titleRes = R.string.about_phone_label;
diff --git a/java/com/android/dialer/app/settings/OtherSettingsFragment.java b/java/com/android/dialer/app/settings/OtherSettingsFragment.java
new file mode 100644
index 0000000..941a0bc
--- /dev/null
+++ b/java/com/android/dialer/app/settings/OtherSettingsFragment.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.dialer.app.settings;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
+import android.preference.PreferenceManager;
+import android.preference.SwitchPreference;
+import android.provider.Settings;
+import com.android.dialer.app.R;
+
+public class OtherSettingsFragment extends PreferenceFragment
+    implements Preference.OnPreferenceChangeListener {
+
+  private static final String ENABLE_POST_CALL = "enable_post_call";
+
+  private SharedPreferences mPrefs;
+  private boolean mEnabled;
+
+  private SwitchPreference mEnablePostcall;
+
+  @Override
+  public void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+
+    addPreferencesFromResource(R.xml.other_settings);
+
+    Context context = getActivity();
+
+    mPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+    mEnabled = mPrefs.getBoolean(ENABLE_POST_CALL, true);
+
+    mEnablePostcall = (SwitchPreference) findPreference(ENABLE_POST_CALL);
+    mEnablePostcall.setChecked(mEnabled);
+    mEnablePostcall.setOnPreferenceChangeListener(this);
+
+  }
+
+  @Override
+  public boolean onPreferenceChange(Preference preference, Object objValue) {
+    if (preference == mEnablePostcall) {
+        boolean value = (Boolean) objValue;
+        mPrefs
+          .edit()
+          .putBoolean(ENABLE_POST_CALL, value)
+          .apply();
+        return true;
+    }
+    return false;
+  }
+}
diff --git a/java/com/android/dialer/postcall/PostCall.java b/java/com/android/dialer/postcall/PostCall.java
index 542b8d0..f5fcdb9 100644
--- a/java/com/android/dialer/postcall/PostCall.java
+++ b/java/com/android/dialer/postcall/PostCall.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
 import android.support.annotation.Nullable;
 import android.support.design.widget.BaseTransientBottomBar.BaseCallback;
 import android.support.design.widget.Snackbar;
@@ -243,9 +244,12 @@
   }
 
   private static boolean isEnabled(Context context) {
-    return ConfigProviderComponent.get(context)
-        .getConfigProvider()
-        .getBoolean("enable_post_call_prod", true);
+
+    SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+    boolean mEnabled = mPrefs.getBoolean("enable_post_call", true);
+
+    return mEnabled;
   }
 
   private static boolean isSimReady(Context context) {
