AttributionSource.CheckCallingUid Method

Definition

If you are handling an IPC and you don't trust the caller you need to validate whether the attribution source is one for the calling app to prevent the caller to pass you a source from another app without including themselves in the attribution chain.

[Android.Runtime.Register("checkCallingUid", "()Z", "", ApiSince=31)]
public bool CheckCallingUid ();
[<Android.Runtime.Register("checkCallingUid", "()Z", "", ApiSince=31)>]
member this.CheckCallingUid : unit -> bool

Returns

if the attribution source cannot be trusted to be from the caller.

Attributes

Remarks

If you are handling an IPC and you don't trust the caller you need to validate whether the attribution source is one for the calling app to prevent the caller to pass you a source from another app without including themselves in the attribution chain.

Java documentation for android.content.AttributionSource.checkCallingUid().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to