Skip to content

Commit

Permalink
The current cells count (used for display), is not correctly calculated
Browse files Browse the repository at this point in the history
for duplicate entries
  • Loading branch information
garvankeeley committed Sep 8, 2014
1 parent 2b96133 commit bee38fd
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,17 @@ public void run() {
ArrayList<CellInfo> cells = (sTestingModeCellInfoArray != null)? sTestingModeCellInfoArray :
new ArrayList<CellInfo>(getImplementation().getCellInfo());

mCurrentCellInfoCount = cells.size();
mCurrentCellInfoCount = 0;
if (cells.isEmpty()) {
return;
}
for (CellInfo cell: cells) mCells.add(cell.getCellIdentity());

final Set<String> currUniqueCells = new HashSet<String>();
for (CellInfo cell : cells) {
currUniqueCells.add(cell.getCellIdentity());
mCells.add(cell.getCellIdentity());
}
mCurrentCellInfoCount = currUniqueCells.size();

Intent intent = new Intent(ACTION_CELLS_SCANNED);
intent.putParcelableArrayListExtra(ACTION_CELLS_SCANNED_ARG_CELLS, cells);
Expand Down

0 comments on commit bee38fd

Please sign in to comment.