Skip to content

Commit 5986c99

Browse files
mrobertejasd
authored andcommitted
Make the AQS Test App behave more typically for Perf start up (#7158)
This changes the main activity to be on the default process, allowing the more typical FirebaseInitProvider initialization of Firebase. The other processes will still initialize manually
1 parent 0933120 commit 5986c99

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

firebase-sessions/test-app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
android:exported="true"
2929
android:label="@string/app_name"
3030
android:name=".MainActivity"
31-
android:process=":main"
3231
android:theme="@style/Theme.Widget_test_app.NoActionBar">
3332
<intent-filter>
3433
<action android:name="android.intent.action.MAIN" />

firebase-sessions/test-app/src/main/kotlin/com/google/firebase/testing/sessions/TestApplication.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ class TestApplication : MultiDexApplication() {
3737
override fun onCreate() {
3838
super.onCreate()
3939
Log.i(TAG, "TestApplication created on process: $myProcessName")
40-
FirebaseApp.initializeApp(this)
40+
41+
// Initialize firebase for all processes except the default process
42+
// The default process will get initialized automatically by FirebaseInitProvider
43+
if (myProcessName != packageName) {
44+
FirebaseApp.initializeApp(this)
45+
}
4146

4247
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
4348
registerReceiver(

0 commit comments

Comments
 (0)