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

Commit 41c39b49 authored by xuke.yin's avatar xuke.yin Committed by Gerrit Code Review
Browse files

Keep the content when change the orientation

Change-Id: I99f8b84b7178e0d2a40ee03deed8526ed125c123
parent 6de0ffe8
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -139,6 +139,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()) {