File tree 3 files changed +27
-2
lines changed
firebase-common/src/main/java/com/google/firebase
health-metrics/benchmark/template/app/src/main/java/com/google/firebase 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ public boolean isDefaultApp() {
472
472
/** @hide */
473
473
@ VisibleForTesting
474
474
@ RestrictTo (Scope .TESTS )
475
- public void initializeAllComponents () {
475
+ void initializeAllComponents () {
476
476
componentRuntime .initializeAllComponentsForTests ();
477
477
}
478
478
Original file line number Diff line number Diff line change
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+
16
+ package com.google.firebase
17
+
18
+ import com.google.firebase.FirebaseApp
19
+
20
+ internal fun initializeAllComponentsForBenchmark (app : FirebaseApp ) {
21
+ app.initializeAllComponents()
22
+ }
23
+
Original file line number Diff line number Diff line change @@ -17,12 +17,14 @@ package com.google.firebase.benchmark
17
17
import androidx.appcompat.app.AppCompatActivity
18
18
import android.os.Bundle
19
19
import com.google.firebase.FirebaseApp
20
+ import com.google.firebase.initializeAllComponentsForBenchmark
20
21
21
22
class MainActivity : AppCompatActivity () {
22
23
override fun onCreate (savedInstanceState : Bundle ? ) {
23
24
super .onCreate(savedInstanceState)
24
25
setContentView(R .layout.activity_main)
25
26
26
- FirebaseApp .getInstance().initializeAllComponents()
27
+ val app = FirebaseApp .getInstance()
28
+ initializeAllComponentsForBenchmark(app)
27
29
}
28
30
}
You can’t perform that action at this time.
0 commit comments