Update pica to v0.1.9 from upstream

Merge remote-tracking branch 'aosp/upstream-main' into pica-update

Test: TreeHugger
Test: atest CtsUwbTestCases
Change-Id: Icd5f2ef8e5443ce800cfdce15a96d3ff171132b2
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..42d3c8b
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,61 @@
+package {
+    default_applicable_licenses: ["external_rust_pica_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+    name: "external_rust_pica_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+    ],
+    license_text: [
+        "LICENSE",
+    ],
+}
+
+genrule {
+    name: "libpica_uci_packets",
+    defaults: ["pdl_rust_generator_defaults"],
+    srcs: ["src/uci_packets.pdl"],
+    out: ["uci_packets.rs"],
+}
+
+rust_library_host {
+    name: "libpica",
+    crate_name: "pica",
+    srcs: [
+        "src/lib.rs",
+        ":libpica_uci_packets",
+    ],
+    proc_macros: ["libnum_derive"],
+    rustlibs: [
+        "libanyhow",
+        "libbytes",
+        "libfutures",
+        "libglam",
+        "libhex",
+        "liblog_rust",
+        "libnum_traits",
+        "libpdl_runtime",
+        "libthiserror",
+        "libserde",
+        "libtokio",
+    ],
+}
+
+rust_binary_host {
+    name: "pica",
+    srcs: ["src/bin/main.rs"],
+    proc_macros: ["libnum_derive"],
+    rustlibs: [
+        "libanyhow",
+        "libenv_logger",
+        "libfutures",
+        "liblog_rust",
+        "libpica",
+        "libclap",
+        "libtokio",
+    ],
+}
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..46cbcbf
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,18 @@
+name: "Pica"
+description:
+    "Pica is a virtual UWB Controller implementing the FiRa UCI specification. "
+    "It has been designed for testing UWB ranging capabilities."
+
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "https://github.com/google/pica"
+  }
+  url {
+    type: GIT
+    value: "https://github.com/google/pica.git"
+  }
+  version: "v0.1.9"
+  license_type: NOTICE
+  last_upgrade_date { year: 2024 month: 4 day: 5 }
+}
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_APACHE2
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..b18b6a4
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,4 @@
+charliebout@google.com
+henrichataing@google.com
+licorne@google.com
+ziyiw@google.com
diff --git a/src/lib.rs b/src/lib.rs
index 2c46733..17ad1c2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -642,4 +642,4 @@
             this.lock().unwrap().pica_command(command)
         }
     }
-}
+}
\ No newline at end of file
diff --git a/src/session.rs b/src/session.rs
index f3ee408..2ee656a 100644
--- a/src/session.rs
+++ b/src/session.rs
@@ -170,4 +170,4 @@
             ReasonCode::StateChangeWithSessionManagementCommands,
         );
     }
-}
+}
\ No newline at end of file
diff --git a/static/index.html b/static/index.html
index 18ad8d8..6b4d188 100644
--- a/static/index.html
+++ b/static/index.html
@@ -16,10 +16,7 @@
 
 <link rel="preconnect" href="https://fonts.googleapis.com" />
 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
-<link
-  href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap"
-  rel="stylesheet"
-/>
+<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap" rel="stylesheet" />
 
 <style>
   body {
@@ -209,4 +206,4 @@
 
     info.update();
   });
-</script>
+</script>
\ No newline at end of file