Search in sources :

Example 16 with ActivatableNotificationView

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

the class PhoneStatusBar method updateStackScrollerState.

public void updateStackScrollerState(boolean animateHideSensitive, boolean fromShadeLocked) {
    if (mStackScroller == null)
        return;
    boolean onKeyguard = mState == StatusBarState.KEYGUARD;
    mStackScroller.setHideSensitive(isLockscreenPublicMode(), animateHideSensitive);
    mStackScroller.setDimmed(onKeyguard, fromShadeLocked);
    mStackScroller.setExpandingEnabled(!onKeyguard);
    ActivatableNotificationView activatedChild = mStackScroller.getActivatedChild();
    mStackScroller.setActivatedChild(null);
    if (activatedChild != null) {
        activatedChild.makeInactive(false);
    }
}
Also used : ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView)

Example 17 with ActivatableNotificationView

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

the class NotificationStackScrollLayout method updateFirstAndLastBackgroundViews.

private void updateFirstAndLastBackgroundViews() {
    ActivatableNotificationView firstChild = getFirstChildWithBackground();
    ActivatableNotificationView lastChild = getLastChildWithBackground();
    if (mAnimationsEnabled && mIsExpanded) {
        mAnimateNextBackgroundTop = firstChild != mFirstVisibleBackgroundChild;
        mAnimateNextBackgroundBottom = lastChild != mLastVisibleBackgroundChild;
    } else {
        mAnimateNextBackgroundTop = false;
        mAnimateNextBackgroundBottom = false;
    }
    mFirstVisibleBackgroundChild = firstChild;
    mLastVisibleBackgroundChild = lastChild;
}
Also used : ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView)

Example 18 with ActivatableNotificationView

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

the class NotificationStackScrollLayout method updateBackgroundBounds.

/**
     * Update the background bounds to the new desired bounds
     */
private void updateBackgroundBounds() {
    mBackgroundBounds.left = (int) getX();
    mBackgroundBounds.right = (int) (getX() + getWidth());
    if (!mIsExpanded) {
        mBackgroundBounds.top = 0;
        mBackgroundBounds.bottom = 0;
        return;
    }
    ActivatableNotificationView firstView = mFirstVisibleBackgroundChild;
    int top = 0;
    if (firstView != null) {
        int finalTranslationY = (int) StackStateAnimator.getFinalTranslationY(firstView);
        if (mAnimateNextBackgroundTop || mTopAnimator == null && mCurrentBounds.top == finalTranslationY || mTopAnimator != null && mEndAnimationRect.top == finalTranslationY) {
            // we're ending up at the same location as we are now, lets just skip the animation
            top = finalTranslationY;
        } else {
            top = (int) firstView.getTranslationY();
        }
    }
    ActivatableNotificationView lastView = mLastVisibleBackgroundChild;
    int bottom = 0;
    if (lastView != null) {
        int finalTranslationY = (int) StackStateAnimator.getFinalTranslationY(lastView);
        int finalHeight = StackStateAnimator.getFinalActualHeight(lastView);
        int finalBottom = finalTranslationY + finalHeight;
        finalBottom = Math.min(finalBottom, getHeight());
        if (mAnimateNextBackgroundBottom || mBottomAnimator == null && mCurrentBounds.bottom == finalBottom || mBottomAnimator != null && mEndAnimationRect.bottom == finalBottom) {
            // we're ending up at the same location as we are now, lets just skip the animation
            bottom = finalBottom;
        } else {
            bottom = (int) (lastView.getTranslationY() + lastView.getActualHeight());
            bottom = Math.min(bottom, getHeight());
        }
    } else {
        top = mTopPadding;
        bottom = top;
    }
    if (mPhoneStatusBar.getBarState() != StatusBarState.KEYGUARD) {
        top = (int) Math.max(mTopPadding + mStackTranslation, top);
    } else {
        // otherwise the animation from the shade to the keyguard will jump as it's maxed
        top = Math.max(0, top);
    }
    mBackgroundBounds.top = top;
    mBackgroundBounds.bottom = Math.min(getHeight(), Math.max(bottom, top));
}
Also used : ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView) Paint(android.graphics.Paint)

Example 19 with ActivatableNotificationView

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

the class PhoneStatusBar method updateStackScrollerState.

public void updateStackScrollerState(boolean goingToFullShade, boolean fromShadeLocked) {
    if (mStackScroller == null)
        return;
    boolean onKeyguard = mState == StatusBarState.KEYGUARD;
    mStackScroller.setHideSensitive(isLockscreenPublicMode(), goingToFullShade);
    mStackScroller.setDimmed(onKeyguard, fromShadeLocked);
    mStackScroller.setExpandingEnabled(!onKeyguard);
    ActivatableNotificationView activatedChild = mStackScroller.getActivatedChild();
    mStackScroller.setActivatedChild(null);
    if (activatedChild != null) {
        activatedChild.makeInactive(false);
    }
}
Also used : ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView)

Example 20 with ActivatableNotificationView

use of com.android.systemui.statusbar.ActivatableNotificationView in project android_frameworks_base by crdroidandroid.

the class PhoneStatusBar method updateStackScrollerState.

public void updateStackScrollerState(boolean animateHideSensitive, boolean fromShadeLocked) {
    if (mStackScroller == null)
        return;
    boolean onKeyguard = mState == StatusBarState.KEYGUARD;
    mStackScroller.setHideSensitive(isLockscreenPublicMode(), animateHideSensitive);
    mStackScroller.setDimmed(onKeyguard, fromShadeLocked);
    mStackScroller.setExpandingEnabled(!onKeyguard);
    ActivatableNotificationView activatedChild = mStackScroller.getActivatedChild();
    mStackScroller.setActivatedChild(null);
    if (activatedChild != null) {
        activatedChild.makeInactive(false);
    }
}
Also used : ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView)

Aggregations

ActivatableNotificationView (com.android.systemui.statusbar.ActivatableNotificationView)20 Paint (android.graphics.Paint)5