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

Commit 7bc451a6 authored by xuke.yin's avatar xuke.yin Committed by Zhao Wei Liew
Browse files

Keep the content when change the orientation

Change-Id: I99f8b84b7178e0d2a40ee03deed8526ed125c123
parent 03d87929
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -150,6 +150,22 @@ public class LockPatternActivity extends Activity implements OnNotifyAccountRese
        return true;
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putBoolean("isAccountView", mAccountView.getVisibility() == View.VISIBLE);
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        if (savedInstanceState.getBoolean("isAccountView")) {
            switchToAccount();
        } else {
            switchToPattern(false);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {