зеркало из https://github.com/mozilla/gecko-dev.git
Bug 971735 - Remove element using iterator while looping in ArrayList (r=wesj)
This commit is contained in:
Родитель
2c34a5ca5f
Коммит
ef4e094611
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче