diff options
3 files changed, 18 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 10bf5e612..76dd84928 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -541,8 +541,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> mCallTimer.cancel(); } else { final long callStart = mPrimary.getConnectTimeMillis(); - final long duration = System.currentTimeMillis() - callStart; - ui.setPrimaryCallElapsedTime(true, duration); + if (callStart > 0) { + final long duration = System.currentTimeMillis() - callStart; + ui.setPrimaryCallElapsedTime(true, duration); + } } } diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index eca79f8a7..abbdf4679 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -844,6 +844,12 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD } public void showAnswerFragment(boolean show) { + // CallCardFragment is the parent fragment of AnswerFragment. + // Must create the CallCardFragment first before creating + // AnswerFragment if CallCardFragment is null. + if (show && getCallCardFragment() == null) { + showCallCardFragment(true); + } showFragment(TAG_ANSWER_FRAGMENT, show, true); } @@ -888,6 +894,12 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD if (mAnswerFragment != null) { mAnswerFragment.dismissPendingDialogs(); } + + SelectPhoneAccountDialogFragment dialogFragment = (SelectPhoneAccountDialogFragment) + getFragmentManager().findFragmentByTag(TAG_SELECT_ACCT_FRAGMENT); + if (dialogFragment != null) { + dialogFragment.dismiss(); + } } /** diff --git a/src/com/android/dialer/contactinfo/ContactInfoCache.java b/src/com/android/dialer/contactinfo/ContactInfoCache.java index 1e2457957..28a919430 100644 --- a/src/com/android/dialer/contactinfo/ContactInfoCache.java +++ b/src/com/android/dialer/contactinfo/ContactInfoCache.java @@ -28,8 +28,8 @@ import com.google.common.annotations.VisibleForTesting; import java.util.LinkedList; /** - * This is a cache of contact details for the phone numbers in the c all log. The key is the - * phone number with the country in which teh call was placed or received. The content of the + * This is a cache of contact details for the phone numbers in the call log. The key is the + * phone number with the country in which the call was placed or received. The content of the * cache is expired (but not purged) whenever the application comes to the foreground. * * This cache queues request for information and queries for information on a background thread, |