@@ -275,8 +275,8 @@ public static FirebaseApp initializeApp(
275
275
* @param options represents the global {@link FirebaseOptions}
276
276
* @param name unique name for the app. It is an error to initialize an app with an already
277
277
* existing name. Starting and ending whitespace characters in the name are ignored (trimmed).
278
- * @throws IllegalStateException if an app with the same name has already been initialized.
279
278
* @return an instance of {@link FirebaseApp}
279
+ * @throws IllegalStateException if an app with the same name has already been initialized.
280
280
*/
281
281
@ NonNull
282
282
public static FirebaseApp initializeApp (
@@ -395,8 +395,8 @@ public void setDataCollectionDefaultEnabled(Boolean enabled) {
395
395
* <p>Note: this value is respected by all SDKs unless overridden by the developer via SDK
396
396
* specific mechanisms.
397
397
*
398
- * @deprecated Use {@link #setDataCollectionDefaultEnabled(Boolean)} instead.
399
398
* @hide
399
+ * @deprecated Use {@link #setDataCollectionDefaultEnabled(Boolean)} instead.
400
400
*/
401
401
@ KeepForSdk
402
402
@ Deprecated
@@ -467,8 +467,8 @@ private void notifyBackgroundStateChangeListeners(boolean background) {
467
467
* <p>If automatic resource management is enabled and the app is in the background a callback is
468
468
* triggered immediately.
469
469
*
470
- * @see BackgroundStateChangeListener
471
470
* @hide
471
+ * @see BackgroundStateChangeListener
472
472
*/
473
473
@ KeepForSdk
474
474
public void addBackgroundStateChangeListener (BackgroundStateChangeListener listener ) {
@@ -572,9 +572,14 @@ private static List<String> getAllAppNames() {
572
572
private void initializeAllApis () {
573
573
boolean inDirectBoot = !UserManagerCompat .isUserUnlocked (applicationContext );
574
574
if (inDirectBoot ) {
575
+ Log .i (
576
+ LOG_TAG ,
577
+ "Device in Direct Boot Mode: postponing initialization of Firebase APIs for app "
578
+ + getName ());
575
579
// Ensure that all APIs are initialized once the user unlocks the phone.
576
580
UserUnlockReceiver .ensureReceiverRegistered (applicationContext );
577
581
} else {
582
+ Log .i (LOG_TAG , "Device unlocked: initializing all Firebase APIs for app " + getName ());
578
583
componentRuntime .initializeEagerComponents (isDefaultApp ());
579
584
}
580
585
}
@@ -686,6 +691,7 @@ public void onBackgroundStateChanged(boolean background) {
686
691
}
687
692
688
693
private static class UiExecutor implements Executor {
694
+
689
695
private static final Handler HANDLER = new Handler (Looper .getMainLooper ());
690
696
691
697
@ Override
0 commit comments