From 9369ce5d6659cd59aca148b7c36542a552bf91c0 Mon Sep 17 00:00:00 2001 From: yueyan Date: Wed, 25 Jun 2025 15:43:27 +0800 Subject: [PATCH] fix:update interface info of getCallingUid/Pid/TokenID Signed-off-by: yueyan --- api/@ohos.rpc.d.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index b2efd9bbf2..100fd109b1 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3150,7 +3150,8 @@ declare namespace rpc { ): void; /** - * Obtains the PID of the {@link RemoteProxy} object. + * Obtains the PID of the {@link RemoteProxy} object. This method returns -1 when the message + * from peer process on other device is received. * * @returns { number } Return the PID of the {@link RemoteProxy} object. * @syscap SystemCapability.Communication.IPC.Core @@ -3159,8 +3160,9 @@ declare namespace rpc { getCallingPid(): number; /** - * Obtains the UID of the {@link RemoteProxy} object. - * + * Obtains the UID of the {@link RemoteProxy} object. This method returns -1 when the message + * from peer process on other device is received. + * * @returns { number } Return the UID of the {@link RemoteProxy} object. * @syscap SystemCapability.Communication.IPC.Core * @since 7 @@ -3537,6 +3539,7 @@ declare namespace rpc { * when the communication ends. If this method is called from the {@link RemoteProxy} object, * {@code 0} is returned; if this method is called from the {@link RemoteObject} object, * the PID of the corresponding {@link RemoteProxy} object is returned. + * This method returns -1 when the message from peer process on other device is received. * * @returns { number } Return the PID of the proxy. * @syscap SystemCapability.Communication.IPC.Core @@ -3551,6 +3554,7 @@ declare namespace rpc { * when the communication ends. If this method is called from the {@link RemoteProxy} object, * {@code 0} is returned; if this method is called from the {@link RemoteObject} object, * the UID of the corresponding {@link RemoteProxy} object is returned. + * This method returns -1 when the message from peer process on other device is received. * * @returns { number } Return the UID of the proxy. * @syscap SystemCapability.Communication.IPC.Core @@ -3560,7 +3564,8 @@ declare namespace rpc { /** * Obtains the TOKENID. - *

This method is static. + *

This method is static. This method returns 0 when the message from peer process + * on other device is received. * * @returns { number } Return the TOKENID. * @syscap SystemCapability.Communication.IPC.Core -- Gitee