Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a220bd6 authored by Wenlu Wu's avatar Wenlu Wu Committed by Toshiya Ikenaga
Browse files

Display incoming call when phone account selection dialog shows

CallCardFragment is not created if there is an incoming call
when phone account selection dialog shows, which results in
incoming call not being shown. Fix issue by dismissing dialog
and showing CallCardFragment in that case.

Bug: 33893516
Change-Id: Icd7a729da974717945275cc5cec93da20864fde3
parent b94019f3
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -844,6 +844,12 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD
    }
    }


    public void showAnswerFragment(boolean show) {
    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);
        showFragment(TAG_ANSWER_FRAGMENT, show, true);
    }
    }


@@ -888,6 +894,12 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD
        if (mAnswerFragment != null) {
        if (mAnswerFragment != null) {
            mAnswerFragment.dismissPendingDialogs();
            mAnswerFragment.dismissPendingDialogs();
        }
        }

        SelectPhoneAccountDialogFragment dialogFragment = (SelectPhoneAccountDialogFragment)
                getFragmentManager().findFragmentByTag(TAG_SELECT_ACCT_FRAGMENT);
        if (dialogFragment != null) {
            dialogFragment.dismiss();
        }
    }
    }


    /**
    /**