summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java6
-rw-r--r--src/com/android/dialer/list/DialerPhoneNumberListAdapter.java11
-rw-r--r--src/com/android/dialer/list/SearchFragment.java4
3 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index ba1b8d163..546a64666 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -911,6 +911,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
@Override
public void onNewIntent(Intent newIntent) {
setIntent(newIntent);
+
mStateSaved = false;
displayFragment(newIntent);
@@ -1218,6 +1219,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
@Override
public void onCallNumberDirectly(String phoneNumber, boolean isVideoCall) {
+ if (phoneNumber == null) {
+ // Invalid phone number, but let the call go through so that InCallUI can show
+ // an error message.
+ phoneNumber = "";
+ }
Intent intent = isVideoCall ?
IntentUtil.getVideoCallIntent(phoneNumber, getCallOrigin()) :
IntentUtil.getCallIntent(phoneNumber, getCallOrigin());
diff --git a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
index 6c0ecf72b..401b0b641 100644
--- a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
+++ b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
@@ -44,11 +44,6 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
super(context);
mCountryIso = GeoUtil.getCurrentCountryIso(context);
-
- // Enable all shortcuts by default
- for (int i = 0; i < mShortcutEnabled.length; i++) {
- mShortcutEnabled[i] = true;
- }
}
@Override
@@ -67,6 +62,12 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
return count;
}
+ public void disableAllShortcuts() {
+ for (int i = 0; i < mShortcutEnabled.length; i++) {
+ mShortcutEnabled[i] = false;
+ }
+ }
+
@Override
public int getItemViewType(int position) {
final int shortcut = getShortcutTypeFromPosition(position);
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java
index 1f33d5b75..106545eaf 100644
--- a/src/com/android/dialer/list/SearchFragment.java
+++ b/src/com/android/dialer/list/SearchFragment.java
@@ -345,7 +345,9 @@ public class SearchFragment extends PhoneNumberPickerFragment {
super.startLoading();
} else if (TextUtils.isEmpty(getQueryString())) {
// Clear out any existing call shortcuts.
- getAdapter().setQueryString(null);
+ final DialerPhoneNumberListAdapter adapter =
+ (DialerPhoneNumberListAdapter) getAdapter();
+ adapter.disableAllShortcuts();
}
}