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

Commit 6f391f8c authored by Roman Birg's avatar Roman Birg
Browse files

Protected apps: fix rotation states



Don't try to relaunch the activity if it's already been launched.

Ticket: FEIJ-224

Change-Id: I597417570f2f937afb0195fecd7dc406ff2508f3
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent bdc83b4a
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class ProtectedAppsActivity extends Activity {
    private static final int REQ_RESET_PATTERN = 2;

    private static final String NEEDS_UNLOCK = "needs_unlock";
    private static final String TARGET_INTENT = "target_intent";

    private ListView mListView;

@@ -100,8 +101,8 @@ public class ProtectedAppsActivity extends Activity {

        if (savedInstanceState != null) {
            mUserIsAuth = savedInstanceState.getBoolean(NEEDS_UNLOCK);
        }

            mTargetIntent = savedInstanceState.getParcelable(TARGET_INTENT);
        } else {
            if (!mUserIsAuth) {
                // Require unlock
                Intent lockPattern = new Intent(this, LockPatternActivity.class);
@@ -113,11 +114,13 @@ public class ProtectedAppsActivity extends Activity {
                }
            }
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putBoolean(NEEDS_UNLOCK, mUserIsAuth);
        outState.putParcelable(TARGET_INTENT, mTargetIntent);
    }

    @Override