Binder.ClearCallingIdentity 方法

定义

重置当前线程上传入 IPC 的标识。

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

返回

返回一个不透明令牌,该令牌可用于通过将原始调用标识传递给它来还原它 #restoreCallingIdentity(long)

属性

注解

重置当前线程上传入 IPC 的标识。 如果在处理传入调用时,将调用可能位于进程本地的其他对象的接口,并且需要对传入它们的调用执行权限检查(因此它们将检查你自己的本地进程的权限,而不是最初调用的任何进程),这非常有用。

适用于 . 的 android.os.Binder.clearCallingIdentity()Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

另请参阅