Skip to content

Commit ff6eeee

Browse files
committed
reverted changes in HdmiCecSource/HdmiCecSource.cpp
1 parent e7f3075 commit ff6eeee

File tree

1 file changed

+20
-46
lines changed

1 file changed

+20
-46
lines changed

HdmiCecSource/HdmiCecSource.cpp

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -70,43 +70,29 @@ namespace WPEFramework
7070
ASSERT(nullptr == _hdmiCecSource);
7171
ASSERT(0 == _connectionId);
7272

73-
try
74-
{
75-
device::Manager::Initialize();
76-
LOGINFO("HdmiCecSource plugin device::Manager::Initialize success");
77-
}
78-
catch(const device::Exception& err)
79-
{
80-
LOGINFO("HdmiCecSource plugin device::Manager::Initialize failed");
81-
msg = "HdmiCecSource plugin Initialize failed";
82-
LOG_DEVICE_EXCEPTION0();
83-
}
8473

85-
if (0 == msg.length())
86-
{
87-
_service = service;
88-
_service->AddRef();
89-
_service->Register(&_notification);
90-
_hdmiCecSource = _service->Root<Exchange::IHdmiCecSource>(_connectionId, 5000, _T("HdmiCecSourceImplementation"));
74+
_service = service;
75+
_service->AddRef();
76+
_service->Register(&_notification);
77+
_hdmiCecSource = _service->Root<Exchange::IHdmiCecSource>(_connectionId, 5000, _T("HdmiCecSourceImplementation"));
9178

92-
if(nullptr != _hdmiCecSource)
93-
{
94-
_hdmiCecSource->Configure(service);
95-
_hdmiCecSource->Register(&_notification);
96-
Exchange::JHdmiCecSource::Register(*this, _hdmiCecSource);
97-
LOGINFO("HdmiCecSource plugin is available. Successfully activated HdmiCecSource Plugin");
98-
}
99-
else
100-
{
101-
msg = "HdmiCecSource plugin is not available";
102-
LOGINFO("HdmiCecSource plugin is not available. Failed to activate HdmiCecSource Plugin");
103-
}
79+
if(nullptr != _hdmiCecSource)
80+
{
81+
_hdmiCecSource->Configure(service);
82+
_hdmiCecSource->Register(&_notification);
83+
Exchange::JHdmiCecSource::Register(*this, _hdmiCecSource);
84+
LOGINFO("HdmiCecSource plugin is available. Successfully activated HdmiCecSource Plugin");
85+
}
86+
else
87+
{
88+
msg = "HdmiCecSource plugin is not available";
89+
LOGINFO("HdmiCecSource plugin is not available. Failed to activate HdmiCecSource Plugin");
90+
}
10491

105-
if (0 != msg.length())
106-
{
107-
Deinitialize(service);
108-
}
109-
}
92+
if (0 != msg.length())
93+
{
94+
Deinitialize(service);
95+
}
11096

11197
// On success return empty, to indicate there is no error text.
11298
return msg;
@@ -167,18 +153,6 @@ namespace WPEFramework
167153
_service->Unregister(&_notification);
168154
_service->Release();
169155
_service = nullptr;
170-
171-
try
172-
{
173-
device::Manager::DeInitialize();
174-
LOGINFO("HdmiCecSource plugin device::Manager::DeInitialize success");
175-
}
176-
catch(const device::Exception& err)
177-
{
178-
LOGINFO("HdmiCecSource plugin device::Manager::DeInitialize failed");
179-
LOG_DEVICE_EXCEPTION0();
180-
}
181-
182156
LOGINFO("HdmiCecSource plugin is deactivated. Successfully deactivated HdmiCecSource Plugin");
183157
}
184158

0 commit comments

Comments
 (0)