Skip to content

Commit

Permalink
remove _handleAttributeReport convenience method; make `fromSubscri…
Browse files Browse the repository at this point in the history
…ption` explicit for remaining callsites
  • Loading branch information
kiel-apple committed May 16, 2024
1 parent 1f3d9bf commit 76a6f5f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1171,11 +1171,6 @@ - (void)_handleAttributeReport:(NSArray<NSDictionary<NSString *, id> *> *)attrib
[self _reportAttributes:[self _getAttributesToReportWithReportedValues:attributeReport fromSubscription:isFromSubscription]];
}

- (void)_handleAttributeReport:(NSArray<NSDictionary<NSString *, id> *> *)attributeReport
{
[self _handleAttributeReport:attributeReport fromSubscription:NO];
}

#ifdef DEBUG
- (void)unitTestInjectEventReport:(NSArray<NSDictionary<NSString *, id> *> *)eventReport
{
Expand All @@ -1188,7 +1183,7 @@ - (void)unitTestInjectAttributeReport:(NSArray<NSDictionary<NSString *, id> *> *
{
dispatch_async(self.queue, ^{
[self _handleReportBegin];
[self _handleAttributeReport:attributeReport];
[self _handleAttributeReport:attributeReport fromSubscription:NO];
[self _handleReportEnd];
});
}
Expand Down Expand Up @@ -1972,7 +1967,7 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath)
// Since the format is the same data-value dictionary, this looks like an
// attribute report
MTR_LOG_INFO("Read attribute work item [%llu] result: %@ [0x%016llX:%@:0x%llX:0x%llX]", workItemID, values, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue);
[self _handleAttributeReport:values];
[self _handleAttributeReport:values fromSubscription:NO];
}

// TODO: better retry logic
Expand Down

0 comments on commit 76a6f5f

Please sign in to comment.