diff options
author | Yorke Lee <yorkelee@google.com> | 2015-10-12 10:03:07 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-10-12 15:57:44 -0700 |
commit | 807afd8a39366b7423eacd83fb18bff2ba7a0422 (patch) | |
tree | 6f8c1638026f948f670a4739e4a9da5adbd3c0b2 /src/com/android/dialer/DialtactsActivity.java | |
parent | f49c817d525ca3f3a85ccea10f8e94d397c7feb5 (diff) |
Move capability checker out of RegularSearchFragment
AOSP Dialer does not care about having location enabled,
so move the relevant code out into a separate fragment
Bug: 24172011
Change-Id: I7c29ba4ed8e3fb0a600360c10e9c9fdd6d543b1f
Diffstat (limited to 'src/com/android/dialer/DialtactsActivity.java')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index d44e8e7cf..bfb908f04 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -90,6 +90,7 @@ import com.android.dialer.widget.ActionBarController; 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 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O ListsFragment.HostInterface, SpeedDialFragment.HostInterface, SearchFragment.HostInterface, - RegularSearchFragment.CapabilityChecker, OnDragDropListener, OnPhoneNumberPickerActionListener, PopupMenu.OnMenuItemClickListener, @@ -607,7 +607,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } 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 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } } - @Override public boolean isNearbyPlacesSearchEnabled() { return false; } @@ -1020,7 +1018,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O 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) { |