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

Commit 35127cde authored by Yorke Lee's avatar Yorke Lee
Browse files

Hide dialpad after call is ended

Bug: 10503894
Change-Id: Ic7a6a0a0fb54cb315a5b92f9998be9b8848c6137
parent 63e1155b
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -160,6 +160,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
    private boolean mInDialpadSearch;
    private boolean mInRegularSearch;

    /**
     * True if the dialpad is only temporarily showing due to being in call
     */
    private boolean mInCallDialpadUp;

    /**
     * True when this activity has been launched for the first time.
     */
@@ -312,7 +317,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
        super.onResume();
        if (mFirstLaunch) {
            displayFragment(getIntent());
        } else if (!phoneIsInUse() && mInCallDialpadUp) {
            hideDialpadFragment(false, true);
            mInCallDialpadUp = false;
        }

        mFirstLaunch = false;
        mDialerDatabaseHelper.startSmartDialUpdateThread();
    }
@@ -396,6 +405,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
                break;
            }
            case R.id.dialpad_button:
                // Reset the boolean flag that tracks whether the dialpad was up because
                // we were in call. Regardless of whether it was true before, we want to
                // show the dialpad because the user has explicitly clicked the dialpad
                // button.
                mInCallDialpadUp = false;
                showDialpadFragment(true);
                break;
            case R.id.call_history_on_dialpad_button:
@@ -631,6 +645,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O

        if (mDialpadFragment != null && (phoneIsInUse() || isDialIntent(intent))) {
            mDialpadFragment.setStartedFromNewIntent(true);
            if (!mDialpadFragment.isVisible()) {
                mInCallDialpadUp = true;
            }
            showDialpadFragment(false);
        }
    }