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

Commit a0be6d53 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Do not destroy the security method when pressing back.

Fixes jank when the user wants to unlock it next time.

Bug: 15088101
Change-Id: If7bc3d92d0f17abb5077b4c06248f368acb2879f
parent 37e65624
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public class KeyguardSimpleHostView extends KeyguardViewBase {

    @Override
    public void cleanUp() {
        // TODO Auto-generated method stub
        getSecurityContainer().onPause();
    }

    @Override
+6 −6
Original line number Diff line number Diff line
@@ -54,10 +54,6 @@ public class KeyguardBouncer {
        mWindowManager = windowManager;
    }

    public void prepare() {
        ensureView();
    }

    public void show() {
        ensureView();

@@ -75,11 +71,15 @@ public class KeyguardBouncer {
        show();
    }

    public void hide() {
    public void hide(boolean destroyView) {
        if (mKeyguardView != null) {
            mKeyguardView.cleanUp();
        }
        if (destroyView) {
            removeView();
        } else if (mRoot != null) {
            mRoot.setVisibility(View.INVISIBLE);
        }
    }

    /**
+4 −5
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ public class StatusBarKeyguardViewManager {
            mBouncer.show();
        } else {
            mPhoneStatusBar.showKeyguard();
            mBouncer.hide();
            mBouncer.prepare();
            mBouncer.hide(false /* destroyView */);
        }
    }

@@ -124,7 +123,7 @@ public class StatusBarKeyguardViewManager {
        if (mShowing) {
            if (mOccluded) {
                mPhoneStatusBar.hideKeyguard();
                mBouncer.hide();
                mBouncer.hide(false /* destroyView */);
            } else {
                showBouncerOrKeyguard();
            }
@@ -184,7 +183,7 @@ public class StatusBarKeyguardViewManager {
        mShowing = false;
        mPhoneStatusBar.hideKeyguard();
        mStatusBarWindowManager.setKeyguardShowing(false);
        mBouncer.hide();
        mBouncer.hide(true /* destroyView */);
        mViewMediatorCallback.keyguardGone();
        updateStates();
    }
@@ -216,7 +215,7 @@ public class StatusBarKeyguardViewManager {
     */
    public boolean onBackPressed() {
        if (mBouncer.isShowing()) {
            mBouncer.hide();
            mBouncer.hide(false /* destroyView */);
            mPhoneStatusBar.showKeyguard();
            updateStates();
            return true;