BackgroundScanScheduler: Optimize buckets
Optimize the buckets to ensure that the same channel is not scheduled
across multiple buckets. The settings are split if some of the channels
in the setting is already being scanned in lower time period bucket.
Also go thru each bucket and check if any of them don't fit into the
bucket specifications, if yes create split buckets with the same
time period. The split buckets will cumulatively contain all the channels
needed to be scanned in the original buckets.
BUG:28022609
Change-Id: Ie24bc3ec891965adad0ce6e855015be6ff5f0740
TEST: Compiles & unit-test passes
5 files changed