mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
UniRending supports Startwindow.
Signed-off-by: lu <zhaolu2@huawei.com> Change-Id: Ie86d01d33b28b93f08c490ca642215b716490f7d
This commit is contained in:
@@ -35,9 +35,10 @@ public:
|
||||
|
||||
virtual int32_t GetFocusWindow(sptr<IRemoteObject>& abilityToken) = 0;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap, uint32_t bgColor) = 0;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor) = 0;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap) = 0;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap) = 0;
|
||||
|
||||
virtual void CancelStartingWindow(sptr<IRemoteObject> abilityToken) = 0;
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ public:
|
||||
|
||||
virtual int32_t GetFocusWindow(sptr<IRemoteObject>& abilityToken) override;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap,
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap,
|
||||
uint32_t bgColor) override;
|
||||
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap) override;
|
||||
virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap) override;
|
||||
|
||||
virtual void CancelStartingWindow(sptr<IRemoteObject> abilityToken) override;
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@ int32_t WindowManagerServiceHandlerProxy::GetFocusWindow(sptr<IRemoteObject>& ab
|
||||
return ret;
|
||||
}
|
||||
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap,
|
||||
uint32_t bgColor)
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor)
|
||||
{
|
||||
HILOG_DEBUG("%{public}s is called.", __func__);
|
||||
MessageParcel data;
|
||||
@@ -86,7 +86,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
HILOG_ERROR("Write info failed.");
|
||||
return;
|
||||
}
|
||||
if (!data.WriteParcelable(pixelMap.GetRefPtr())) {
|
||||
if (!data.WriteParcelable(pixelMap.get())) {
|
||||
HILOG_ERROR("Write pixelMap failed.");
|
||||
return;
|
||||
}
|
||||
@@ -102,7 +102,8 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info, sptr<Media::PixelMap> pixelMap)
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap)
|
||||
{
|
||||
HILOG_DEBUG("%{public}s is called.", __func__);
|
||||
MessageParcel data;
|
||||
@@ -114,7 +115,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
HILOG_ERROR("Write info failed.");
|
||||
return;
|
||||
}
|
||||
if (!data.WriteParcelable(pixelMap.GetRefPtr())) {
|
||||
if (!data.WriteParcelable(pixelMap.get())) {
|
||||
HILOG_ERROR("Write pixelMap failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,8 +111,9 @@ int WindowManagerServiceHandlerStub::StartingWindowCold(MessageParcel &data, Mes
|
||||
HILOG_ERROR("To read info failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
sptr<Media::PixelMap> pixelMap(data.ReadParcelable<Media::PixelMap>());
|
||||
if (!pixelMap) {
|
||||
std::shared_ptr<Media::PixelMap> pixelMap
|
||||
= std::shared_ptr<Media::PixelMap>(data.ReadParcelable<Media::PixelMap>());
|
||||
if (pixelMap == nullptr) {
|
||||
HILOG_ERROR("To read pixelMap failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
@@ -129,8 +130,9 @@ int WindowManagerServiceHandlerStub::StartingWindowHot(MessageParcel &data, Mess
|
||||
HILOG_ERROR("To read info failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
sptr<Media::PixelMap> pixelMap(data.ReadParcelable<Media::PixelMap>());
|
||||
if (!pixelMap) {
|
||||
std::shared_ptr<Media::PixelMap> pixelMap
|
||||
= std::shared_ptr<Media::PixelMap>(data.ReadParcelable<Media::PixelMap>());
|
||||
if (pixelMap == nullptr) {
|
||||
HILOG_ERROR("To read pixelMap failed.");
|
||||
return ERR_AAFWK_PARCEL_FAIL;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ private:
|
||||
const std::shared_ptr<Want> &want, const AbilityRequest &abilityRequest);
|
||||
std::shared_ptr<Global::Resource::ResourceManager> CreateResourceManager(
|
||||
const AppExecFwk::AbilityInfo &abilityInfo) const;
|
||||
sptr<Media::PixelMap> GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Media::PixelMap> GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Global::Resource::ResourceManager> resourceMgr) const;
|
||||
void StartingWindowHot(const std::shared_ptr<StartOptions> &startOptions, const std::shared_ptr<Want> &want,
|
||||
const AbilityRequest &abilityRequest);
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int missionId, bool isLowResolution = false) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int missionId, bool isLowResolution = false) const;
|
||||
|
||||
std::unique_ptr<Media::PixelMap> GetPixelMap(int missionId, bool isLowResolution) const;
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int32_t missionId) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int32_t missionId) const;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
* @param missionId Indicates this mission id.
|
||||
* @return Returns PixelMap of snapshot.
|
||||
*/
|
||||
sptr<Media::PixelMap> GetSnapshot(int missionId) const;
|
||||
std::shared_ptr<Media::PixelMap> GetSnapshot(int missionId) const;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -567,7 +567,7 @@ std::shared_ptr<Global::Resource::ResourceManager> AbilityRecord::CreateResource
|
||||
return resourceMgr;
|
||||
}
|
||||
|
||||
sptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
std::shared_ptr<Global::Resource::ResourceManager> resourceMgr) const
|
||||
{
|
||||
std::string iconPath;
|
||||
@@ -593,7 +593,7 @@ sptr<Media::PixelMap> AbilityRecord::GetPixelMap(const uint32_t windowIconId,
|
||||
return nullptr;
|
||||
}
|
||||
HILOG_DEBUG("%{public}s OUT.", __func__);
|
||||
return sptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
return std::shared_ptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
}
|
||||
|
||||
sptr<AbilityTransitionInfo> AbilityRecord::CreateAbilityTransitionInfo(
|
||||
|
||||
@@ -296,14 +296,14 @@ void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId, bool isLowReso
|
||||
}
|
||||
}
|
||||
|
||||
sptr<Media::PixelMap> MissionDataStorage::GetSnapshot(int missionId, bool isLowResolution) const
|
||||
std::shared_ptr<Media::PixelMap> MissionDataStorage::GetSnapshot(int missionId, bool isLowResolution) const
|
||||
{
|
||||
auto pixelMapPtr = GetPixelMap(missionId, isLowResolution);
|
||||
if (!pixelMapPtr) {
|
||||
HILOG_ERROR("%{public}s: GetPixelMap failed.", __func__);
|
||||
return nullptr;
|
||||
}
|
||||
return sptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
return std::shared_ptr<Media::PixelMap>(pixelMapPtr.release());
|
||||
}
|
||||
|
||||
std::unique_ptr<Media::PixelMap> MissionDataStorage::GetPixelMap(int missionId, bool isLowResolution) const
|
||||
|
||||
@@ -461,7 +461,7 @@ bool MissionInfoMgr::UpdateMissionSnapshot(int32_t missionId, const sptr<IRemote
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
sptr<Media::PixelMap> MissionInfoMgr::GetSnapshot(int32_t missionId) const
|
||||
std::shared_ptr<Media::PixelMap> MissionInfoMgr::GetSnapshot(int32_t missionId) const
|
||||
{
|
||||
HILOG_INFO("mission_list_info GetSnapshot, missionId:%{public}d", missionId);
|
||||
auto it = find_if(missionInfoList_.begin(), missionInfoList_.end(), [missionId](const InnerMissionInfo &info) {
|
||||
|
||||
@@ -140,7 +140,7 @@ bool TaskDataPersistenceMgr::SaveMissionSnapshot(int missionId, const MissionSna
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
sptr<Media::PixelMap> TaskDataPersistenceMgr::GetSnapshot(int missionId) const
|
||||
std::shared_ptr<Media::PixelMap> TaskDataPersistenceMgr::GetSnapshot(int missionId) const
|
||||
{
|
||||
if (!currentMissionDataStorage_) {
|
||||
HILOG_ERROR("snapshot: currentMissionDataStorage_ is nullptr");
|
||||
|
||||
Reference in New Issue
Block a user