Skip to content

Commit 1b53a94

Browse files
committed
Add additional logging
1 parent 1c756ee commit 1b53a94

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

firebase-common/src/main/java/com/google/firebase/heartbeatinfo/DefaultHeartBeatController.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import android.content.Context;
1818
import android.util.Base64;
1919
import android.util.Base64OutputStream;
20+
import android.util.Log;
2021
import androidx.annotation.NonNull;
2122
import androidx.annotation.VisibleForTesting;
2223
import androidx.core.os.UserManagerCompat;
@@ -130,6 +131,11 @@ private DefaultHeartBeatController(
130131
Executor executor,
131132
Provider<UserAgentPublisher> userAgentProvider,
132133
Context context) {
134+
Log.i(
135+
"DefHeartBeatController",
136+
String.format(
137+
"[DAYMON] Constructor called with context %s and testStorage %s",
138+
context.toString(), testStorage.toString()));
133139
storageProvider = testStorage;
134140
this.consumers = consumers;
135141
this.backgroundExecutor = executor;
@@ -139,6 +145,7 @@ private DefaultHeartBeatController(
139145

140146
public static @NonNull Component<DefaultHeartBeatController> component() {
141147
Qualified<Executor> backgroundExecutor = Qualified.qualified(Background.class, Executor.class);
148+
Log.i("DefHeartBeatController", "[DAYMON] component() called");
142149
return Component.builder(
143150
DefaultHeartBeatController.class, HeartBeatController.class, HeartBeatInfo.class)
144151
.add(Dependency.required(Context.class))
@@ -147,13 +154,15 @@ private DefaultHeartBeatController(
147154
.add(Dependency.requiredProvider(UserAgentPublisher.class))
148155
.add(Dependency.required(backgroundExecutor))
149156
.factory(
150-
c ->
151-
new DefaultHeartBeatController(
152-
c.get(Context.class),
153-
c.get(FirebaseApp.class).getPersistenceKey(),
154-
c.setOf(HeartBeatConsumer.class),
155-
c.getProvider(UserAgentPublisher.class),
156-
c.get(backgroundExecutor)))
157+
c -> {
158+
Log.i("DefHeartBeatController", "[DAYMON] Factory called");
159+
return new DefaultHeartBeatController(
160+
c.get(Context.class),
161+
c.get(FirebaseApp.class).getPersistenceKey(),
162+
c.setOf(HeartBeatConsumer.class),
163+
c.getProvider(UserAgentPublisher.class),
164+
c.get(backgroundExecutor));
165+
})
157166
.build();
158167
}
159168

0 commit comments

Comments
 (0)