Skip to content

Commit

Permalink
Screen-Off-FOD: Run fod animations for screen off fod too
Browse files Browse the repository at this point in the history
- Because why not

Signed-off-by: PMS22 <pratham220399@gmail.com>
Change-Id: If640c92f16fd7e87571b401ffafed4c3fe7910f8
  • Loading branch information
PMS22 committed Aug 25, 2020
1 parent 70d5179 commit bb747f9
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand Down Expand Up @@ -194,6 +204,11 @@ public void onScreenTurnedOn() {
mHandler.post(() -> showCircle());
mPressPending = false;
}

if (mIsRecognizingAnimEnabled) {
mFODAnimation.setAnimationKeyguard(false);
mHandler.post(() -> mFODAnimation.hideFODanimation());
}
mScreenTurnedOn = true;
}

Expand Down

0 comments on commit bb747f9

Please sign in to comment.