Merge "Adds registerSessionListener API to Log"
This commit is contained in:
@ -199,6 +199,10 @@ public class Log {
|
|||||||
getSessionManager().endSession();
|
getSessionManager().endSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void registerSessionListener(SessionManager.ISessionListener l) {
|
||||||
|
getSessionManager().registerSessionListener(l);
|
||||||
|
}
|
||||||
|
|
||||||
public static String getSessionId() {
|
public static String getSessionId() {
|
||||||
// If the Session logger has not been initialized, then there have been no sessions logged.
|
// If the Session logger has not been initialized, then there have been no sessions logged.
|
||||||
// Don't load it now!
|
// Don't load it now!
|
||||||
|
@ -366,8 +366,6 @@ public class EventManager {
|
|||||||
// Now add a new entry
|
// Now add a new entry
|
||||||
mEventRecords.add(newRecord);
|
mEventRecords.add(newRecord);
|
||||||
mCallEventRecordMap.put(recordEntry, newRecord);
|
mCallEventRecordMap.put(recordEntry, newRecord);
|
||||||
|
|
||||||
// TODO: Add Implementation of this in Telecom for Analytics
|
|
||||||
synchronized (mSync) {
|
synchronized (mSync) {
|
||||||
for (EventListener l : mEventListeners) {
|
for (EventListener l : mEventListeners) {
|
||||||
l.eventRecordAdded(newRecord);
|
l.eventRecordAdded(newRecord);
|
||||||
|
@ -273,7 +273,6 @@ public class SessionManager {
|
|||||||
System.currentTimeMillis() - subsession.getExecutionStartTimeMilliseconds();
|
System.currentTimeMillis() - subsession.getExecutionStartTimeMilliseconds();
|
||||||
android.util.Slog.d(LOGGING_TAG, Session.END_SESSION + " (dur: " + fullSessionTimeMs
|
android.util.Slog.d(LOGGING_TAG, Session.END_SESSION + " (dur: " + fullSessionTimeMs
|
||||||
+ " ms): " + subsession.toString());
|
+ " ms): " + subsession.toString());
|
||||||
// TODO: Add analytics hook
|
|
||||||
for (ISessionListener l : mSessionListeners) {
|
for (ISessionListener l : mSessionListeners) {
|
||||||
l.sessionComplete(subsession.getShortMethodName(), fullSessionTimeMs);
|
l.sessionComplete(subsession.getShortMethodName(), fullSessionTimeMs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user