From f3a9fe9df28b2008e8d0f6b2cb70ef6f3c73404b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Nov 2024 15:25:24 -0400 Subject: [PATCH] Remove unused checkIsRunning on MTRDeviceController. (#36337) Only MTRDeviceController_Concrete needs to do checkIsRunning at this point, and it implements that itself. --- .../Framework/CHIP/MTRDeviceController.mm | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index b5530e24117c17..5cee77cb663bb8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -57,9 +57,6 @@ #import -// 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"; @@ -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.