Update CTS test for app upgrades

One cts test tests app upgrade partial buckets. Update this test to use
the new proto field to ensure that CTS passes regardless of the behavior
change.

Test: atest CtsStatsdHostTestCases:CountMetricsTests
Bug: 195601319
Change-Id: If551dbd9332ca411c4ede3489e9e235b7f8d4083
Merged-In: If551dbd9332ca411c4ede3489e9e235b7f8d4083
diff --git a/statsd/src/statsd_config.proto b/statsd/src/statsd_config.proto
index e6bbbfb..1750aa9 100644
--- a/statsd/src/statsd_config.proto
+++ b/statsd/src/statsd_config.proto
@@ -233,6 +233,8 @@
 
   optional UploadThreshold threshold = 10;
 
+  optional bool split_bucket_for_app_upgrade = 11;
+
   optional FieldMatcher dimensions_in_condition = 7 [deprecated = true];
 
   reserved 100;
@@ -265,6 +267,8 @@
 
   optional UploadThreshold threshold = 11;
 
+  optional bool split_bucket_for_app_upgrade = 12;
+
   optional FieldMatcher dimensions_in_condition = 8 [deprecated = true];
 
   reserved 100;
@@ -304,7 +308,7 @@
 
   optional int32 max_pull_delay_sec = 13 [default = 30];
 
-  optional bool split_bucket_for_app_upgrade = 14 [default = true];
+  optional bool split_bucket_for_app_upgrade = 14;
 
   reserved 100;
   reserved 101;
@@ -359,7 +363,7 @@
 
   optional int32 max_pull_delay_sec = 16 [default = 30];
 
-  optional bool split_bucket_for_app_upgrade = 17 [default = true];
+  optional bool split_bucket_for_app_upgrade = 17;
 
   optional FieldMatcher dimensions_in_condition = 9 [deprecated = true];
 
diff --git a/tests/src/android/cts/statsd/metric/CountMetricsTests.java b/tests/src/android/cts/statsd/metric/CountMetricsTests.java
index dd1240f..ef077f3 100644
--- a/tests/src/android/cts/statsd/metric/CountMetricsTests.java
+++ b/tests/src/android/cts/statsd/metric/CountMetricsTests.java
@@ -253,11 +253,14 @@
     public void testPartialBucketCountMetric() throws Exception {
         int matcherId = 1;
         StatsdConfigProto.StatsdConfig.Builder builder = createConfigBuilder();
-        builder.addCountMetric(StatsdConfigProto.CountMetric.newBuilder()
-                .setId(MetricsUtils.COUNT_METRIC_ID)
-                .setBucket(StatsdConfigProto.TimeUnit.ONE_DAY)  // Should ensure partial bucket.
-                .setWhat(matcherId))
-                .addAtomMatcher(MetricsUtils.simpleAtomMatcher(matcherId));
+        builder
+            .addCountMetric(
+                StatsdConfigProto.CountMetric.newBuilder()
+                    .setId(MetricsUtils.COUNT_METRIC_ID)
+                    .setBucket(StatsdConfigProto.TimeUnit.ONE_DAY) // Ensures partial bucket.
+                    .setWhat(matcherId)
+                    .setSplitBucketForAppUpgrade(true))
+            .addAtomMatcher(MetricsUtils.simpleAtomMatcher(matcherId));
         uploadConfig(builder);
 
         doAppBreadcrumbReportedStart(0);