@@ -36,7 +36,8 @@ using namespace chip::Uint8;
36
36
void emberAfApplicationLauncherClusterInitCallback (chip::EndpointId endpoint)
37
37
{
38
38
ChipLogProgress (Zcl, " TV Android App: ApplicationLauncher::PostClusterInit" );
39
- if (endpoint > kLocalVideoPlayerEndpointId ) {
39
+ if (endpoint > kLocalVideoPlayerEndpointId )
40
+ {
40
41
ChipLogProgress (Zcl, " TV Android App: ignore setting the delegate for endpoints larger than 1" );
41
42
return ;
42
43
}
@@ -45,7 +46,8 @@ void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint)
45
46
46
47
void ApplicationLauncherManager::NewManager (jint endpoint, jobject manager)
47
48
{
48
- if (endpoint > kLocalVideoPlayerEndpointId ) {
49
+ if (endpoint > kLocalVideoPlayerEndpointId )
50
+ {
49
51
ChipLogProgress (Zcl, " TV Android App: ignore setting the delegate for endpoints larger than 1" );
50
52
return ;
51
53
}
@@ -118,16 +120,17 @@ void ApplicationLauncherManager::HandleLaunchApp(CommandResponseHelper<LauncherR
118
120
119
121
{
120
122
// UtfString accepts const char * data
121
- chip::UtfString jByteData (env, reinterpret_cast <const char *>(data.data ()));
123
+ chip::UtfString jByteData (env, reinterpret_cast <const char *>(data.data ()));
122
124
123
125
chip::UtfString jappId (env, application.applicationID );
124
126
125
127
// Create an instance of Application
126
- jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod , static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
128
+ jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod ,
129
+ static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
127
130
VerifyOrReturn (appObject != nullptr , ChipLogError (Zcl, " Failed to create Application object" ));
128
131
129
- jobject resp = env-> CallObjectMethod ( mApplicationLauncherManagerObject . ObjectRef (), mLaunchAppMethod , appObject,
130
- jByteData.jniValue ());
132
+ jobject resp =
133
+ env-> CallObjectMethod ( mApplicationLauncherManagerObject . ObjectRef (), mLaunchAppMethod , appObject, jByteData.jniValue ());
131
134
if (env->ExceptionCheck ())
132
135
{
133
136
ChipLogError (Zcl, " Java exception in ApplicationLauncherManager::LaunchApp" );
@@ -181,7 +184,8 @@ void ApplicationLauncherManager::HandleStopApp(CommandResponseHelper<LauncherRes
181
184
chip::UtfString jappId (env, application.applicationID );
182
185
183
186
// Create an instance of Application
184
- jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod , static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
187
+ jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod ,
188
+ static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
185
189
VerifyOrReturn (appObject != nullptr , ChipLogError (Zcl, " Failed to create Application object" ));
186
190
187
191
jobject resp = env->CallObjectMethod (mApplicationLauncherManagerObject .ObjectRef (), mStopAppMethod , appObject);
@@ -238,7 +242,8 @@ void ApplicationLauncherManager::HandleHideApp(CommandResponseHelper<LauncherRes
238
242
chip::UtfString jappId (env, application.applicationID );
239
243
240
244
// Create an instance of Application
241
- jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod , static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
245
+ jobject appObject = env->NewObject (mApplicationClass , mCreateApplicationMethod ,
246
+ static_cast <jint>(application.catalogVendorID ), jappId.jniValue ());
242
247
VerifyOrReturn (appObject != nullptr , ChipLogError (Zcl, " Failed to create Application object" ));
243
248
244
249
jobject resp = env->CallObjectMethod (mApplicationLauncherManagerObject .ObjectRef (), mHideAppMethod , appObject);
@@ -293,24 +298,27 @@ void ApplicationLauncherManager::InitializeWithObjects(jobject managerObject)
293
298
env->ExceptionClear ();
294
299
}
295
300
296
- mLaunchAppMethod = env->GetMethodID (applicationLauncherClass, " launchApp" , " (Lcom/matter/tv/server/tvapp/"
301
+ mLaunchAppMethod = env->GetMethodID (applicationLauncherClass, " launchApp" ,
302
+ " (Lcom/matter/tv/server/tvapp/"
297
303
" Application;Ljava/lang/String;)Lcom/matter/tv/server/tvapp/LauncherResponse;" );
298
304
if (mLaunchAppMethod == nullptr )
299
305
{
300
306
ChipLogError (Zcl, " Failed to access ApplicationLauncherManager 'launchApp' method" );
301
307
env->ExceptionClear ();
302
308
}
303
309
304
- mStopAppMethod = env->GetMethodID (applicationLauncherClass, " stopApp" , " (Lcom/matter/tv/server/tvapp/"
305
- " Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;" );
310
+ mStopAppMethod = env->GetMethodID (applicationLauncherClass, " stopApp" ,
311
+ " (Lcom/matter/tv/server/tvapp/"
312
+ " Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;" );
306
313
if (mStopAppMethod == nullptr )
307
314
{
308
315
ChipLogError (Zcl, " Failed to access ApplicationLauncherManager 'stopApp' method" );
309
316
env->ExceptionClear ();
310
317
}
311
318
312
- mHideAppMethod = env->GetMethodID (applicationLauncherClass, " hideApp" , " (Lcom/matter/tv/server/tvapp/"
313
- " Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;" );
319
+ mHideAppMethod = env->GetMethodID (applicationLauncherClass, " hideApp" ,
320
+ " (Lcom/matter/tv/server/tvapp/"
321
+ " Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;" );
314
322
if (mHideAppMethod == nullptr )
315
323
{
316
324
ChipLogError (Zcl, " Failed to access ApplicationLauncherManager 'hideApp' method" );
0 commit comments