Skip to content

Commit 04b866b

Browse files
restyled-commitslazarkov
authored andcommitted
Restyled by clang-format
1 parent 2926e85 commit 04b866b

File tree

4 files changed

+29
-21
lines changed

4 files changed

+29
-21
lines changed

examples/tv-app/android/java/AppImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
#include "../include/content-launcher/AppContentLauncherManager.h"
4040
#include "../include/media-playback/AppMediaPlaybackManager.h"
4141
#include "../include/target-navigator/TargetNavigatorManager.h"
42-
#include "application-launcher/ApplicationLauncherManager.h"
4342
#include "ChannelManager.h"
4443
#include "CommissionerMain.h"
4544
#include "ContentAppAttributeDelegate.h"
4645
#include "ContentAppCommandDelegate.h"
4746
#include "KeypadInputManager.h"
47+
#include "application-launcher/ApplicationLauncherManager.h"
4848
#include <app/clusters/account-login-server/account-login-delegate.h>
4949
#include <app/clusters/application-basic-server/application-basic-delegate.h>
5050
#include <app/clusters/application-launcher-server/application-launcher-delegate.h>

examples/tv-app/android/java/TVApp-JNI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
#include "TvApp-JNI.h"
20-
#include "application-launcher/ApplicationLauncherManager.h"
2120
#include "ChannelManager.h"
2221
#include "CommissionerMain.h"
2322
#include "ContentLauncherManager.h"
@@ -32,6 +31,7 @@
3231
#include "MyUserPrompter-JNI.h"
3332
#include "OnOffManager.h"
3433
#include "WakeOnLanManager.h"
34+
#include "application-launcher/ApplicationLauncherManager.h"
3535
#include "credentials/DeviceAttestationCredsProvider.h"
3636
#include <app/app-platform/ContentAppPlatform.h>
3737
#include <app/server/Dnssd.h>

examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.cpp

+21-13
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ using namespace chip::Uint8;
3636
void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint)
3737
{
3838
ChipLogProgress(Zcl, "TV Android App: ApplicationLauncher::PostClusterInit");
39-
if (endpoint > kLocalVideoPlayerEndpointId) {
39+
if (endpoint > kLocalVideoPlayerEndpointId)
40+
{
4041
ChipLogProgress(Zcl, "TV Android App: ignore setting the delegate for endpoints larger than 1");
4142
return;
4243
}
@@ -45,7 +46,8 @@ void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint)
4546

4647
void ApplicationLauncherManager::NewManager(jint endpoint, jobject manager)
4748
{
48-
if (endpoint > kLocalVideoPlayerEndpointId) {
49+
if (endpoint > kLocalVideoPlayerEndpointId)
50+
{
4951
ChipLogProgress(Zcl, "TV Android App: ignore setting the delegate for endpoints larger than 1");
5052
return;
5153
}
@@ -118,16 +120,17 @@ void ApplicationLauncherManager::HandleLaunchApp(CommandResponseHelper<LauncherR
118120

119121
{
120122
// 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()));
122124

123125
chip::UtfString jappId(env, application.applicationID);
124126

125127
// 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());
127130
VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object"));
128131

129-
jobject resp = env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mLaunchAppMethod, appObject,
130-
jByteData.jniValue());
132+
jobject resp =
133+
env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mLaunchAppMethod, appObject, jByteData.jniValue());
131134
if (env->ExceptionCheck())
132135
{
133136
ChipLogError(Zcl, "Java exception in ApplicationLauncherManager::LaunchApp");
@@ -181,7 +184,8 @@ void ApplicationLauncherManager::HandleStopApp(CommandResponseHelper<LauncherRes
181184
chip::UtfString jappId(env, application.applicationID);
182185

183186
// 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());
185189
VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object"));
186190

187191
jobject resp = env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mStopAppMethod, appObject);
@@ -238,7 +242,8 @@ void ApplicationLauncherManager::HandleHideApp(CommandResponseHelper<LauncherRes
238242
chip::UtfString jappId(env, application.applicationID);
239243

240244
// 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());
242247
VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object"));
243248

244249
jobject resp = env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mHideAppMethod, appObject);
@@ -293,24 +298,27 @@ void ApplicationLauncherManager::InitializeWithObjects(jobject managerObject)
293298
env->ExceptionClear();
294299
}
295300

296-
mLaunchAppMethod = env->GetMethodID(applicationLauncherClass, "launchApp", "(Lcom/matter/tv/server/tvapp/"
301+
mLaunchAppMethod = env->GetMethodID(applicationLauncherClass, "launchApp",
302+
"(Lcom/matter/tv/server/tvapp/"
297303
"Application;Ljava/lang/String;)Lcom/matter/tv/server/tvapp/LauncherResponse;");
298304
if (mLaunchAppMethod == nullptr)
299305
{
300306
ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'launchApp' method");
301307
env->ExceptionClear();
302308
}
303309

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;");
306313
if (mStopAppMethod == nullptr)
307314
{
308315
ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'stopApp' method");
309316
env->ExceptionClear();
310317
}
311318

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;");
314322
if (mHideAppMethod == nullptr)
315323
{
316324
ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'hideApp' method");

examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class ApplicationLauncherManager : public ApplicationLauncherDelegate
4646
void HandleHideApp(CommandResponseHelper<LauncherResponseType> & helper, const ApplicationType & application) override;
4747

4848
chip::JniGlobalReference mApplicationLauncherManagerObject;
49-
jmethodID mGetCatalogListMethod = nullptr;
50-
jmethodID mLaunchAppMethod = nullptr;
51-
jmethodID mStopAppMethod = nullptr;
52-
jmethodID mHideAppMethod = nullptr;
53-
jmethodID mCreateApplicationMethod = nullptr;
54-
jclass mApplicationClass = nullptr;
49+
jmethodID mGetCatalogListMethod = nullptr;
50+
jmethodID mLaunchAppMethod = nullptr;
51+
jmethodID mStopAppMethod = nullptr;
52+
jmethodID mHideAppMethod = nullptr;
53+
jmethodID mCreateApplicationMethod = nullptr;
54+
jclass mApplicationClass = nullptr;
5555
};

0 commit comments

Comments
 (0)