|
23 | 23 | // Register the module initializer. |
24 | 24 | FIREBASE_APP_REGISTER_CALLBACKS(remote_config, |
25 | 25 | { |
26 | | - if (app == ::firebase::App::GetInstance()) { |
27 | | - return firebase::remote_config::Initialize( |
28 | | - *app); |
29 | | - } |
| 26 | + // Nothing to do. |
30 | 27 | return kInitResultSuccess; |
31 | 28 | }, |
32 | 29 | { |
33 | | - if (app == ::firebase::App::GetInstance()) { |
34 | | - firebase::remote_config::Terminate(); |
35 | | - } |
| 30 | + // Nothing to do. |
36 | 31 | }); |
37 | 32 |
|
38 | 33 | namespace firebase { |
39 | 34 | namespace remote_config { |
40 | 35 |
|
41 | | -namespace internal { |
42 | | - |
43 | | -const char kRemoteConfigModuleName[] = "remote_config"; |
44 | | - |
45 | | -// Registers a cleanup task for this module if auto-initialization is disabled. |
46 | | -void RegisterTerminateOnDefaultAppDestroy() { |
47 | | - if (!AppCallback::GetEnabledByName(kRemoteConfigModuleName)) { |
48 | | - CleanupNotifier* cleanup_notifier = |
49 | | - CleanupNotifier::FindByOwner(App::GetInstance()); |
50 | | - assert(cleanup_notifier); |
51 | | - cleanup_notifier->RegisterObject( |
52 | | - const_cast<char*>(kRemoteConfigModuleName), [](void*) { |
53 | | - LogError( |
54 | | - "remote_config::Terminate() should be called before default app " |
55 | | - "is destroyed."); |
56 | | - if (firebase::remote_config::internal::IsInitialized()) { |
57 | | - firebase::remote_config::Terminate(); |
58 | | - } |
59 | | - }); |
60 | | - } |
61 | | -} |
62 | | - |
63 | | -// Remove the cleanup task for this module if auto-initialization is disabled. |
64 | | -void UnregisterTerminateOnDefaultAppDestroy() { |
65 | | - if (!AppCallback::GetEnabledByName(kRemoteConfigModuleName) && |
66 | | - firebase::remote_config::internal::IsInitialized()) { |
67 | | - CleanupNotifier* cleanup_notifier = |
68 | | - CleanupNotifier::FindByOwner(App::GetInstance()); |
69 | | - assert(cleanup_notifier); |
70 | | - cleanup_notifier->UnregisterObject( |
71 | | - const_cast<char*>(kRemoteConfigModuleName)); |
72 | | - } |
73 | | -} |
74 | | - |
75 | | -} // namespace internal |
76 | | - |
77 | 36 | FutureData* FutureData::s_future_data_; |
78 | 37 |
|
79 | 38 | // Create FutureData singleton. |
|
0 commit comments