File tree Expand file tree Collapse file tree 3 files changed +7
-42
lines changed Expand file tree Collapse file tree 3 files changed +7
-42
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,13 @@ TEST_F(FirebaseAnalyticsTest, TestLogEvents) {
259
259
" spoon_welders" );
260
260
}
261
261
262
+ TEST_F (FirebaseAnalyticsTest, TestNotifyAppLifecycleChange) {
263
+ // Can't confirm that these do anything but just run them all to ensure the
264
+ // app doesn't crash.
265
+ firebase::analytics::NotifyAppLifecycleChange (firebase::analytics::kUnknown );
266
+ firebase::analytics::NotifyAppLifecycleChange (firebase::analytics::kTermination );
267
+ }
268
+
262
269
TEST_F (FirebaseAnalyticsTest, TestLogEventWithMultipleParameters) {
263
270
const firebase::analytics::Parameter kLevelUpParameters [] = {
264
271
firebase::analytics::Parameter (firebase::analytics::kParameterLevel , 5 ),
Original file line number Diff line number Diff line change @@ -392,39 +392,6 @@ void NotifyAppLifecycleChange(AppLifecycleState state) {
392
392
static_cast <GoogleAnalytics_AppLifecycleState>(state));
393
393
}
394
394
395
- static void (*firebaseLogCallback)(LogLevel log_level, const char * log_message,
396
- void * callback_data) = nullptr;
397
-
398
- void SetLogCallback (LogCallback callback) {
399
- FIREBASE_ASSERT_RETURN_VOID (internal::IsInitialized ());
400
-
401
- firebaseLogCallback = callback;
402
-
403
- GoogleAnalytics_SetLogCallback (
404
- [](GoogleAnalytics_LogLevel log_level, const char * message) {
405
- if (firebaseLogCallback) {
406
- LogLevel fbLogLevel;
407
- switch (log_level) {
408
- case GoogleAnalytics_LogLevel::kDebug :
409
- fbLogLevel = LogLevel::kLogLevelDebug ;
410
- break ;
411
- case GoogleAnalytics_LogLevel::kInfo :
412
- fbLogLevel = LogLevel::kLogLevelInfo ;
413
- break ;
414
- case GoogleAnalytics_LogLevel::kWarning :
415
- fbLogLevel = LogLevel::kLogLevelWarning ;
416
- break ;
417
- case GoogleAnalytics_LogLevel::kError :
418
- fbLogLevel = LogLevel::kLogLevelError ;
419
- break ;
420
- default :
421
- fbLogLevel = LogLevel::kLogLevelInfo ;
422
- }
423
- firebaseLogCallback (fbLogLevel, message, nullptr );
424
- }
425
- });
426
- }
427
-
428
395
// Overloaded versions of LogEvent for convenience.
429
396
430
397
void LogEvent (const char * name) {
Original file line number Diff line number Diff line change 23
23
#include < string>
24
24
#include < vector>
25
25
26
- #include " app/src/log.h"
27
-
28
26
#include " firebase/app.h"
29
27
#include " firebase/future.h"
30
28
#include " firebase/internal/common.h"
@@ -585,13 +583,6 @@ enum AppLifecycleState {
585
583
586
584
void NotifyAppLifecycleChange (AppLifecycleState state);
587
585
588
- // / @brief Allows the passing of a callback to be used when the SDK logs any
589
- // / *messages regarding its behavior.The callback must be thread -
590
- // / safe.
591
- // /
592
- // / @param[in] callback The callback to use. Must be thread-safe.
593
- void SetLogCallback (LogCallback callback);
594
-
595
586
// / Get the instance ID from the analytics service.
596
587
// /
597
588
// / @note This is *not* the same ID as the ID returned by
You can’t perform that action at this time.
0 commit comments