Search in sources :

Example 26 with KeyguardAffordanceView

use of com.android.systemui.statusbar.KeyguardAffordanceView in project android_frameworks_base by DirtyUnicorns.

the class NotificationPanelView method updateUnlockIcon.

private void updateUnlockIcon() {
    if (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED) {
        boolean active = getMaxPanelHeight() - getExpandedHeight() > mUnlockMoveDistance;
        KeyguardAffordanceView lockIcon = mKeyguardBottomArea.getLockIcon();
        if (active && !mUnlockIconActive && mTracking) {
            lockIcon.setImageAlpha(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN, null);
            lockIcon.setImageScale(LOCK_ICON_ACTIVE_SCALE, true, 150, Interpolators.FAST_OUT_LINEAR_IN);
        } else if (!active && mUnlockIconActive && mTracking) {
            lockIcon.setImageAlpha(lockIcon.getRestingAlpha(), true, /* animate */
            150, Interpolators.FAST_OUT_LINEAR_IN, null);
            lockIcon.setImageScale(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN);
        }
        mUnlockIconActive = active;
    }
}
Also used : KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView)

Example 27 with KeyguardAffordanceView

use of com.android.systemui.statusbar.KeyguardAffordanceView in project android_frameworks_base by DirtyUnicorns.

the class NotificationPanelView method onTrackingStopped.

@Override
protected void onTrackingStopped(boolean expand) {
    mFalsingManager.onTrackingStopped();
    super.onTrackingStopped(expand);
    if (expand) {
        mNotificationStackScroller.setOverScrolledPixels(0.0f, true, /* onTop */
        true);
    }
    mNotificationStackScroller.onPanelTrackingStopped();
    if (expand && (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED)) {
        if (!mHintAnimationRunning) {
            mAfforanceHelper.reset(true);
        }
    }
    if (!expand && (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED)) {
        KeyguardAffordanceView lockIcon = mKeyguardBottomArea.getLockIcon();
        lockIcon.setImageAlpha(0.0f, true, 100, Interpolators.FAST_OUT_LINEAR_IN, null);
        lockIcon.setImageScale(2.0f, true, 100, Interpolators.FAST_OUT_LINEAR_IN);
    }
}
Also used : KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView)

Example 28 with KeyguardAffordanceView

use of com.android.systemui.statusbar.KeyguardAffordanceView in project android_frameworks_base by AOSPA.

the class NotificationPanelView method onTrackingStopped.

@Override
protected void onTrackingStopped(boolean expand) {
    mFalsingManager.onTrackingStopped();
    super.onTrackingStopped(expand);
    if (expand) {
        mNotificationStackScroller.setOverScrolledPixels(0.0f, true, /* onTop */
        true);
    }
    mNotificationStackScroller.onPanelTrackingStopped();
    if (expand && (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED)) {
        if (!mHintAnimationRunning) {
            mAfforanceHelper.reset(true);
        }
    }
    if (!expand && (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED)) {
        KeyguardAffordanceView lockIcon = mKeyguardBottomArea.getLockIcon();
        lockIcon.setImageAlpha(0.0f, true, 100, Interpolators.FAST_OUT_LINEAR_IN, null);
        lockIcon.setImageScale(2.0f, true, 100, Interpolators.FAST_OUT_LINEAR_IN);
    }
}
Also used : KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView)

Example 29 with KeyguardAffordanceView

use of com.android.systemui.statusbar.KeyguardAffordanceView in project android_frameworks_base by AOSPA.

the class NotificationPanelView method updateUnlockIcon.

private void updateUnlockIcon() {
    if (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED) {
        boolean active = getMaxPanelHeight() - getExpandedHeight() > mUnlockMoveDistance;
        KeyguardAffordanceView lockIcon = mKeyguardBottomArea.getLockIcon();
        if (active && !mUnlockIconActive && mTracking) {
            lockIcon.setImageAlpha(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN, null);
            lockIcon.setImageScale(LOCK_ICON_ACTIVE_SCALE, true, 150, Interpolators.FAST_OUT_LINEAR_IN);
        } else if (!active && mUnlockIconActive && mTracking) {
            lockIcon.setImageAlpha(lockIcon.getRestingAlpha(), true, /* animate */
            150, Interpolators.FAST_OUT_LINEAR_IN, null);
            lockIcon.setImageScale(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN);
        }
        mUnlockIconActive = active;
    }
}
Also used : KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView)

Example 30 with KeyguardAffordanceView

use of com.android.systemui.statusbar.KeyguardAffordanceView in project android_frameworks_base by AOSPA.

the class KeyguardAffordanceHelper method startFinishingCircleAnimation.

private void startFinishingCircleAnimation(float velocity, Runnable mAnimationEndRunnable, boolean right) {
    KeyguardAffordanceView targetView = right ? mRightIcon : mLeftIcon;
    targetView.finishAnimation(velocity, mAnimationEndRunnable);
}
Also used : KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView)

Aggregations

KeyguardAffordanceView (com.android.systemui.statusbar.KeyguardAffordanceView)40 ValueAnimator (android.animation.ValueAnimator)10 Animator (android.animation.Animator)5 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)5