Always invoke the action passed to assertMetricsLogged.

Before we would not invoke it if statsd is disabled. This
turned out to be problematic as developers would assume it
is always performed and would just wrap the feature tests
in it, instead of creating separate metric-specific tests.

This CL also modifies existing tests to skip them
altogether if statsd is disabled. The difference is that
now we check for statsd at the beginning of the tests
themselves, and/or wrapping the metric assertion in ifs.

Fixes: 142123121
Test: atest CtsDevicePolicyManagerTestCases
Change-Id: I85074ee71baf710fc2a3eede4b2b9595d3a31fab
11 files changed