diff --git a/java/com/android/dialer/app/res/values/bliss_arrays.xml b/java/com/android/dialer/app/res/values/bliss_arrays.xml
index 7a5adb2..c07caae 100644
--- a/java/com/android/dialer/app/res/values/bliss_arrays.xml
+++ b/java/com/android/dialer/app/res/values/bliss_arrays.xml
@@ -36,4 +36,29 @@
         <item>4000</item>
         <item>5000</item>
     </string-array>
+
+    <string-array name="auto_answer_entries" translatable="false">
+        <item>100</item>
+        <item>500</item>
+        <item>1000</item>
+        <item>1500</item>
+        <item>2000</item>
+        <item>2500</item>
+        <item>3000</item>
+        <item>4000</item>
+	<item>5000</item>
+    </string-array>
+
+    <!-- Proximity speaker delay values. -->
+    <string-array name="auto_answer_values" translatable="false">
+        <item>100</item>
+        <item>500</item>
+        <item>1000</item>
+        <item>1500</item>
+        <item>2000</item>
+        <item>2500</item>
+        <item>3000</item>
+        <item>4000</item>
+        <item>5000</item>
+    </string-array>
 </resources>
diff --git a/java/com/android/dialer/app/res/values/bliss_strings.xml b/java/com/android/dialer/app/res/values/bliss_strings.xml
index 4160f11..2425df2 100644
--- a/java/com/android/dialer/app/res/values/bliss_strings.xml
+++ b/java/com/android/dialer/app/res/values/bliss_strings.xml
@@ -36,4 +36,9 @@
     <string name="prox_auto_answer_incall_only_title">Auto answer</string>
     <string name="prox_auto_answer_incall_only_summary">Use proximity sensor for autoanswer</string>
 
+    <string name="auto_answer_call_title">Autoanswer</string>
+    <string name="auto_answer_call_summary">Use autoanswer with connected BT or Wired headset</string>
+    <string name="auto_answer_delay_title">Autoanswer delay</string>
+    <string name="auto_answer_dialog_title">Autoanswer delay in (ms)</string>
+    <string name="auto_answer_delay_summary">Autoanswer will be activated in <xliff:g id="number">%d</xliff:g> ms</string>
 </resources>
diff --git a/java/com/android/dialer/app/res/xml/speaker_settings.xml b/java/com/android/dialer/app/res/xml/speaker_settings.xml
index dc89d75..dda8e2a 100644
--- a/java/com/android/dialer/app/res/xml/speaker_settings.xml
+++ b/java/com/android/dialer/app/res/xml/speaker_settings.xml
@@ -47,4 +47,20 @@
         android:summary="@string/prox_auto_answer_incall_only_summary"
         android:persistent="false"
         android:defaultValue="false" />
+
+    <SwitchPreference
+        android:key="auto_answer_call_key"
+        android:title="@string/auto_answer_call_title"
+        android:summary="@string/auto_answer_call_summary"
+        android:persistent="false"
+        android:defaultValue="false" />
+
+    <ListPreference
+        android:key="auto_answer_delay"
+        android:title="@string/auto_answer_delay_title"
+        android:dialogTitle="@string/auto_answer_dialog_title"
+        android:entries="@array/auto_answer_entries"
+        android:entryValues="@array/auto_answer_values"
+        android:persistent="false"
+        android:dependency="auto_answer_call_key" />
 </PreferenceScreen>
diff --git a/java/com/android/dialer/app/settings/SpeakerSettingsFragment.java b/java/com/android/dialer/app/settings/SpeakerSettingsFragment.java
index 8488b1c..2a3ad7f 100644
--- a/java/com/android/dialer/app/settings/SpeakerSettingsFragment.java
+++ b/java/com/android/dialer/app/settings/SpeakerSettingsFragment.java
@@ -35,11 +35,16 @@
     private static final String PROXIMITY_AUTO_SPEAKER_DELAY  = "proximity_auto_speaker_delay";
     private static final String PROXIMITY_AUTO_SPEAKER_INCALL_ONLY  = "proximity_auto_speaker_incall_only";
     private static final String PROXIMITY_AUTO_ANSWER_INCALL_ONLY  = "proximity_auto_answer_incall_only";
+    private static final String AUTO_ANSWER_CALL_KEY  = "auto_answer_call_key";
+    private static final String AUTO_ANSWER_DELAY  = "auto_answer_delay";
 
     private SwitchPreference mProxSpeaker;
     private ListPreference mProxSpeakerDelay;
+    private ListPreference mAutoAnswerDelay;
+
     private SwitchPreference mProxSpeakerIncallOnly;
     private SwitchPreference mProxAnswer;
+    private SwitchPreference mAutoAnswer;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -48,6 +53,11 @@
         addPreferencesFromResource(R.xml.speaker_settings);
         final ContentResolver resolver = getActivity().getContentResolver();
 
+	mAutoAnswer = (SwitchPreference) findPreference(AUTO_ANSWER_CALL_KEY);
+        mAutoAnswer.setChecked(Settings.System.getInt(resolver,
+                Settings.System.AUTO_ANSWER_CALL_KEY, 0) == 1);
+        mAutoAnswer.setOnPreferenceChangeListener(this);
+
         mProxSpeaker = (SwitchPreference) findPreference(PROXIMITY_AUTO_SPEAKER);
         mProxSpeaker.setChecked(Settings.System.getInt(resolver,
                 Settings.System.PROXIMITY_AUTO_SPEAKER, 0) == 1);
@@ -60,6 +70,13 @@
         mProxSpeakerDelay.setOnPreferenceChangeListener(this);
         updateProximityDelaySummary(proxDelay);
 
+	mAutoAnswerDelay = (ListPreference) findPreference(AUTO_ANSWER_DELAY);
+        int ansDelay = Settings.System.getInt(resolver,
+                Settings.System.AUTO_ANSWER_DELAY, 100);
+        mAutoAnswerDelay.setValue(String.valueOf(ansDelay));
+        mAutoAnswerDelay.setOnPreferenceChangeListener(this);
+        updateAnswerDelaySummary(ansDelay);
+
         mProxSpeakerIncallOnly = (SwitchPreference) findPreference(PROXIMITY_AUTO_SPEAKER_INCALL_ONLY);
         mProxSpeakerIncallOnly.setChecked(Settings.System.getInt(resolver,
                 Settings.System.PROXIMITY_AUTO_SPEAKER_INCALL_ONLY, 0) == 1);
@@ -79,11 +96,20 @@
             Settings.System.putInt(resolver, Settings.System.PROXIMITY_AUTO_SPEAKER,
                     ((Boolean) newValue) ? 1 : 0);
             return true;
+	} else if (preference == mAutoAnswer) {
+            Settings.System.putInt(resolver, Settings.System.AUTO_ANSWER_CALL_KEY,
+                    ((Boolean) newValue) ? 1 : 0);
+            return true;
         } else if (preference == mProxSpeakerDelay) {
             int proxDelay = Integer.valueOf((String) newValue);
             Settings.System.putInt(resolver, Settings.System.PROXIMITY_AUTO_SPEAKER_DELAY, proxDelay);
             updateProximityDelaySummary(proxDelay);
             return true;
+	} else if (preference == mAutoAnswerDelay) {
+            int ansDelay = Integer.valueOf((String) newValue);
+            Settings.System.putInt(resolver, Settings.System.AUTO_ANSWER_DELAY, ansDelay);
+            updateAnswerDelaySummary(ansDelay);
+            return true;
         } else if (preference == mProxSpeakerIncallOnly) {
             Settings.System.putInt(resolver, Settings.System.PROXIMITY_AUTO_SPEAKER_INCALL_ONLY,
                     ((Boolean) newValue) ? 1 : 0);
@@ -100,4 +126,10 @@
         String summary = getResources().getString(R.string.prox_auto_speaker_delay_summary, value);
         mProxSpeakerDelay.setSummary(summary);
     }
+
+    private void updateAnswerDelaySummary(int value) {
+        String summary = getResources().getString(R.string.auto_answer_delay_summary, value);
+        mAutoAnswerDelay.setSummary(summary);
+    }
+
 }
diff --git a/java/com/android/incallui/ProximitySensor.java b/java/com/android/incallui/ProximitySensor.java
index 9637103..c5948c2 100644
--- a/java/com/android/incallui/ProximitySensor.java
+++ b/java/com/android/incallui/ProximitySensor.java
@@ -71,6 +71,7 @@
   private boolean isProxSensorNear = false;
   private boolean isProxSensorFar = true;
   private int proxSpeakerDelay = 3000;
+  private int answerDelay = 5000;
   private boolean isPhoneOffhook = false;
   private boolean dialpadVisible;
   private boolean isAttemptingVideoCall;
@@ -82,7 +83,9 @@
 
   private static final int SENSOR_SENSITIVITY = 4;
 
-   private final Handler handler = new Handler();
+  private final Handler handler = new Handler();
+  private final Handler handlerAnswer = new Handler();
+
    private final Runnable activateSpeaker = new Runnable() {
     @Override
     public void run() {
@@ -90,6 +93,15 @@
     }
    };
 
+   private final Runnable answerCall = new Runnable() {
+    @Override
+    public void run() {
+	if (hasIncomingCall) {
+	    telecomManager.acceptRingingCall();
+	}
+    }
+   };
+
   public ProximitySensor(
       @NonNull Context context,
       @NonNull AudioModeProvider audioModeProvider,
@@ -378,11 +390,20 @@
     }
 
  private void answerProx(boolean isNear) {
+    handlerAnswer.removeCallbacks(answerCall);
+    final int audioRoute = audioModeProvider.getAudioState().getRoute();
     final boolean proxIncallAnswPref =
                 (Settings.System.getInt(mContext.getContentResolver(),
                 Settings.System.PROXIMITY_AUTO_ANSWER_INCALL_ONLY, 0) == 1);
+    answerDelay = Settings.System.getInt(mContext.getContentResolver(),
+                Settings.System.AUTO_ANSWER_DELAY, 5000);
     if (isNear && telecomManager != null && !isScreenReallyOff() && proxIncallAnswPref) {
     telecomManager.acceptRingingCall();
+	if (Settings.System.getInt(mContext.getContentResolver(),
+                Settings.System.AUTO_ANSWER_CALL_KEY, 0) == 1 && (audioRoute == CallAudioState.ROUTE_WIRED_HEADSET
+								  || audioRoute == CallAudioState.ROUTE_BLUETOOTH)) {
+        handlerAnswer.postDelayed(answerCall, answerDelay);
+	}
     }
  }
 
