commit | acbca16cfaf4248320ab8c5e1e7189bf314eaa29 | [log] [tgz] |
---|---|---|
author | Yuri Lin <yurilin@google.com> | Tue Apr 27 11:13:49 2021 -0400 |
committer | Yuri Lin <yurilin@google.com> | Tue Apr 27 18:16:51 2021 +0000 |
tree | fbe7d7d4cba2ab3471071526e93936e7045a8864 | |
parent | f10473c64ccafb9a1a2d20432d228c01c118159d [diff] |
Use an iterator in removeChannelNotifications rather than index. The index-based implementation is buggy because if an element is removed from the list, the current index will be incorrect, thus both skipping over an element and potentially running off the end of the list. This change also modifies ArchiveTest to test these edge cases. Test: atest ArchiveTest (before & after change) Bug: 186473453 Change-Id: I1611aa6d3630beef60f916d59a76c7976f1648d2