summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-25 16:29:38 -0700
committerYorke Lee <yorkelee@google.com>2013-09-25 16:29:38 -0700
commitca19504ff58c91497885d9705905f7ab25e97ce0 (patch)
treecc347c824c61be896885c1ab4ce805d20d1abfa9
parent3b8086e02bd3855f867da1b062d008b62add553e (diff)
Don't call finish when calling from the dialpad
Change-Id: Ib5c98b51c4f3113e434208b83310754b825a197f
-rw-r--r--src/com/android/dialer/DialtactsActivity.java2
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 05c9e2c2a..572a4f195 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -482,7 +482,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
ft.commit();
}
- private void hideDialpadFragment(boolean animate, boolean clearDialpad) {
+ public void hideDialpadFragment(boolean animate, boolean clearDialpad) {
if (mDialpadFragment == null) return;
if (clearDialpad) {
mDialpadFragment.clearDialpad();
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index 406612288..e46a8d3e1 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -1082,8 +1082,11 @@ public class DialpadFragment extends Fragment
public void callVoicemail() {
startActivity(getVoicemailIntent());
- mClearDigitsOnStop = true;
- getActivity().finish();
+ hideAndClearDialpad();
+ }
+
+ private void hideAndClearDialpad() {
+ ((DialtactsActivity) getActivity()).hideDialpadFragment(false, true);
}
public static class ErrorDialogFragment extends DialogFragment {
@@ -1179,8 +1182,7 @@ public class DialpadFragment extends Fragment
(getActivity() instanceof DialtactsActivity ?
((DialtactsActivity) getActivity()).getCallOrigin() : null));
startActivity(intent);
- mClearDigitsOnStop = true;
- getActivity().finish();
+ hideAndClearDialpad();
}
}
}