3636
3737/** Session manager to generate sessionIDs and broadcast to the application. */ 
3838@ Keep  // Needed because of b/117526359. 
39- public  class  SessionManager  extends   AppStateUpdateHandler   {
39+ public  class  SessionManager  {
4040
4141  @ SuppressLint ("StaticFieldLeak" )
4242  private  static  final  SessionManager  instance  = new  SessionManager ();
@@ -74,7 +74,6 @@ public SessionManager(
7474    this .gaugeManager  = gaugeManager ;
7575    this .perfSession  = perfSession ;
7676    this .appStateMonitor  = appStateMonitor ;
77-     registerForAppState ();
7877  }
7978
8079  /** 
@@ -99,34 +98,6 @@ public void setApplicationContext(final Context appContext) {
9998            });
10099  }
101100
102- //  @Override 
103- //  public void onUpdateAppState(ApplicationProcessState newAppState) { 
104- //    super.onUpdateAppState(newAppState); 
105- // 
106- //    if (appStateMonitor.isColdStart()) { 
107- //      // We want the Session to remain unchanged if this is a cold start of the app since we already 
108- //      // update the PerfSession in FirebasePerfProvider#onAttachInfo(). 
109- //      return; 
110- //    } 
111- // 
112- //    if (newAppState == ApplicationProcessState.FOREGROUND) { 
113- //      // A new foregrounding of app will force a new sessionID generation. 
114- //      PerfSession session = PerfSession.createWithId(UUID.randomUUID().toString()); 
115- //      updatePerfSession(session); 
116- //    } else { 
117- //      // If the session is running for too long, generate a new session and collect gauges as 
118- //      // necessary. 
119- //      if (perfSession.isSessionRunningTooLong()) { 
120- //        PerfSession session = PerfSession.createWithId(UUID.randomUUID().toString()); 
121- //        updatePerfSession(session); 
122- //      } else { 
123- //        // For any other state change of the application, modify gauge collection state as 
124- //        // necessary. 
125- //        startOrStopCollectingGauges(newAppState); 
126- //      } 
127- //    } 
128- //  } 
129- 
130101  /** 
131102   * Checks if the current {@link PerfSession} is expired/timed out. If so, stop collecting gauges. 
132103   * 
0 commit comments