@@ -70,43 +70,29 @@ namespace WPEFramework
70
70
ASSERT (nullptr == _hdmiCecSource);
71
71
ASSERT (0 == _connectionId);
72
72
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
- }
84
73
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" ));
91
78
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
+ }
104
91
105
- if (0 != msg.length ())
106
- {
107
- Deinitialize (service);
108
- }
109
- }
92
+ if (0 != msg.length ())
93
+ {
94
+ Deinitialize (service);
95
+ }
110
96
111
97
// On success return empty, to indicate there is no error text.
112
98
return msg;
@@ -167,18 +153,6 @@ namespace WPEFramework
167
153
_service->Unregister (&_notification);
168
154
_service->Release ();
169
155
_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
-
182
156
LOGINFO (" HdmiCecSource plugin is deactivated. Successfully deactivated HdmiCecSource Plugin" );
183
157
}
184
158
0 commit comments