Skip to content

Commit c559a68

Browse files
authored
Fixed a bug to honor data collection flags before Firebase app was configured. (#11372)
1 parent 68b39b8 commit c559a68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

FirebasePerformance/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- [fixed] Fixed a bug to disable data collection if the data collection was disabled before Firebase application was configured.
3+
14
# 10.9.0
25
- [fixed] Fixed a memory leak when generating session events (#11027).
36

FirebasePerformance/Sources/FIRPerformance.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ - (BOOL)isDataCollectionEnabled {
8686
}
8787

8888
- (void)setDataCollectionEnabled:(BOOL)dataCollectionEnabled {
89-
BOOL performanceDataCollectionEnabled = self.dataCollectionEnabled;
90-
if (performanceDataCollectionEnabled != dataCollectionEnabled) {
91-
[[FPRConfigurations sharedInstance] setDataCollectionEnabled:dataCollectionEnabled];
92-
}
89+
[[FPRConfigurations sharedInstance] setDataCollectionEnabled:dataCollectionEnabled];
9390
}
9491

9592
- (BOOL)isInstrumentationEnabled {

0 commit comments

Comments
 (0)