Sdílet prostřednictvím


Binder.ClearCallingIdentity Method

Definition

Reset the identity of the incoming IPC on the current thread.

[Android.Runtime.Register("clearCallingIdentity", "()J", "")]
public static long ClearCallingIdentity ();
[<Android.Runtime.Register("clearCallingIdentity", "()J", "")>]
static member ClearCallingIdentity : unit -> int64

Returns

Returns an opaque token that can be used to restore the original calling identity by passing it to #restoreCallingIdentity(long).

Attributes

Remarks

Reset the identity of the incoming IPC on the current thread. This can be useful if, while handling an incoming call, you will be calling on interfaces of other objects that may be local to your process and need to do permission checks on the calls coming into them (so they will check the permission of your own local process, and not whatever process originally called you).

Java documentation for android.os.Binder.clearCallingIdentity().

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

See also