Skip to content

Commit cba57c5

Browse files
authored
Make component discovery directBootAware (#669)
Firebase itself does not initialize in direct-boot mode and only does so when the device is unlocked. While this works most of the time, there are apps that initializeApp() manually when in direct boot mode and this causes component discovery to fail(b/138578076). The change marks ComponentDiscoveryService as directBootAware so that components are able to be discovered. Whether components are able to function in direct boot mode is up to each SDK implementation and is currently provided as best effort.
1 parent 2e416b0 commit cba57c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

firebase-common/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest
33
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
45
package="com.google.firebase">
56
<!--Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds-->
67
<!--<uses-sdk android:minSdkVersion="14"/>-->
78
<application>
89

10+
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
11+
android:directBootAware="true" android:exported="false"
12+
tools:targetApi="n" />
13+
914
<provider
1015
android:name="com.google.firebase.provider.FirebaseInitProvider"
1116
android:authorities="${applicationId}.firebaseinitprovider"

0 commit comments

Comments
 (0)