Fix failing testSlicedStateCountMetric

Toggle global settings to turn off bluetooth background setting. This
prevents GMSCore from automatically turning on bluetooth even if the
bluetooth adapter has been turned off. The global settings need to be
reset to the original value at the end of the test so the TestSuite does
not complain about a test app modifying the system state.

Also increased the sleep time to 6 seconds to account for system
reaction and system delay times.

Test: m CtsStatsdHostTestCases
Test: cts-tradefed run cts --m CtsStatsdHostTestCases --t android.cts.statsd.metric.CountMetricsTests#testSlicedStateCountMetric
Test: passed on R build 6720564 on flame device running user-signed build RP1A.200720.012.A1 (6773204)
Bug: 167343512

Change-Id: I624a89d5124426954111c3e2de93e27b8ca22303
2 files changed
tree: 42d4fe309054fdf8b0662e2a6bdb17cc932bf158
  1. tests/