Skip to content

Commit 800894c

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 5ca492f commit 800894c

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

firebase-perf/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Unreleased
22
* [fixed] Fixed an ANR on app launch. [#4831]
3+
* [changed] Updated `firebase-sessions` dependency to v3.0.0
4+
* [fixed] Fixed the issues around unifying the sessions in `firebase-sessions`
5+
and`firebase-performance`.
36

47
# 22.0.0
58
* [changed] **Breaking Change**: Updated minSdkVersion to API level 23 or higher.
@@ -442,4 +445,3 @@ updates.
442445

443446
# 16.1.0
444447
* [fixed] Fixed a `SecurityException` crash on certain devices that do not have Google Play Services on them.
445-

firebase-perf/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
#
1717

18-
version=22.0.1
18+
version=22.1.0
1919
latestReleasedVersion=22.0.0
2020
android.enableUnitTestBinaryResources=true
2121

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)