Bug 971735 - Remove element using iterator while looping in ArrayList (r=wesj)

This commit is contained in:
Lucas Rocha 2014-02-17 11:07:53 +00:00
Родитель 2c34a5ca5f
Коммит ef4e094611
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -798,7 +798,8 @@ public class ActivityChooserModel extends DataSetObservable {
for (Iterator<HistoricalRecord> i = mHistoricalRecords.iterator(); i.hasNext();) {
final HistoricalRecord record = i.next();
if (record.activity.getPackageName().equals(pkg)) {
removed = mHistoricalRecords.remove(record);
i.remove();
removed = true;
}
}