Snap for 11041982 from 312466a9ae7d9c154d426d9e40ba347226b19e47 to mainline-cellbroadcast-release

Change-Id: I4c40dd26894ea47f09bb7bf7c7c61f0e5fa2d0ea
diff --git a/Android.bp b/Android.bp
index d58a82f..bb4bef6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -10,30 +10,44 @@
     license_text: ["LICENSE"],
 }
 
+filegroup {
+    name: "act-proto",
+    srcs: [
+       "**/*.proto",
+       "act/act.proto",
+    ],
+    visibility: ["//packages/modules/AdServices:__subpackages__"],
+    path: "act",
+}
+
 cc_defaults {
     name: "libact_defaults",
     host_supported: true,
 }
 
-cc_library {
+cc_library_static {
     name: "libact",
     defaults: ["libact_defaults"],
+    min_sdk_version: "30",
+    sdk_version: "current",
+    stl: "libc++_static",    
     srcs: [
       "act/act.proto",
       "act/act_v0/act_v0.cc",
       "act/act_v0/act_v0.proto",
       "act/act_v0/parameters.cc",
+      "act/util.proto",
     ],
     shared_libs: [
       "libcrypto",
       "liblog",
-      "libprotobuf-cpp-lite",
     ],
-    static_libs: [
+    whole_static_libs: [
       "libpjc_crypto",
       "libpjc_third_party_libabsl",
     ],
     cflags: ["-Wno-unused-parameter"],
+    export_include_dirs: ["."],
     proto: {
       type: "lite",
       export_proto_headers: true,
@@ -48,13 +62,17 @@
       integer_overflow: true,
       misc_undefined: ["bounds"],
     },
+    apex_available: ["com.android.adservices", "com.android.extservices",],
+    visibility: [
+    	"//packages/modules/AdServices:__subpackages__",
+    ],
     target: {
-        android: {
-            sanitize: {
-                cfi: true,
-            },
-        },
-    },
+	android: {
+	    whole_static_libs: [
+	        "libprotobuf-cpp-lite-ndk",
+	    ]
+	}
+    }
 }
 
 cc_test {
@@ -96,6 +114,7 @@
       "libpjc_third_party_libabsl",
     ],
     cflags: ["-Wno-unused-parameter"],
+    test_suites: ["general-tests"]
 }
 
 // This test times out.
diff --git a/act/util.proto b/act/util.proto
new file mode 100644
index 0000000..9041c07
--- /dev/null
+++ b/act/util.proto
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 Google LLC.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto3";
+
+package private_join_and_compute.anonymous_counting_tokens;
+
+import "act/act.proto";
+
+option java_multiple_files = true;
+
+message Transcript {
+  SchemeParameters scheme_parameters = 1;
+  ServerParameters server_parameters = 2;
+  ClientParameters client_parameters = 3;
+  repeated string messages = 4;
+  repeated bytes fingerprints = 5;
+  TokensRequest tokens_request = 6;
+  TokensRequestPrivateState tokens_request_private_state = 7;
+  TokensResponse tokens_response = 8;
+  repeated Token tokens = 9;
+}
+
+message MessagesSet {
+  repeated string message = 1;
+}
+
+message GeneratedTokensRequestProto {
+  repeated bytes fingerprints_bytes = 1;
+  TokensRequest token_request = 2;
+  TokensRequestPrivateState tokens_request_private_state = 3;
+}