Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2c48bc5 authored by Steven Moreland's avatar Steven Moreland
Browse files

getCallingPid: document when to use it

Generally for debugging only, not for security reasons.
Needed to be documented for a long time.

Fixes: 383169393
Test: N/A
Change-Id: Id3c4a39832a115c5c20a25475fb28fbe896366c5
parent 31b8de43
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -313,7 +313,10 @@ public class Binder implements IBinder {
     * If the current thread is not currently executing an incoming transaction,
     * then its own PID is returned.
     *
     * Warning: oneway transactions do not receive PID. Even if you expect
     * Warning do not use this as a security identifier! PID is unreliable
     * as it may be re-used. This should mostly be used for debugging.
     *
     * oneway transactions do not receive PID. Even if you expect
     * a transaction to be synchronous, a misbehaving client could send it
     * as a asynchronous call and result in a 0 PID here. Additionally, if
     * there is a race and the calling process dies, the PID may still be