!41 merge master into master

fix comments

Created-by: hcwww
Commit-by: hcw
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)



### 二、建议测试周期和提测地址  
  建议测试完成时间:xxxx.xx.xx  
  投产上线时间:xxxx.xx.xx  
  提测地址:CI环境/压测环境  
  测试账号:  

### 三、变更内容
  * 3.1 关联PR列表

  * 3.2 数据库和部署说明  
    1. 常规更新 
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"

  * 3.4 其他技术优化内容(做了什么,变更了什么)
    - 重构了 xxxx 代码
    - xxxx 算法优化


  * 3.5 废弃通知(什么字段、方法弃用?)



  * 3.6  后向不兼容变更(是否有无法向后兼容的变更?)


  
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
  自测测试结论:


### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
  检查点:

| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx  | 否          | 需要       | 不需要           |
|      |            |          |               |

  接口测试:

  性能测试:

  并发测试:

  其他:



See merge request: openharmony/communication_communication_cangjie_wrapper!41
This commit is contained in:
openharmony_ci
2025-11-17 15:51:32 +08:00
3 changed files with 264 additions and 275 deletions
+13 -16
View File
@@ -78,10 +78,9 @@ public class Ashmem <: RemoteDataLite {
/**
* Creates an Ashmem object with the specified name and size.
*
* @param { String } name - Name of the Ashmem object to create.
* @param { Int32 } size - Size (in bytes) of the Ashmem object to create.
* @returns { Ashmem } Return the Ashmem object if it is created successfully; return null otherwise.
* @returns { Ashmem } Return the Ashmem object if it is created successfully.
*/
@!APILevel[
since: "22",
@@ -104,7 +103,6 @@ public class Ashmem <: RemoteDataLite {
/**
* Creates an Ashmem object by copying the file descriptor (FD) of an existing Ashmem object.
* The two Ashmem objects point to the same shared memory region.
*
* @param { Ashmem } ashmem - Existing Ashmem object.
* @returns { Ashmem } Ashmem object created.
*/
@@ -143,7 +141,6 @@ public class Ashmem <: RemoteDataLite {
/**
* Obtains the mapped memory size of this Ashmem object.
*
* @returns { Int32 } Memory size mapped.
*/
@!APILevel[
@@ -160,13 +157,13 @@ public class Ashmem <: RemoteDataLite {
/**
* Creates the shared file mapping on the virtual address space of this process.
* The size of the mapping region is specified by this Ashmem object.
*
* @param { UInt32 } mapType - Protection level of the memory region to which the shared file is mapped.
* @throws { BusinessException } 1900001 - Failed to call mmap.
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func mapTypedAshmem(mapType: UInt32): Unit {
var errCode = 0i32
@@ -176,12 +173,12 @@ public class Ashmem <: RemoteDataLite {
/**
* Maps the shared file to the readable and writable virtual address space of the process.
*
* @throws { BusinessException } 1900001 - Failed to call mmap.
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func mapReadWriteAshmem(): Unit {
var errCode = 0i32
@@ -191,12 +188,12 @@ public class Ashmem <: RemoteDataLite {
/**
* Maps the shared file to the read-only virtual address space of the process.
*
* @throws { BusinessException } 1900001 - Failed to call mmap.
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func mapReadonlyAshmem(): Unit {
var errCode = 0i32
@@ -206,13 +203,13 @@ public class Ashmem <: RemoteDataLite {
/**
* Sets the protection level of the memory region to which the shared file is mapped.
*
* @param { UInt32 } protectionType - Protection type to set.
* @throws { BusinessException } 1900002 - Failed to call ioctl.
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func setProtectionType(protectionType: UInt32): Unit {
var errCode = 0i32
@@ -222,7 +219,6 @@ public class Ashmem <: RemoteDataLite {
/**
* Writes data to the shared file associated with this Ashmem object.
*
* @param { Array<Byte> } buf - Data to write
* @param { Int64 } size - Size of the data to write
* @param { Int64 } offset - Start position of the data to write in the memory region associated
@@ -231,7 +227,8 @@ public class Ashmem <: RemoteDataLite {
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func writeDataToAshmem(buf: Array<Byte>, size: Int64, offset: Int64): Unit {
if (buf.size == 0) {
@@ -248,7 +245,6 @@ public class Ashmem <: RemoteDataLite {
/**
* Reads data from the shared file associated with this Ashmem object.
*
* @param { Int64 } size - Size of the data to read.
* @param { Int64 } offset - Start position of the data to read in the memory region associated
* with this Ashmem object.
@@ -257,7 +253,8 @@ public class Ashmem <: RemoteDataLite {
*/
@!APILevel[
since: "22",
syscap: "SystemCapability.Communication.IPC.Core"
syscap: "SystemCapability.Communication.IPC.Core",
throwexception: true
]
public func readDataFromAshmem(size: Int64, offset: Int64): Array<Byte> {
unsafe {
File diff suppressed because it is too large Load Diff
+10 -4
View File
@@ -21,8 +21,8 @@ import ohos.labels.APILevel
/**
* During inter-process communication, objects of the class are written to the {@link MessageSequence} and
* they are recovered from the {@link MessageSequence}.
* During inter-process communication, objects of the class are written to the MessageSequence and
* they are recovered from the MessageSequence.
*/
@!APILevel[
since: "22",
@@ -30,7 +30,10 @@ import ohos.labels.APILevel
]
public interface Parcelable {
/**
* Marshal this {@code Parcelable} object into a {@link MessageSequence}.
* Marshal this Parcelable object into a MessageSequence.
* @param { MessageSequence } dataOut - Indicates the MessageSequence object to which the Parcelable
* object will be marshalled.
* @returns { Bool } Return True if the marshalling is successful; return False otherwise.
*/
@!APILevel[
since: "22",
@@ -39,7 +42,10 @@ public interface Parcelable {
func marshalling(dataOut: MessageSequence): Bool
/**
* Unmarshal this {@code Parcelable} object from a {@link MessageSequence}.
* Unmarshal this Parcelable object from a MessageSequence.
* @param { MessageSequence } dataIn - Indicates the MessageSequence object into
* which the Parcelable object has been marshalled.
* @returns { Bool } Return True if the unmarshalling is successful; return False otherwise.
*/
@!APILevel[
since: "22",