다음을 통해 공유


AttributionSource.EnforceCallingUid 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("enforceCallingUid", "()V", "", ApiSince=31)]
public void EnforceCallingUid ();
[<Android.Runtime.Register("enforceCallingUid", "()V", "", ApiSince=31)>]
member this.EnforceCallingUid : unit -> unit
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.enforceCallingUid().

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