From 11eb8998be078810200fb7ef91be9800e94194a0 Mon Sep 17 00:00:00 2001 From: PMS22 Date: Tue, 25 Aug 2020 13:55:21 +0000 Subject: [PATCH] Screen-Off-FOD: Run fod animations for screen off fod too - Because why not Signed-off-by: PMS22 Change-Id: If640c92f16fd7e87571b401ffafed4c3fe7910f8 --- .../systemui/biometrics/FODCircleView.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java index 76f2435527f..9240f615550 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java @@ -113,10 +113,16 @@ public void onFingerDown() { if (mFodGestureEnable && !mScreenTurnedOn) { if (mDozeEnabled) { mHandler.post(() -> mContext.sendBroadcast(new Intent(DOZE_INTENT))); + if (mIsRecognizingAnimEnabled) { + mHandler.post(() -> mFODAnimation.showFODanimation()); + } } else { mWakeLock.acquire(3000); mHandler.post(() -> mPowerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, FODCircleView.class.getSimpleName())); + if (mIsRecognizingAnimEnabled) { + mHandler.post(() -> mFODAnimation.showFODanimation()); + } } mPressPending = true; } else { @@ -127,6 +133,10 @@ public void onFingerDown() { @Override public void onFingerUp() { mHandler.post(() -> hideCircle()); + if (mIsRecognizingAnimEnabled) { + mFODAnimation.setAnimationKeyguard(false); + mHandler.post(() -> mFODAnimation.hideFODanimation()); + } if (mPressPending) { mPressPending = false; } @@ -194,6 +204,11 @@ public void onScreenTurnedOn() { mHandler.post(() -> showCircle()); mPressPending = false; } + + if (mIsRecognizingAnimEnabled) { + mFODAnimation.setAnimationKeyguard(mIsKeyguard); + mHandler.post(() -> mFODAnimation.hideFODanimation()); + } mScreenTurnedOn = true; }