Skip to content

Commit 0841728

Browse files
committed
Merge branch 'fireperf-aqs' into td/aqs-usage
2 parents a9a36d3 + b9816ff commit 0841728

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/FirebasePerformance.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import com.google.firebase.perf.util.Timer;
4545
import com.google.firebase.remoteconfig.RemoteConfigComponent;
4646
import com.google.firebase.sessions.api.FirebaseSessionsDependencies;
47-
import com.google.firebase.sessions.api.SessionSubscriber;
4847
import java.lang.annotation.Retention;
4948
import java.lang.annotation.RetentionPolicy;
5049
import java.net.URL;
@@ -95,8 +94,6 @@ public class FirebasePerformance implements FirebasePerformanceAttributable {
9594
// once during initialization and cache it.
9695
private final ImmutableBundle mMetadataBundle;
9796

98-
private final SessionSubscriber sessionSubscriber;
99-
10097
/** Valid HttpMethods for manual network APIs */
10198
@StringDef({
10299
HttpMethod.GET,
@@ -170,8 +167,6 @@ public static FirebasePerformance getInstance() {
170167
this.mPerformanceCollectionForceEnabledState = false;
171168
this.configResolver = configResolver;
172169
this.mMetadataBundle = new ImmutableBundle(new Bundle());
173-
this.sessionSubscriber = new FirebasePerformanceSessionSubscriber(false);
174-
FirebaseSessionsDependencies.register(sessionSubscriber);
175170
return;
176171
}
177172

@@ -188,8 +183,8 @@ public static FirebasePerformance getInstance() {
188183
sessionManager.setApplicationContext(appContext);
189184

190185
mPerformanceCollectionForceEnabledState = configResolver.getIsPerformanceCollectionEnabled();
191-
sessionSubscriber = new FirebasePerformanceSessionSubscriber(isPerformanceCollectionEnabled());
192-
FirebaseSessionsDependencies.register(sessionSubscriber);
186+
FirebaseSessionsDependencies.register(
187+
new FirebasePerformanceSessionSubscriber(isPerformanceCollectionEnabled()));
193188

194189
if (logger.isLogcatEnabled() && isPerformanceCollectionEnabled()) {
195190
logger.info(
@@ -465,10 +460,4 @@ private static ImmutableBundle extractMetadata(Context appContext) {
465460
Boolean getPerformanceCollectionForceEnabledState() {
466461
return mPerformanceCollectionForceEnabledState;
467462
}
468-
469-
@NonNull
470-
@VisibleForTesting
471-
protected SessionSubscriber getSessionSubscriber() {
472-
return sessionSubscriber;
473-
}
474463
}

firebase-perf/src/main/java/com/google/firebase/perf/session/PerfSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public boolean isSessionRunningTooLong() {
128128

129129
/** Creates and returns the proto object for PerfSession object. */
130130
public com.google.firebase.perf.v1.PerfSession build() {
131+
// TODO(b/394127311): Switch to using AQS.
131132
com.google.firebase.perf.v1.PerfSession.Builder sessionMetric =
132133
com.google.firebase.perf.v1.PerfSession.newBuilder().setSessionId(aqsSessionId);
133134

firebase-perf/src/main/java/com/google/firebase/perf/session/gauges/GaugeManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public void stopCollectingGauges() {
207207
gaugeManagerDataCollectionJob.cancel(false);
208208
}
209209

210+
// TODO(b/394127311): Switch to using AQS.
210211
// Flush any data that was collected for this session one last time.
211212
@SuppressWarnings("FutureReturnValueIgnored")
212213
ScheduledFuture<?> unusedFuture =

0 commit comments

Comments
 (0)