Skip to content

Commit

Permalink
Fix 22692 (#22693)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdecenzo authored Sep 16, 2022
1 parent d668dc2 commit 6df6e98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/app-platform/ContentAppPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void ContentAppPlatform::SetCurrentApp(ContentApp * app)

bool ContentAppPlatform::IsCurrentApp(ContentApp * app)
{
if (HasCurrentApp())
if (!HasCurrentApp())
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,16 @@ bool emberAfApplicationLauncherClusterLaunchAppCallback(app::CommandHandler * co
{
ContentAppPlatform::GetInstance().SetCurrentApp(app);
}
else
{
ChipLogError(Zcl, "ApplicationLauncher target app not found");
LauncherResponseType response;
const char * buf = "data";
response.data = ByteSpan(from_const_char(buf), strlen(buf));
response.status = ApplicationLauncherStatusEnum::kAppNotAvailable;
responder.Success(response);
return true;
}
#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED

ChipLogError(Zcl, "ApplicationLauncher handling launch");
Expand Down Expand Up @@ -354,6 +364,7 @@ bool emberAfApplicationLauncherClusterStopAppCallback(app::CommandHandler * comm
if (app != nullptr)
{
ContentAppPlatform::GetInstance().UnsetIfCurrentApp(app);
app->GetApplicationBasicDelegate()->SetApplicationStatus(ApplicationStatusEnum::kStopped);
}
#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED

Expand Down

0 comments on commit 6df6e98

Please sign in to comment.