mirror of
https://github.com/openharmony/resourceschedule_memmgr.git
synced 2026-07-01 03:23:18 -04:00
!473 merge local into master
支持传递窗口位置信息 Created-by: sagittary Commit-by: m00911899 Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) 支持传递窗口位置信息 #14564 https://gitcode.com/openharmony/window_window_manager/issues/14564 ### 二、建议测试周期和提测地址 建议测试完成时间: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/resourceschedule_memmgr!473
This commit is contained in:
@@ -41,6 +41,17 @@ public:
|
||||
*/
|
||||
MemMgrWindowInfo(uint32_t winId, int32_t pid, int32_t uid, bool visibility)
|
||||
: windowId_(winId), pid_(pid), uid_(uid), isVisible_(visibility) {};
|
||||
/**
|
||||
* @brief Construct of MemMgrWindowInfo.
|
||||
*
|
||||
* @param winId Window id.
|
||||
* @param pid Process id.
|
||||
* @param uid User id.
|
||||
* @param visibility True means window is visible, false means the opposite.
|
||||
* @param lastUsedPosition Window display position.
|
||||
*/
|
||||
MemMgrWindowInfo(uint32_t winId, int32_t pid, int32_t uid, bool visibility, std::string lastUsedPosition)
|
||||
: windowId_(winId), pid_(pid), uid_(uid), isVisible_(visibility), lastUsedPosition_(lastUsedPosition) {};
|
||||
/**
|
||||
* @brief Deconstruct of MemMgrWindowInfo.
|
||||
*/
|
||||
@@ -65,6 +76,7 @@ public:
|
||||
int32_t pid_ {0};
|
||||
int32_t uid_ {0};
|
||||
bool isVisible_ {false};
|
||||
std::string lastUsedPosition_ {""};
|
||||
};
|
||||
} // namespace Memory
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -25,7 +25,8 @@ const std::string TAG = "MemMgrWindowInfo";
|
||||
bool MemMgrWindowInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
return parcel.WriteUint32(windowId_) && parcel.WriteInt32(pid_) &&
|
||||
parcel.WriteInt32(uid_) && parcel.WriteBool(isVisible_);
|
||||
parcel.WriteInt32(uid_) && parcel.WriteBool(isVisible_) &&
|
||||
parcel.WriteString(lastUsedPosition_);
|
||||
}
|
||||
|
||||
MemMgrWindowInfo* MemMgrWindowInfo::Unmarshalling(Parcel &parcel)
|
||||
@@ -36,7 +37,8 @@ MemMgrWindowInfo* MemMgrWindowInfo::Unmarshalling(Parcel &parcel)
|
||||
return nullptr;
|
||||
}
|
||||
bool res = parcel.ReadUint32(memMgrWindowInfo->windowId_) && parcel.ReadInt32(memMgrWindowInfo->pid_) &&
|
||||
parcel.ReadInt32(memMgrWindowInfo->uid_) && parcel.ReadBool(memMgrWindowInfo->isVisible_);
|
||||
parcel.ReadInt32(memMgrWindowInfo->uid_) && parcel.ReadBool(memMgrWindowInfo->isVisible_) &&
|
||||
parcel.ReadString(memMgrWindowInfo->lastUsedPosition_);
|
||||
if (!res) {
|
||||
delete memMgrWindowInfo;
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user