Skip to content

Commit

Permalink
Remove unused checkIsRunning on MTRDeviceController. (#36337)
Browse files Browse the repository at this point in the history
Only MTRDeviceController_Concrete needs to do checkIsRunning at this point, and
it implements that itself.
  • Loading branch information
bzbarsky-apple authored Nov 1, 2024
1 parent ddd8e0b commit f3a9fe9
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@

#import <os/lock.h>

// TODO: These strings and their consumers in this file should probably go away,
// since none of them really apply to all controllers.
static NSString * const kErrorNotRunning = @"Controller is not running. Call startup first.";
static NSString * const kErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed";
static NSString * const kErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed";

Expand Down Expand Up @@ -473,25 +470,6 @@ + (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSE
return YES;
}

- (BOOL)checkIsRunning
{
return [self checkIsRunning:nil];
}

- (BOOL)checkIsRunning:(NSError * __autoreleasing *)error
{
if ([self isRunning]) {
return YES;
}

MTR_LOG_ERROR("%@: %@ Error: %s", NSStringFromClass(self.class), self, [kErrorNotRunning UTF8String]);
if (error) {
*error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
}

return NO;
}

- (void)asyncDispatchToMatterQueue:(dispatch_block_t)block errorHandler:(nullable MTRDeviceErrorHandler)errorHandler
{
// TODO: Figure out how to get callsites to have an MTRDeviceController_Concrete.
Expand Down

0 comments on commit f3a9fe9

Please sign in to comment.