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

Commit 1657f430 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix 3061025: Extend wave lockscreen timeout while grabbed."

parents fe0ed457 4139b550
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -214,6 +214,9 @@ class LockScreen extends LinearLayout implements KeyguardScreen,
    }

    class WaveViewMethods implements WaveView.OnTriggerListener {
        private static final int WAIT_FOR_ANIMATION_TIMEOUT = 500;
        private static final int STAY_ON_WHILE_GRABBED_TIMEOUT = 30000;

        /** {@inheritDoc} */
        public void onTrigger(View v, int whichHandle) {
            if (whichHandle == WaveView.OnTriggerListener.CENTER_HANDLE) {
@@ -222,15 +225,19 @@ class LockScreen extends LinearLayout implements KeyguardScreen,
                    public void run() {
                        mCallback.goToUnlockScreen();
                    }
                }, 500);
                }, WAIT_FOR_ANIMATION_TIMEOUT);
            }
        }

        /** {@inheritDoc} */
        public void onGrabbedStateChange(View v, int grabbedState) {
            if (grabbedState == WaveView.OnTriggerListener.CENTER_HANDLE) {
                mCallback.pokeWakelock(STAY_ON_WHILE_GRABBED_TIMEOUT);
            } else {
                mCallback.pokeWakelock();
            }
        }
    }

    /**
     * In general, we enable unlocking the insecure key guard with the menu key. However, there are