mozilla/MozStumbler — pull request #1302 by cascheberg (2014-11-24 23:54:43+00:00)
Title: Improve stats update efficiency

I noticed that UI updates always update all metrics. The UI is updated whenever a `ACTION_WIFIS_SCANNED` or `ACTION_CELLS_SCANNED` intent occurs, which is about once per second.
The current call stack looks like this:
- update the stats displayed in the map in `MainDrawerActivity.updateNumberDisplay()`
- always call `MetricsView.update()` *(this was improved)*
- call `MetricsView.updateQueuedStats()`
- call `DataStorageManager.getQueuedCounts()`

The last method for example calls `Zipper.zipData()` and has this comment:
> Some data is calculated on-demand, don't abuse this function

This PR changes the code to only update metrics stats if a bundle was flushed.
The UI updates could be differentiated a bit more even.