fix issues

Signed-off-by: Grady <yangguangwei4@huawei.com>
Change-Id: Ibffffcfe94d4e3bb4f70c9e201109ab61aa874a8
This commit is contained in:
Grady
2022-03-22 19:46:25 +08:00
parent e5f0467610
commit 1407443fd0
3 changed files with 13 additions and 1 deletions
@@ -350,6 +350,10 @@ bool AbstractDisplayController::UpdateDisplaySize(sptr<AbstractDisplay> absDispl
void AbstractDisplayController::BindAloneScreenLocked(sptr<AbstractScreen> realAbsScreen)
{
if (realAbsScreen == nullptr) {
WLOGE("BindAloneScreenLocked failed, realAbsScreen is nullptr");
return;
}
ScreenId defaultScreenId = abstractScreenController_->GetDefaultAbstractScreenId();
if (defaultScreenId != SCREEN_ID_INVALID) {
if (defaultScreenId != realAbsScreen->dmsId_) {
@@ -390,6 +394,10 @@ void AbstractDisplayController::AddScreenToMirrorLocked(sptr<AbstractScreen> abs
void AbstractDisplayController::AddScreenToExpandLocked(sptr<AbstractScreen> absScreen)
{
if (absScreen == nullptr) {
WLOGE("AddScreenToExpandLocked failed, absScreen is nullptr");
return;
}
for (auto iter = abstractDisplayMap_.begin(); iter != abstractDisplayMap_.end(); iter++) {
sptr<AbstractDisplay> abstractDisplay = iter->second;
if (abstractDisplay->GetAbstractScreenId() == absScreen->dmsId_) {
+4
View File
@@ -182,6 +182,10 @@ DMError AbstractScreen::SetScreenColorTransform()
void AbstractScreen::FillScreenInfo(sptr<ScreenInfo> info) const
{
if (info == nullptr) {
WLOGE("FillScreenInfo failed! info is nullptr");
return;
}
info->id_ = dmsId_;
uint32_t width = 0;
uint32_t height = 0;
@@ -27,7 +27,7 @@ namespace {
int32_t SnapshotStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option)
{
WLOGFI("SnapshotStub::OnRemoteRequest code is %{public}d", code);
WLOGFI("SnapshotStub::OnRemoteRequest code is %{public}u", code);
if (data.ReadInterfaceToken() != GetDescriptor()) {
WLOGFE("InterfaceToken check failed!");
return -1;