diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index d44e8e7..bfb908f 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -90,6 +90,7 @@
 import com.android.dialer.widget.SearchEditTextLayout;
 import com.android.dialer.widget.SearchEditTextLayout.Callback;
 import com.android.dialerbind.DatabaseHelperManager;
+import com.android.dialerbind.ObjectFactory;
 import com.android.incallui.Call.LogState;
 import com.android.phone.common.animation.AnimUtils;
 import com.android.phone.common.animation.AnimationListenerAdapter;
@@ -110,7 +111,6 @@
         ListsFragment.HostInterface,
         SpeedDialFragment.HostInterface,
         SearchFragment.HostInterface,
-        RegularSearchFragment.CapabilityChecker,
         OnDragDropListener,
         OnPhoneNumberPickerActionListener,
         PopupMenu.OnMenuItemClickListener,
@@ -607,7 +607,6 @@
         } else if (fragment instanceof SearchFragment) {
             mRegularSearchFragment = (RegularSearchFragment) fragment;
             mRegularSearchFragment.setOnPhoneNumberPickerActionListener(this);
-            mRegularSearchFragment.setCapabilityChecker(this);
         } else if (fragment instanceof ListsFragment) {
             mListsFragment = (ListsFragment) fragment;
             mListsFragment.addOnPageChangeListener(this);
@@ -872,7 +871,6 @@
         }
     }
 
-    @Override
     public boolean isNearbyPlacesSearchEnabled() {
         return false;
     }
@@ -1020,7 +1018,7 @@
             if (smartDialSearch) {
                 fragment = new SmartDialSearchFragment();
             } else {
-                fragment = new RegularSearchFragment();
+                fragment = ObjectFactory.newRegularSearchFragment();
                 fragment.setOnTouchListener(new View.OnTouchListener() {
                     @Override
                     public boolean onTouch(View v, MotionEvent event) {
diff --git a/src/com/android/dialer/list/RegularSearchFragment.java b/src/com/android/dialer/list/RegularSearchFragment.java
index 33ce95f..6b89ef0 100644
--- a/src/com/android/dialer/list/RegularSearchFragment.java
+++ b/src/com/android/dialer/list/RegularSearchFragment.java
@@ -16,7 +16,6 @@
 package com.android.dialer.list;
 
 import static android.Manifest.permission.READ_CONTACTS;
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
 
 import android.app.Activity;
 import android.content.pm.PackageManager;
@@ -38,7 +37,7 @@
 public class RegularSearchFragment extends SearchFragment
         implements OnEmptyViewActionButtonClickedListener {
 
-    private static final int PERMISSION_REQUEST_CODE = 1;
+    public static final int PERMISSION_REQUEST_CODE = 1;
 
     private static final int SEARCH_DIRECTORY_RESULT_LIMIT = 5;
 
@@ -49,8 +48,7 @@
         public boolean isNearbyPlacesSearchEnabled();
     }
 
-    private String mPermissionToRequest;
-    private CapabilityChecker mCapabilityChecker;
+    protected String mPermissionToRequest;
 
     public RegularSearchFragment() {
         configureDirectorySearch();
@@ -64,7 +62,6 @@
 
     @Override
     public void onDetach() {
-        mCapabilityChecker = null;
         super.onDetach();
     }
 
@@ -110,13 +107,6 @@
                 descriptionResource = R.string.permission_no_search;
                 listener = this;
                 mPermissionToRequest = READ_CONTACTS;
-            } else if (isNearbyPlacesSearchEnabled()
-                    && !PermissionsUtil.hasPermission(getActivity(), ACCESS_FINE_LOCATION)) {
-                imageResource = R.drawable.empty_contacts;
-                actionLabelResource = R.string.permission_single_turn_on;
-                descriptionResource = R.string.permission_no_location_for_search;
-                listener = this;
-                mPermissionToRequest = ACCESS_FINE_LOCATION;
             } else {
                 imageResource = EmptyContentView.NO_IMAGE;
                 actionLabelResource = EmptyContentView.NO_LABEL;
@@ -141,8 +131,7 @@
             return;
         }
 
-        if (READ_CONTACTS.equals(mPermissionToRequest)
-                || ACCESS_FINE_LOCATION.equals(mPermissionToRequest)) {
+        if (READ_CONTACTS.equals(mPermissionToRequest)) {
             requestPermissions(new String[] {mPermissionToRequest}, PERMISSION_REQUEST_CODE);
         }
     }
@@ -164,15 +153,4 @@
         return isRemoteDirectory ? LogState.INITIATION_REMOTE_DIRECTORY
                 : LogState.INITIATION_REGULAR_SEARCH;
     }
-
-    public void setCapabilityChecker(CapabilityChecker capabilityChecker) {
-        mCapabilityChecker = capabilityChecker;
-    }
-
-    private boolean isNearbyPlacesSearchEnabled() {
-        if (mCapabilityChecker != null) {
-            return mCapabilityChecker.isNearbyPlacesSearchEnabled();
-        }
-        return false;
-    }
 }
diff --git a/src/com/android/dialerbind/ObjectFactory.java b/src/com/android/dialerbind/ObjectFactory.java
index c64afe8..a1753fa 100644
--- a/src/com/android/dialerbind/ObjectFactory.java
+++ b/src/com/android/dialerbind/ObjectFactory.java
@@ -65,4 +65,8 @@
         // no-op
         return null;
     }
+
+    public static RegularSearchFragment newRegularSearchFragment() {
+        return new RegularSearchFragment();
+    }
 }
