Fix check for number of expected callbacks am: c271d90af3

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/chre/+/25647208

Change-Id: I41777966cc22a4dd5841af0f7098f157121d1d43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/apps/OWNERS b/apps/OWNERS
new file mode 100644
index 0000000..1c82323
--- /dev/null
+++ b/apps/OWNERS
@@ -0,0 +1 @@
+annaherrera@google.com
\ No newline at end of file
diff --git a/apps/test/OWNERS b/apps/test/OWNERS
new file mode 100644
index 0000000..a55f0ca
--- /dev/null
+++ b/apps/test/OWNERS
@@ -0,0 +1 @@
+matthewsedam@google.com
diff --git a/chpp/QUICKSTART.md b/chpp/QUICKSTART.md
index 3c939f1..e0b5e97 100644
--- a/chpp/QUICKSTART.md
+++ b/chpp/QUICKSTART.md
@@ -4,7 +4,7 @@
 
 ## CHPP Transport Layer Integration
 
-### 1. Platform-specific functionality
+### Platform-specific functionality
 
 Implement the platform-specific functionality utilized by CHPP. These can be found in chpp/platform and include:
 
@@ -17,32 +17,32 @@
 
 Sample Linux implementations are provided.
 
-### 1. Link-Layer APIs
+### Link-Layer APIs
 
 You need to create a `ChppLinkApi` API struct and a `ChppLinkConfiguration` configuration struct for your link layer.
 See details in link.h.
 
-### 1. Initialization
+### Initialization
 
-In order to initialize CHPP, it is necessary to
+In order to initialize CHPP, it is necessary to:
 
 1. Allocate the linkContext, transportContext, and appContext structs that hold the state for each instance of the application, transport, and link layers (in any order)
 1. Call the layers’ initialization functions, chppTransportInit and chppAppInit (in any order)
 1. Call chppWorkThreadStart to start the main thread for CHPP's Transport Layer
 
-### 1. Testing
+### Testing
 
 Several unit tests are provided in transport_test.c. In addition, loopback functionality is already implemented in CHPP, and can be used for testing. For details on crafting a loopback datagram, please refer to README.md and the transport layer unit tests (transport_test.c).
 
-### 1. Termination
+### Termination
 
-In order to terminate CHPP's main transport layer thread, it is necessary to
+In order to terminate CHPP's main transport layer thread, it is necessary to:
 
 1. Call chppWorkThreadStop() to stop the main worker thread.
 1. Call the layers’ deinitialization functions, chppTransportDeinit and chppAppDeinit (in any order)
 1. Deallocate the transportContext, appContext, and the linkContext structs
 
-### 1. Single-threaded systems
+### Single-threaded systems
 
 If the system does not support multi-threading, the chppWorkThreadHandleSignal method can be used to directly handle signals without using chppWorkThreadStart.
 
@@ -52,7 +52,7 @@
 
 ## CHPP Services Integration
 
-CHPP provides several predefined services (including Loopback Test, Service Discovery), as well as three standard services that follow the CHRE PAL API to simplify integration and testing. CHPP allows for custom services as well, as described in README.md. The standard services included in CHPP are
+CHPP provides several predefined services (including Loopback Test, Service Discovery), as well as three standard services that follow the CHRE PAL API to simplify integration and testing. CHPP allows for custom services as well, as described in README.md. The standard services included in CHPP are:
 
 1. WWAN
 1. WiFi
diff --git a/chre_api/include/chre_api/chre/event.h b/chre_api/include/chre_api/chre/event.h
index e519c3d..04b2d0d 100644
--- a/chre_api/include/chre_api/chre/event.h
+++ b/chre_api/include/chre_api/chre/event.h
@@ -164,6 +164,21 @@
 #define CHRE_EVENT_HOST_ENDPOINT_NOTIFICATION UINT16_C(0x0008)
 
 /**
+ * Indicates a RPC request from a nanoapp.
+ *
+ * @since v1.9
+ */
+#define CHRE_EVENT_RPC_REQUEST UINT16_C(0x00009)
+
+/**
+ * Indicates a RPC response from a nanoapp.
+ *
+ * @since v1.9
+ */
+#define CHRE_EVENT_RPC_RESPONSE UINT16_C(0x0000A)
+
+
+/**
  * First possible value for CHRE_EVENT_SENSOR events.
  *
  * This allows us to separately define our CHRE_EVENT_SENSOR_* events in
@@ -309,6 +324,15 @@
 /** @} */
 
 /**
+ * Reserved message type for RPC messages.
+ *
+ * @see chreSendMessageWithPermissions
+ *
+ * @since v1.9
+ */
+#define CHRE_MESSAGE_TYPE_RPC UINT32_C(0x7FFFFFF5)
+
+/**
  * @see chrePublishRpcServices
  *
  * @since v1.8
@@ -717,6 +741,8 @@
  *     NOTE: In CHRE API v1.0, support for forwarding this field to the host was
  *     not strictly required, and some implementations did not support it.
  *     However, its support is mandatory as of v1.1.
+ *     NOTE: The value CHRE_MESSAGE_TYPE_RPC is reserved for usage by RPC
+ *     libraries and normally should not be directly used by nanoapps.
  * @param hostEndpoint  An identifier for the intended recipient of the message,
  *     or CHRE_HOST_ENDPOINT_BROADCAST if all registered endpoints on the host
  *     should receive the message.  Endpoint identifiers are assigned on the
diff --git a/core/OWNERS b/core/OWNERS
new file mode 100644
index 0000000..1c82323
--- /dev/null
+++ b/core/OWNERS
@@ -0,0 +1 @@
+annaherrera@google.com
\ No newline at end of file
diff --git a/host/tinysys/hal/Android.bp b/host/tinysys/hal/Android.bp
index b78c29d..0550da1 100644
--- a/host/tinysys/hal/Android.bp
+++ b/host/tinysys/hal/Android.bp
@@ -24,6 +24,7 @@
 
 cc_binary {
     name: "android.hardware.contexthub-service.tinysys",
+    cpp_std: "c++20",
     defaults: ["hidl_defaults"],
     vendor: true,
     relative_install_path: "hw",
diff --git a/java/test/OWNERS b/java/test/OWNERS
new file mode 100644
index 0000000..a55f0ca
--- /dev/null
+++ b/java/test/OWNERS
@@ -0,0 +1 @@
+matthewsedam@google.com
diff --git a/java/test/chqts/Android.bp b/java/test/chqts/Android.bp
index 306d0dc..16ceb7a 100644
--- a/java/test/chqts/Android.bp
+++ b/java/test/chqts/Android.bp
@@ -30,7 +30,7 @@
         "androidx.test.rules",
         "chre-test-utils",
         "chre_pigweed_utils",
-        "truth-prebuilt",
+        "truth",
         "guava",
         "chre_api_test_proto_java_lite",
         "pw_rpc_java_client",
diff --git a/java/test/utils/Android.bp b/java/test/utils/Android.bp
index 0c842e5..ca474df 100644
--- a/java/test/utils/Android.bp
+++ b/java/test/utils/Android.bp
@@ -28,7 +28,7 @@
 
     static_libs: [
         "androidx.test.rules",
-        "truth-prebuilt",
+        "truth",
         "chre_api_test_proto_java_lite",
         "chre_pigweed_utils",
         "pw_rpc_java_client",
diff --git a/platform/OWNERS b/platform/OWNERS
new file mode 100644
index 0000000..1c82323
--- /dev/null
+++ b/platform/OWNERS
@@ -0,0 +1 @@
+annaherrera@google.com
\ No newline at end of file
diff --git a/platform/linux/chre_api_re.cc b/platform/linux/chre_api_re.cc
index ae9475b..2963c45 100644
--- a/platform/linux/chre_api_re.cc
+++ b/platform/linux/chre_api_re.cc
@@ -15,6 +15,7 @@
  */
 
 #include <cinttypes>
+#include <cstdio>
 
 #include "chre/platform/log.h"
 #include "chre/util/macros.h"
diff --git a/test/OWNERS b/test/OWNERS
new file mode 100644
index 0000000..1c82323
--- /dev/null
+++ b/test/OWNERS
@@ -0,0 +1 @@
+annaherrera@google.com
\ No newline at end of file
diff --git a/util/OWNERS b/util/OWNERS
new file mode 100644
index 0000000..1c82323
--- /dev/null
+++ b/util/OWNERS
@@ -0,0 +1 @@
+annaherrera@google.com
\ No newline at end of file
diff --git a/util/tests/optional_test.cc b/util/tests/optional_test.cc
index b1fffb0..ba647a0 100644
--- a/util/tests/optional_test.cc
+++ b/util/tests/optional_test.cc
@@ -17,6 +17,8 @@
 
 #include "gtest/gtest.h"
 
+#include <cassert>
+
 #include "chre/util/non_copyable.h"
 #include "chre/util/optional.h"