From 10964de6a941b4c5897788288c114dfa80dfbd31 Mon Sep 17 00:00:00 2001 From: jvillasenor Date: Thu, 5 Jan 2023 14:02:18 -0800 Subject: [PATCH] Set delay action time in query response if present. --- .../commands/provider/OTAProviderDelegate.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index f77b8d668656ae..9f75427ea8f2a9 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -75,6 +75,11 @@ - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID _selectedCandidate.userConsentNeeded = _userConsentNeeded; NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); } + if (_delayedActionTime && _selectedCandidate.status.integerValue == MTROtaSoftwareUpdateProviderOTAQueryStatusBusy) { + _selectedCandidate.delayedActionTime = _delayedActionTime; + } else { + _selectedCandidate.delayedActionTime = nil; + } completion(_selectedCandidate, nil); }