Search in sources :

Example 26 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project platform_frameworks_base by android.

the class NotificationStackScrollLayout method isChildInInvisibleGroup.

/**
     * @param child the child to query
     * @return whether a view is not a top level child but a child notification and that group is
     *         not expanded
     */
private boolean isChildInInvisibleGroup(View child) {
    if (child instanceof ExpandableNotificationRow) {
        ExpandableNotificationRow row = (ExpandableNotificationRow) child;
        ExpandableNotificationRow groupSummary = mGroupManager.getGroupSummary(row.getStatusBarNotification());
        if (groupSummary != null && groupSummary != row) {
            return row.getVisibility() == View.INVISIBLE;
        }
    }
    return false;
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 27 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project platform_frameworks_base by android.

the class NotificationStackScrollLayout method onChildDismissed.

@Override
public void onChildDismissed(View v) {
    ExpandableNotificationRow row = (ExpandableNotificationRow) v;
    if (!row.isDismissed()) {
        handleChildDismissed(v);
    }
    ViewGroup transientContainer = row.getTransientContainer();
    if (transientContainer != null) {
        transientContainer.removeTransientView(v);
    }
}
Also used : ViewGroup(android.view.ViewGroup) ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 28 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project platform_frameworks_base by android.

the class NotificationStackScrollLayout method performDismiss.

public static void performDismiss(View v, NotificationGroupManager groupManager, boolean fromAccessibility) {
    if (!(v instanceof ExpandableNotificationRow)) {
        return;
    }
    ExpandableNotificationRow row = (ExpandableNotificationRow) v;
    if (groupManager.isOnlyChildInGroup(row.getStatusBarNotification())) {
        ExpandableNotificationRow groupSummary = groupManager.getLogicalGroupSummary(row.getStatusBarNotification());
        if (groupSummary.isClearable()) {
            performDismiss(groupSummary, groupManager, fromAccessibility);
        }
    }
    row.setDismissed(true, fromAccessibility);
    if (row.isClearable()) {
        row.performDismiss();
    }
    if (DEBUG)
        Log.v(TAG, "onChildDismissed: " + v);
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 29 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project platform_frameworks_base by android.

the class NotificationStackScrollLayout method onHeightChanged.

@Override
public void onHeightChanged(ExpandableView view, boolean needsAnimation) {
    updateContentHeight();
    updateScrollPositionOnExpandInBottom(view);
    clampScrollPosition();
    notifyHeightChangeListener(view);
    ExpandableNotificationRow row = view instanceof ExpandableNotificationRow ? (ExpandableNotificationRow) view : null;
    if (row != null && (row == mFirstVisibleBackgroundChild || row.getNotificationParent() == mFirstVisibleBackgroundChild)) {
        updateAlgorithmLayoutMinHeight();
    }
    if (needsAnimation) {
        requestAnimationOnViewResize(row);
    }
    requestChildrenUpdate();
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 30 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project platform_frameworks_base by android.

the class NotificationStackScrollLayout method handleChildDismissed.

private void handleChildDismissed(View v) {
    if (mDismissAllInProgress) {
        return;
    }
    setSwipingInProgress(false);
    if (mDragAnimPendingChildren.contains(v)) {
        // We start the swipe and finish it in the same frame, we don't want any animation
        // for the drag
        mDragAnimPendingChildren.remove(v);
    }
    mSwipedOutViews.add(v);
    mAmbientState.onDragFinished(v);
    updateContinuousShadowDrawing();
    if (v instanceof ExpandableNotificationRow) {
        ExpandableNotificationRow row = (ExpandableNotificationRow) v;
        if (row.isHeadsUp()) {
            mHeadsUpManager.addSwipedOutNotification(row.getStatusBarNotification().getKey());
        }
    }
    performDismiss(v, mGroupManager, false);
    mFalsingManager.onNotificationDismissed();
    if (mFalsingManager.shouldEnforceBouncer()) {
        mPhoneStatusBar.executeRunnableDismissingKeyguard(null, null, /* cancelAction */
        false, /* dismissShade */
        true, /* afterKeyguardGone */
        false);
    }
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Aggregations

ExpandableNotificationRow (com.android.systemui.statusbar.ExpandableNotificationRow)290 View (android.view.View)75 ExpandableView (com.android.systemui.statusbar.ExpandableView)75 TextView (android.widget.TextView)55 ActivatableNotificationView (com.android.systemui.statusbar.ActivatableNotificationView)45 DismissView (com.android.systemui.statusbar.DismissView)45 EmptyShadeView (com.android.systemui.statusbar.EmptyShadeView)45 Paint (android.graphics.Paint)40 ImageView (android.widget.ImageView)35 Point (android.graphics.Point)30 BatteryMeterView (com.android.systemui.BatteryMeterView)30 BackDropView (com.android.systemui.statusbar.BackDropView)30 ScrimView (com.android.systemui.statusbar.ScrimView)30 SignalClusterView (com.android.systemui.statusbar.SignalClusterView)30 NotificationHeaderView (android.view.NotificationHeaderView)25 BatteryLevelTextView (com.android.systemui.BatteryLevelTextView)24 KeyButtonView (com.android.systemui.statusbar.policy.KeyButtonView)24 StackScrollerDecorView (com.android.systemui.statusbar.StackScrollerDecorView)20 FakeShadowView (com.android.systemui.statusbar.notification.FakeShadowView)20 HybridNotificationView (com.android.systemui.statusbar.notification.HybridNotificationView)20