Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 033ce0a

Browse files
committed
Remove some logs
1 parent 5e20fe9 commit 033ce0a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

shell/platform/darwin/macos/framework/Source/FlutterEngine.mm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,6 @@ - (NSPasteboard*)pasteboard {
10861086
- (void)setApplicationState:(flutter::AppLifecycleState)state {
10871087
NSString* nextState =
10881088
[[NSString alloc] initWithCString:flutter::AppLifecycleStateToString(state)];
1089-
NSLog(@"Moving to state %@", nextState);
10901089
[self sendOnChannel:kFlutterLifecycleChannel
10911090
message:[nextState dataUsingEncoding:NSUTF8StringEncoding]];
10921091
}
@@ -1096,7 +1095,6 @@ - (void)setApplicationState:(flutter::AppLifecycleState)state {
10961095
* notification.
10971096
*/
10981097
- (void)handleWillBecomeActive:(NSNotification*)notification {
1099-
NSLog(@"Marked as active");
11001098
_active = YES;
11011099
if (!_visible) {
11021100
[self setApplicationState:flutter::kAppLifecycleStateHidden];
@@ -1110,7 +1108,6 @@ - (void)handleWillBecomeActive:(NSNotification*)notification {
11101108
* notification.
11111109
*/
11121110
- (void)handleWillResignActive:(NSNotification*)notification {
1113-
NSLog(@"Marked as inactive");
11141111
_active = NO;
11151112
if (!_visible) {
11161113
[self setApplicationState:flutter::kAppLifecycleStateHidden];
@@ -1126,15 +1123,13 @@ - (void)handleWillResignActive:(NSNotification*)notification {
11261123
- (void)handleDidChangeOcclusionState:(NSNotification*)notification API_AVAILABLE(macos(10.9)) {
11271124
NSApplicationOcclusionState occlusionState = [NSApp occlusionState];
11281125
if (occlusionState & NSApplicationOcclusionStateVisible) {
1129-
NSLog(@"Marked as visible");
11301126
_visible = YES;
11311127
if (_active) {
11321128
[self setApplicationState:flutter::kAppLifecycleStateResumed];
11331129
} else {
11341130
[self setApplicationState:flutter::kAppLifecycleStateInactive];
11351131
}
11361132
} else {
1137-
NSLog(@"Marked as not visible");
11381133
_visible = NO;
11391134
[self setApplicationState:flutter::kAppLifecycleStateHidden];
11401135
}

shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
788788
EXPECT_TRUE(announced);
789789
}
790790

791-
TEST_F(FlutterEngineTest, HandleWillBecomeActive) {
791+
TEST_F(FlutterEngineTest, HandleLifecycleStates) {
792792
__block flutter::AppLifecycleState sentState;
793793
id engineMock = CreateMockFlutterEngine(nil);
794794

@@ -816,7 +816,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
816816
}));
817817

818818
__block NSApplicationOcclusionState visibility = NSApplicationOcclusionStateVisible;
819-
id mockApplication = OCMPartialMock(NSApp);
819+
id mockApplication = OCMPartialMock([NSApplication sharedApplication]);
820820
OCMStub([mockApplication occlusionState]).andDo(^(NSInvocation* invocation) {
821821
[invocation setReturnValue:&visibility];
822822
});

0 commit comments

Comments
 (0)