mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
commit
7156922fc8
@ -652,7 +652,6 @@ sptr<Display> DisplayManager::Impl::GetDisplayById(DisplayId displayId)
|
||||
}
|
||||
}
|
||||
}
|
||||
WLOGFI("update displayId: %{public}" PRIu64" ", displayId);
|
||||
sptr<DisplayInfo> displayInfo = SingletonContainer::Get<DisplayManagerAdapter>().GetDisplayInfo(displayId);
|
||||
if (displayInfo == nullptr) {
|
||||
WLOGFW("display null id : %{public}" PRIu64" ", displayId);
|
||||
@ -824,7 +823,7 @@ void DisplayManager::AddDisplayIdFromAms(DisplayId displayId, const wptr<IRemote
|
||||
} else {
|
||||
displayIdList_.push_back(std::make_pair(abilityToken, displayId));
|
||||
}
|
||||
ShowDisplayIdList(true);
|
||||
ShowDisplayIdList(false);
|
||||
}
|
||||
|
||||
void DisplayManager::RemoveDisplayIdFromAms(const wptr<IRemoteObject>& abilityToken)
|
||||
@ -845,7 +844,7 @@ void DisplayManager::RemoveDisplayIdFromAms(const wptr<IRemoteObject>& abilityTo
|
||||
if (iter != displayIdList_.end()) {
|
||||
displayIdList_.erase(iter);
|
||||
}
|
||||
ShowDisplayIdList(true);
|
||||
ShowDisplayIdList(false);
|
||||
}
|
||||
|
||||
DisplayId DisplayManager::GetCallingAbilityDisplayId()
|
||||
@ -890,7 +889,7 @@ sptr<Display> DisplayManager::GetDefaultDisplaySync(bool isFromNapi)
|
||||
sptr<Display> display = nullptr;
|
||||
DisplayId displayId = GetCallingAbilityDisplayId();
|
||||
if (displayId != DISPLAY_ID_INVALID) {
|
||||
WLOGFI("displayId:%{public}" PRIu64, displayId);
|
||||
WLOGFD("displayId:%{public}" PRIu64, displayId);
|
||||
display = pImpl_->GetDisplayById(displayId);
|
||||
}
|
||||
if (display != nullptr) {
|
||||
|
@ -1228,10 +1228,10 @@ void ScreenSessionManager::NotifyScreenChanged(sptr<ScreenInfo> screenInfo, Scre
|
||||
lastScreenChangeEvent_ = event;
|
||||
}
|
||||
auto task = [=] {
|
||||
TLOGI(WmsLogTag::DMS, "screenId:%{public}" PRIu64"", screenInfo->GetScreenId());
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::SCREEN_EVENT_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "screenId:%{public}" PRIu64", agent size: %{public}u",
|
||||
screenInfo->GetScreenId(), static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -2694,16 +2694,15 @@ void ScreenSessionManager::NotifyDisplayChanged(sptr<DisplayInfo> displayInfo, D
|
||||
return;
|
||||
}
|
||||
auto task = [=] {
|
||||
if (event == DisplayChangeEvent::UPDATE_REFRESHRATE) {
|
||||
TLOGD(WmsLogTag::DMS, "evevt:%{public}d, displayId:%{public}" PRIu64"",
|
||||
event, displayInfo->GetDisplayId());
|
||||
} else {
|
||||
TLOGI(WmsLogTag::DMS, "evevt:%{public}d, displayId:%{public}" PRIu64"",
|
||||
event, displayInfo->GetDisplayId());
|
||||
}
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::DISPLAY_EVENT_LISTENER);
|
||||
if (event == DisplayChangeEvent::UPDATE_REFRESHRATE) {
|
||||
TLOGD(WmsLogTag::DMS, "evevt:%{public}d, displayId:%{public}" PRIu64", agent size: %{public}u",
|
||||
event, displayInfo->GetDisplayId(), static_cast<uint32_t>(agents.size()));
|
||||
} else {
|
||||
TLOGI(WmsLogTag::DMS, "evevt:%{public}d, displayId:%{public}" PRIu64", agent size: %{public}u",
|
||||
event, displayInfo->GetDisplayId(), static_cast<uint32_t>(agents.size()));
|
||||
}
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -4312,7 +4311,6 @@ std::shared_ptr<Media::PixelMap> ScreenSessionManager::GetScreenSnapshot(Display
|
||||
TLOGE(WmsLogTag::DMS, "displayInfo is nullptr!");
|
||||
continue;
|
||||
}
|
||||
TLOGI(WmsLogTag::DMS, "displayId %{public}" PRIu64"", displayInfo->GetDisplayId());
|
||||
if (displayId == displayInfo->GetDisplayId()) {
|
||||
displayNode = screenSession->GetDisplayNode();
|
||||
screenId = sessionIt.first;
|
||||
@ -4557,10 +4555,10 @@ void ScreenSessionManager::NotifyDisplayCreate(sptr<DisplayInfo> displayInfo)
|
||||
return;
|
||||
}
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::DISPLAY_EVENT_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "start, agent size: %{public}u", static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
return;
|
||||
}
|
||||
TLOGI(WmsLogTag::DMS, "start");
|
||||
for (auto& agent : agents) {
|
||||
int32_t agentPid = dmAgentContainer_.GetAgentPid(agent);
|
||||
if (!IsFreezed(agentPid, DisplayManagerAgentType::DISPLAY_EVENT_LISTENER)) {
|
||||
@ -4572,10 +4570,10 @@ void ScreenSessionManager::NotifyDisplayCreate(sptr<DisplayInfo> displayInfo)
|
||||
void ScreenSessionManager::NotifyDisplayDestroy(DisplayId displayId)
|
||||
{
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::DISPLAY_EVENT_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "agent size: %{public}u", static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
return;
|
||||
}
|
||||
TLOGI(WmsLogTag::DMS, "start");
|
||||
for (auto& agent : agents) {
|
||||
int32_t agentPid = dmAgentContainer_.GetAgentPid(agent);
|
||||
if (!IsFreezed(agentPid, DisplayManagerAgentType::DISPLAY_EVENT_LISTENER)) {
|
||||
@ -5256,7 +5254,6 @@ uint32_t ScreenSessionManager::GetCurvedCompressionArea()
|
||||
|
||||
void ScreenSessionManager::NotifyFoldStatusChanged(FoldStatus foldStatus)
|
||||
{
|
||||
TLOGI(WmsLogTag::DMS, "foldStatus:%{public}d", foldStatus);
|
||||
sptr<ScreenSession> screenSession = GetDefaultScreenSession();
|
||||
if (screenSession != nullptr) {
|
||||
if (foldStatus == FoldStatus::FOLDED) {
|
||||
@ -5278,8 +5275,9 @@ void ScreenSessionManager::NotifyFoldStatusChanged(FoldStatus foldStatus)
|
||||
}
|
||||
}
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::FOLD_STATUS_CHANGED_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "foldStatus:%{public}d, agent size: %{public}u",
|
||||
foldStatus, static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -5315,7 +5313,6 @@ void ScreenSessionManager::NotifyCaptureStatusChanged()
|
||||
bool isCapture = IsCaptured();
|
||||
isScreenShot_ = false;
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -5330,7 +5327,6 @@ void ScreenSessionManager::NotifyDisplayChangeInfoChanged(const sptr<DisplayChan
|
||||
{
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::DISPLAY_UPDATE_LISTENER);
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "Agents is empty");
|
||||
return;
|
||||
}
|
||||
{
|
||||
@ -5347,11 +5343,11 @@ void ScreenSessionManager::NotifyDisplayChangeInfoChanged(const sptr<DisplayChan
|
||||
|
||||
void ScreenSessionManager::NotifyDisplayModeChanged(FoldDisplayMode displayMode)
|
||||
{
|
||||
TLOGI(WmsLogTag::DMS, "DisplayMode:%{public}d", displayMode);
|
||||
NotifyClientProxyUpdateFoldDisplayMode(displayMode);
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::DISPLAY_MODE_CHANGED_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "DisplayMode:%{public}d, agent size: %{public}u",
|
||||
displayMode, static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "Agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -5365,10 +5361,10 @@ void ScreenSessionManager::NotifyDisplayModeChanged(FoldDisplayMode displayMode)
|
||||
|
||||
void ScreenSessionManager::NotifyScreenMagneticStateChanged(bool isMagneticState)
|
||||
{
|
||||
TLOGI(WmsLogTag::DMS, "IsScreenMagneticState:%{public}u", static_cast<uint32_t>(isMagneticState));
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::SCREEN_MAGNETIC_STATE_CHANGED_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "IsScreenMagneticState:%{public}u, agent size: %{public}u",
|
||||
static_cast<uint32_t>(isMagneticState), static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "Agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
@ -5773,10 +5769,9 @@ int ScreenSessionManager::NotifyFoldStatusChanged(const std::string& statusParam
|
||||
|
||||
void ScreenSessionManager::NotifyAvailableAreaChanged(DMRect area)
|
||||
{
|
||||
TLOGI(WmsLogTag::DMS, "call");
|
||||
auto agents = dmAgentContainer_.GetAgentsByType(DisplayManagerAgentType::AVAILABLE_AREA_CHANGED_LISTENER);
|
||||
TLOGI(WmsLogTag::DMS, "entry, agent size: %{public}u", static_cast<uint32_t>(agents.size()));
|
||||
if (agents.empty()) {
|
||||
TLOGI(WmsLogTag::DMS, "agents is empty");
|
||||
return;
|
||||
}
|
||||
for (auto& agent : agents) {
|
||||
|
Loading…
Reference in New Issue
Block a user