From 61c5f8e68b8a2718307dfca1cbebee79fa255f4e Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 4 Mar 2020 13:07:53 -0800 Subject: Clarify getCallingPid for oneway transactions. Seems this frequent gotcha is not documented here. Bug: N/A Test: N/A Change-Id: Ia186cd8b9945b75b8342b0750713d8667cfef064 --- core/java/android/os/Binder.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/java') diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index 2fa75f16a546..f2cf4e3981d3 100644 --- a/core/java/android/os/Binder.java +++ b/core/java/android/os/Binder.java @@ -260,6 +260,8 @@ public class Binder implements IBinder { * system services to determine its identity and check permissions. * If the current thread is not currently executing an incoming transaction, * then its own pid is returned. + * + * Warning: oneway transactions do not receive PID. */ @CriticalNative public static final native int getCallingPid(); -- cgit v1.2.3