Delay global alerts by 1s for high thresholds

This is a cherry-pick of aosp/735725 with a minor conflict.

By skipping updates if an alert is already scheduled, this avoids firing
the global alert too often on devices with high transfer speeds and high
quota.

Test: with tethering watching videos. Also runtest frameworks-net
Bug: 117243748
Change-Id: Ia0ed76141dfb33546529786eb0118138ef3708c2
Merged-In: Ie0ba5c1d1a2139606e63fcfe46ec77a89accd8d9
Merged-In: Iaabb31586e9e747871a526dc7ebb7deeb65d8f83
1 file changed