Merge "Make testServiceForegroundDuration test more stable" into oreo-mr1-cts-dev