Snap for 8917908 from 1edfc7e5d691ee7d8e7849cfe840121fb1a2d977 to mainline-uwb-release

Change-Id: I22269c0f9a23d8de3032d8907825d9cf5d7360b5
diff --git a/Android.bp b/Android.bp
index 0cc7110..3b27e4d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,6 +37,38 @@
     srcs: [
         "src/main/**/*.java",
     ],
-
+    min_sdk_version: "30",
+    // Setting target sdk to 10000 to prevent issues such as b/220675744
+    target_sdk_version: "10000",
     sdk_version: "core_current",
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.adservices",
+    ],
+}
+
+android_test {
+    name: "CborJavaTestCases",
+    srcs: [
+        "src/test/**/*.java",
+    ],
+    static_libs: [
+        "androidx.test.rules",
+        "cbor-java",
+    ],
+    libs: [
+        "android.test.base",
+    ],
+    test_mainline_modules: [
+        "com.google.android.adservices.apex"
+    ],
+    min_sdk_version: "30",
+    // Setting target sdk to 10000 to prevent issues such as b/220675744
+    target_sdk_version: "10000",
+    sdk_version: "test_current",
+    test_suites: [
+        "general-tests",
+        "mts-adservices",
+    ],
+    visibility: ["//visibility:private"],
 }
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..f5e6a1a
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2022 The Android Open Source Project
+  ~
+  ~ 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
+  ~
+  ~      http://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.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="co.nstant.in.cbor" >
+
+    <application />
+    <instrumentation
+        android:name="androidx.test.runner.AndroidJUnitRunner"
+        android:targetPackage="co.nstant.in.cbor" >
+    </instrumentation>
+</manifest>
diff --git a/AndroidTest.xml b/AndroidTest.xml
new file mode 100644
index 0000000..824c8b3
--- /dev/null
+++ b/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2022 The Android Open Source Project
+  ~
+  ~ 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
+  ~
+  ~      http://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.
+  -->
+<configuration description="Config for cbor-java tests">
+    <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.adservices.apex" />
+    <option name="test-suite-tag" value="mts" />
+
+    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+        <option name="cleanup-apks" value="true"/>
+        <option name="test-file-name" value="CborJavaTestCases.apk"/>
+    </target_preparer>
+
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+        <option name="package" value="co.nstant.in.cbor"/>
+    </test>
+</configuration>
diff --git a/LICENSE b/LICENSE
index e06d208..8ed89ab 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,17 @@
+Copyright 2013-2021 Constantin Rack
+
+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
+
+    http://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.
+--------------------------------------------------------------------------------
 Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..943da69
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+  "mainline-presubmit": [
+    {
+      "name": "CborJavaTestCases[com.google.android.adservices.apex]"
+    }
+  ]
+}
+