Limit the number of concurrent notifs appear on screen
To avoid an ANR in notification history Test: Manual; with an app with 10k recent notifications Bug: 183712803 Change-Id: Ia1340accadf43620c7b5a2c94ca1032cfe49ea59
This commit is contained in:
@@ -71,6 +71,11 @@ public class NotificationHistoryAdapter extends
|
||||
return new NotificationHistoryViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return mValues.get(position).hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final @NonNull NotificationHistoryViewHolder holder,
|
||||
int position) {
|
||||
|
@@ -40,7 +40,6 @@ public class NotificationHistoryRecyclerView extends RecyclerView {
|
||||
ItemTouchHelper touchHelper = new ItemTouchHelper(
|
||||
new DismissTouchHelper(0, ItemTouchHelper.START | ItemTouchHelper.END));
|
||||
touchHelper.attachToRecyclerView(this);
|
||||
setNestedScrollingEnabled(false);
|
||||
}
|
||||
|
||||
public void setOnItemSwipeDeleteListener(OnItemSwipeDeleteListener listener) {
|
||||
|
Reference in New Issue
Block a user