Add code to handle anomaly config update

Store a local version number in Settings. If new version comes,
upload config to StatsManager.

Bug: 72385333
Test: Will add robo test once robo framework is updated(b/73172999)
Change-Id: I03f5ee6f6e013746397d39b8d2b52ce587825b11
This commit is contained in:
jackqdyulei
2018-02-02 10:29:40 -08:00
parent e1604d3657
commit 10b7c0c39d
2 changed files with 38 additions and 8 deletions

View File

@@ -54,6 +54,7 @@ public class AnomalyDetectionReceiver extends BroadcastReceiver {
// The Example of intentDimsValue is: 35:{1:{1:{1:10013|}|}|}
StatsDimensionsValue intentDimsValue =
intent.getParcelableExtra(StatsManager.EXTRA_STATS_DIMENSIONS_VALUE);
Log.i(TAG, "Extra stats value: " + intentDimsValue.toString());
List<StatsDimensionsValue> intentTuple = intentDimsValue.getTupleValueList();
if (!intentTuple.isEmpty()) {