Skip to content

Commit

Permalink
[OTA] Remove user consent (#22661)
Browse files Browse the repository at this point in the history
- According to spec, RequestorCanConsent should be 0 if device do not support userconsent
  • Loading branch information
pankore authored and pull[bot] committed Sep 14, 2023
1 parent b178e46 commit 1033940
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions examples/platform/ameba/ota/OTAInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <app/clusters/ota-requestor/BDXDownloader.h>
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorUserConsent.h>
#include <app/clusters/ota-requestor/ExtendedOTARequestorDriver.h>
#include <platform/Ameba/AmebaOTAImageProcessor.h>

using namespace chip;
Expand All @@ -30,11 +28,9 @@ using namespace chip::DeviceLayer;
namespace {
DefaultOTARequestor gRequestorCore;
DefaultOTARequestorStorage gRequestorStorage;
ExtendedOTARequestorDriver gRequestorUser;
DefaultOTARequestorDriver gRequestorUser;
BDXDownloader gDownloader;
AmebaOTAImageProcessor gImageProcessor;
chip::ota::DefaultOTARequestorUserConsent gUserConsentProvider;
static chip::ota::UserConsentState gUserConsentState = chip::ota::UserConsentState::kGranted;
} // namespace

extern "C" void amebaQueryImageCmdHandler()
Expand All @@ -59,9 +55,4 @@ void OTAInitializer::InitOTARequestor(void)
// Connect the Downloader and Image Processor objects
gDownloader.SetImageProcessorDelegate(&gImageProcessor);
gRequestorUser.Init(&gRequestorCore, &gImageProcessor);
if (gUserConsentState != chip::ota::UserConsentState::kUnknown)
{
gUserConsentProvider.SetUserConsentState(gUserConsentState);
gRequestorUser.SetUserConsentDelegate(&gUserConsentProvider);
}
}

0 comments on commit 1033940

Please sign in to comment.