Merge "Make dialpad slide down when dismissed by tapping outside"
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 6eea633..0f80564 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -64,6 +64,7 @@
android:textSize="@dimen/search_text_size"
android:fontFamily="@string/search_font_family"
android:textColor="@color/searchbox_text_color"
+ android:textColorHint="@color/searchbox_hint_text_color"
android:inputType="textFilter"/>
<ImageView
android:id="@+id/search_close_button"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2fb59ed..e9730ea 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -70,8 +70,10 @@
<!-- Background color of the search box -->
<color name="searchbox_background_color">#ffffff</color>
- <!-- Text color of the search box -->
- <color name="searchbox_text_color">#d3d3d3</color>
+ <!-- Text color of the search box text as entered by user -->
+ <color name="searchbox_text_color">#000000</color>
+ <!-- Text color of the search box hint text -->
+ <color name="searchbox_hint_text_color">#d3d3d3</color>
<!-- Color of the contact name in favorite tiles -->
<color name="contact_tile_name_color">#ffffff</color>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index eee3838..b0162e3 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -35,7 +35,6 @@
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents;
-import android.provider.ContactsContract.Intents.UI;
import android.speech.RecognizerIntent;
import android.telephony.TelephonyManager;
import android.text.Editable;
@@ -338,11 +337,6 @@
prepareSearchView();
- if (UI.FILTER_CONTACTS_ACTION.equals(intent.getAction())
- && savedInstanceState == null) {
- setupFilterText(intent);
- }
-
hideDialpadFragment(false, false);
setupFakeActionBarItems();
@@ -784,37 +778,6 @@
return !isDialIntent(getIntent()) ? CALL_ORIGIN_DIALTACTS : null;
}
- /**
- * Retrieves the filter text stored in {@link #setupFilterText(Intent)}.
- * This text originally came from a FILTER_CONTACTS_ACTION intent received
- * by this activity. The stored text will then be cleared after after this
- * method returns.
- *
- * @return The stored filter text
- */
- public String getAndClearFilterText() {
- String filterText = mFilterText;
- mFilterText = null;
- return filterText;
- }
-
- /**
- * Stores the filter text associated with a FILTER_CONTACTS_ACTION intent.
- * This is so child activities can check if they are supposed to display a filter.
- *
- * @param intent The intent received in {@link #onNewIntent(Intent)}
- */
- private void setupFilterText(Intent intent) {
- // If the intent was relaunched from history, don't apply the filter text.
- if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
- return;
- }
- String filter = intent.getStringExtra(UI.FILTER_TEXT_EXTRA_KEY);
- if (filter != null && filter.length() > 0) {
- mFilterText = filter;
- }
- }
-
private final PhoneFavoriteFragment.Listener mPhoneFavoriteListener =
new PhoneFavoriteFragment.Listener() {
@Override
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java
index 84ce27e..dfe7aed 100644
--- a/src/com/android/dialer/calllog/ContactInfoHelper.java
+++ b/src/com/android/dialer/calllog/ContactInfoHelper.java
@@ -283,6 +283,7 @@
* {@link #mCachedNumberLookupService}.
*/
public boolean isBusiness(int sourceType) {
- return mCachedNumberLookupService.isBusiness(sourceType);
+ return mCachedNumberLookupService != null
+ && mCachedNumberLookupService.isBusiness(sourceType);
}
}