summaryrefslogtreecommitdiff
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/android/OWNERS13
-rw-r--r--native/android/libandroid.map.txt3
-rw-r--r--native/android/libandroid_net.map.txt4
-rw-r--r--native/android/net.c12
-rw-r--r--native/android/surface_control.cpp6
5 files changed, 33 insertions, 5 deletions
diff --git a/native/android/OWNERS b/native/android/OWNERS
index 8b35f8d38691..cfe973400c98 100644
--- a/native/android/OWNERS
+++ b/native/android/OWNERS
@@ -1,14 +1,23 @@
-jreck@google.com
+jreck@google.com #{LAST_RESORT_SUGGESTION}
+# General NDK API reviewers
+per-file libandroid.map.txt = danalbert@google.com, etalvala@google.com, michaelwr@google.com
+per-file libandroid.map.txt = jreck@google.com, zyy@google.com
+
+# Networking
per-file libandroid_net.map.txt, net.c = set noparent
-per-file libandroid_net.map.txt, net.c = jchalard@google.com, junyulai@google.com
+per-file libandroid_net.map.txt, net.c = codewiz@google.com, jchalard@google.com, junyulai@google.com
per-file libandroid_net.map.txt, net.c = lorenzo@google.com, reminv@google.com, satk@google.com
+
+# Fonts
per-file system_fonts.cpp = file:/graphics/java/android/graphics/fonts/OWNERS
+# Window manager
per-file native_window_jni.cpp = file:/services/core/java/com/android/server/wm/OWNERS
per-file native_activity.cpp = file:/services/core/java/com/android/server/wm/OWNERS
per-file surface_control.cpp = file:/services/core/java/com/android/server/wm/OWNERS
+# Graphics
per-file choreographer.cpp = file:/graphics/java/android/graphics/OWNERS
per-file hardware_buffer_jni.cpp = file:/graphics/java/android/graphics/OWNERS
per-file native_window_jni.cpp = file:/graphics/java/android/graphics/OWNERS
diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt
index f33e11817730..220175398eba 100644
--- a/native/android/libandroid.map.txt
+++ b/native/android/libandroid.map.txt
@@ -300,6 +300,9 @@ LIBANDROID {
android_res_nquery; # introduced=29
android_res_nresult; # introduced=29
android_res_nsend; # introduced=29
+ android_tag_socket_with_uid; # introduced=Tiramisu
+ android_tag_socket; # introduced=Tiramisu
+ android_untag_socket; # introduced=Tiramisu
AThermal_acquireManager; # introduced=30
AThermal_releaseManager; # introduced=30
AThermal_getCurrentThermalStatus; # introduced=30
diff --git a/native/android/libandroid_net.map.txt b/native/android/libandroid_net.map.txt
index a6c1b5098066..32fd734d61a0 100644
--- a/native/android/libandroid_net.map.txt
+++ b/native/android/libandroid_net.map.txt
@@ -18,6 +18,10 @@ LIBANDROID_NET {
android_getprocnetwork; # llndk
android_setprocdns; # llndk
android_getprocdns; # llndk
+ # These functions have been part of the NDK since API 33.
+ android_tag_socket_with_uid; # llndk
+ android_tag_socket; # llndk
+ android_untag_socket; # llndk
local:
*;
};
diff --git a/native/android/net.c b/native/android/net.c
index e2f36a77b7c6..d7c22e1a5741 100644
--- a/native/android/net.c
+++ b/native/android/net.c
@@ -161,3 +161,15 @@ int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen,
void android_res_cancel(int nsend_fd) {
resNetworkCancel(nsend_fd);
}
+
+int android_tag_socket_with_uid(int sockfd, int tag, uid_t uid) {
+ return tagSocket(sockfd, tag, uid);
+}
+
+int android_tag_socket(int sockfd, int tag) {
+ return tagSocket(sockfd, tag, -1);
+}
+
+int android_untag_socket(int sockfd) {
+ return untagSocket(sockfd);
+}
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp
index 693a027bd0e2..d818ffc7c352 100644
--- a/native/android/surface_control.cpp
+++ b/native/android/surface_control.cpp
@@ -298,7 +298,7 @@ void ASurfaceTransaction_setOnComplete(ASurfaceTransaction* aSurfaceTransaction,
auto& aSurfaceControlStats = aSurfaceTransactionStats.aSurfaceControlStats;
- for (const auto& [surfaceControl, latchTime, acquireTime, presentFence, previousReleaseFence, transformHint, frameEvents] : surfaceControlStats) {
+ for (const auto& [surfaceControl, latchTime, acquireTime, presentFence, previousReleaseFence, transformHint, frameEvents, ignore] : surfaceControlStats) {
ASurfaceControl* aSurfaceControl = reinterpret_cast<ASurfaceControl*>(surfaceControl.get());
aSurfaceControlStats[aSurfaceControl].acquireTime = acquireTime;
aSurfaceControlStats[aSurfaceControl].previousReleaseFence = previousReleaseFence;
@@ -650,7 +650,7 @@ void ASurfaceTransaction_setOnCommit(ASurfaceTransaction* aSurfaceTransaction, v
for (const auto&
[surfaceControl, latchTime, acquireTime, presentFence,
previousReleaseFence, transformHint,
- frameEvents] : surfaceControlStats) {
+ frameEvents, ignore] : surfaceControlStats) {
ASurfaceControl* aSurfaceControl =
reinterpret_cast<ASurfaceControl*>(surfaceControl.get());
aSurfaceControlStats[aSurfaceControl].acquireTime = acquireTime;
@@ -662,4 +662,4 @@ void ASurfaceTransaction_setOnCommit(ASurfaceTransaction* aSurfaceTransaction, v
Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction);
transaction->addTransactionCommittedCallback(callback, context);
-} \ No newline at end of file
+}