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;
}
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);
}
}
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);
}
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();
}
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);
}
}
Aggregations