Merge changes I65d67bf9,Ibeee6718 into tm-qpr-dev
* changes: Remove NSSL#isChildInInvisibleGroup Remove unused BubblesManager#maybeCancelSummary()
This commit is contained in:
committed by
Android (Google) Code Review
commit
7168e6c950
@@ -1337,19 +1337,7 @@ public class BubbleController implements ConfigurationChangeListener {
|
|||||||
}
|
}
|
||||||
mSysuiProxy.updateNotificationBubbleButton(bubble.getKey());
|
mSysuiProxy.updateNotificationBubbleButton(bubble.getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
mSysuiProxy.getPendingOrActiveEntry(bubble.getKey(), (entry) -> {
|
|
||||||
mMainExecutor.execute(() -> {
|
|
||||||
if (entry != null) {
|
|
||||||
final String groupKey = entry.getStatusBarNotification().getGroupKey();
|
|
||||||
if (getBubblesInGroup(groupKey).isEmpty()) {
|
|
||||||
// Time to potentially remove the summary
|
|
||||||
mSysuiProxy.notifyMaybeCancelSummary(bubble.getKey());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
mDataRepository.removeBubbles(mCurrentUserId, bubblesToBeRemovedFromRepository);
|
mDataRepository.removeBubbles(mCurrentUserId, bubblesToBeRemovedFromRepository);
|
||||||
|
|
||||||
|
|||||||
@@ -276,8 +276,6 @@ public interface Bubbles {
|
|||||||
|
|
||||||
void notifyInvalidateNotifications(String reason);
|
void notifyInvalidateNotifications(String reason);
|
||||||
|
|
||||||
void notifyMaybeCancelSummary(String key);
|
|
||||||
|
|
||||||
void updateNotificationBubbleButton(String key);
|
void updateNotificationBubbleButton(String key);
|
||||||
|
|
||||||
void onStackExpandChanged(boolean shouldExpand);
|
void onStackExpandChanged(boolean shouldExpand);
|
||||||
|
|||||||
@@ -144,11 +144,6 @@ public class BubbleCoordinator implements Coordinator {
|
|||||||
public void invalidateNotifications(String reason) {
|
public void invalidateNotifications(String reason) {
|
||||||
mNotifFilter.invalidateList(reason);
|
mNotifFilter.invalidateList(reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void maybeCancelSummary(NotificationEntry entry) {
|
|
||||||
// no-op
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private boolean isInterceptingDismissal(NotificationEntry entry) {
|
private boolean isInterceptingDismissal(NotificationEntry entry) {
|
||||||
|
|||||||
@@ -2794,10 +2794,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
if (mDebugRemoveAnimation) {
|
if (mDebugRemoveAnimation) {
|
||||||
Log.d(TAG, "generateRemove " + key
|
Log.d(TAG, "generateRemove " + key
|
||||||
+ "\nmIsExpanded " + mIsExpanded
|
+ "\nmIsExpanded " + mIsExpanded
|
||||||
+ "\nmAnimationsEnabled " + mAnimationsEnabled
|
+ "\nmAnimationsEnabled " + mAnimationsEnabled);
|
||||||
+ "\n!invisible group " + !isChildInInvisibleGroup(child));
|
|
||||||
}
|
}
|
||||||
if (mIsExpanded && mAnimationsEnabled && !isChildInInvisibleGroup(child)) {
|
if (mIsExpanded && mAnimationsEnabled) {
|
||||||
if (!mChildrenToAddAnimated.contains(child)) {
|
if (!mChildrenToAddAnimated.contains(child)) {
|
||||||
if (mDebugRemoveAnimation) {
|
if (mDebugRemoveAnimation) {
|
||||||
Log.d(TAG, "needsAnimation = true " + key);
|
Log.d(TAG, "needsAnimation = true " + key);
|
||||||
@@ -2845,26 +2844,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
return hasAddEvent && mAddedHeadsUpChildren.contains(child);
|
return hasAddEvent && mAddedHeadsUpChildren.contains(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO (b/162832756): remove since this won't happen in new pipeline (we prune groups in
|
|
||||||
// ShadeListBuilder)
|
|
||||||
/**
|
|
||||||
* @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
|
|
||||||
*/
|
|
||||||
@ShadeViewRefactor(RefactorComponent.ADAPTER)
|
|
||||||
private boolean isChildInInvisibleGroup(View child) {
|
|
||||||
if (child instanceof ExpandableNotificationRow) {
|
|
||||||
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
|
|
||||||
NotificationEntry groupSummary =
|
|
||||||
mGroupMembershipManager.getGroupSummary(row.getEntry());
|
|
||||||
if (groupSummary != null && groupSummary.getRow() != row) {
|
|
||||||
return row.getVisibility() == View.INVISIBLE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the scroll position when a child was removed
|
* Updates the scroll position when a child was removed
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -310,18 +310,6 @@ public class BubblesManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void notifyMaybeCancelSummary(String key) {
|
|
||||||
sysuiMainExecutor.execute(() -> {
|
|
||||||
final NotificationEntry entry = mCommonNotifCollection.getEntry(key);
|
|
||||||
if (entry != null) {
|
|
||||||
for (NotifCallback cb : mCallbacks) {
|
|
||||||
cb.maybeCancelSummary(entry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateNotificationBubbleButton(String key) {
|
public void updateNotificationBubbleButton(String key) {
|
||||||
sysuiMainExecutor.execute(() -> {
|
sysuiMainExecutor.execute(() -> {
|
||||||
@@ -646,15 +634,5 @@ public class BubblesManager {
|
|||||||
* filtered from the shade.
|
* filtered from the shade.
|
||||||
*/
|
*/
|
||||||
void invalidateNotifications(@NonNull String reason);
|
void invalidateNotifications(@NonNull String reason);
|
||||||
|
|
||||||
/**
|
|
||||||
* Called on a bubbled entry that has been removed when there are no longer
|
|
||||||
* bubbled entries in its group.
|
|
||||||
*
|
|
||||||
* Checks whether its group has any other (non-bubbled) children. If it doesn't,
|
|
||||||
* removes all remnants of the group's summary from the notification pipeline.
|
|
||||||
* TODO: (b/145659174) Only old pipeline needs this - delete post-migration.
|
|
||||||
*/
|
|
||||||
void maybeCancelSummary(@NonNull NotificationEntry entry);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user