Loading telecomm/java/android/telecom/ConnectionService.java +459 −111 File changed.Preview size limit exceeded, changes collapsed. Show changes telecomm/java/android/telecom/Log.java +8 −4 Original line number Diff line number Diff line Loading @@ -184,6 +184,10 @@ public class Log { getSessionManager().startSession(shortMethodName, null); } public static void startSession(Session.Info info, String shortMethodName) { getSessionManager().startSession(info, shortMethodName, null); } public static void startSession(String shortMethodName, String callerIdentification) { getSessionManager().startSession(shortMethodName, callerIdentification); } Loading @@ -193,14 +197,14 @@ public class Log { getSessionManager().startSession(info, shortMethodName, callerIdentification); } public static void startExternalSession(Session.Info sessionInfo, String shortMethodName) { getSessionManager().startExternalSession(sessionInfo, shortMethodName); } public static Session createSubsession() { return getSessionManager().createSubsession(); } public static Session.Info getExternalSession() { return getSessionManager().getExternalSession(); } public static void cancelSubsession(Session subsession) { getSessionManager().cancelSubsession(subsession); } Loading telecomm/java/android/telecom/Logging/Session.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package android.telecom.Logging; /** * {@hide} */ parcelable Session.Info; No newline at end of file telecomm/java/android/telecom/Logging/Session.java +9 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,15 @@ public class Session { parentSession.getFullMethodPath(sb); sb.append(SUBSESSION_SEPARATION_CHAR); } // Encapsulate the external session's method name so it is obvious what part of the session // is external. if (isExternal()) { sb.append("("); sb.append(mShortMethodName); sb.append(")"); } else { sb.append(mShortMethodName); } if(isSessionStarted) { // Cache this value so that we do not have to do this work next time! Loading telecomm/java/android/telecom/Logging/SessionManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,23 @@ public class SessionManager { return newSubsession; } /** * Retrieve the information of the currently active Session. This information is parcelable and * is used to create an external Session ({@link #startExternalSession(Session.Info, String)}). * If there is no Session active, this method will return null. */ public synchronized Session.Info getExternalSession() { int threadId = getCallingThreadId(); Session threadSession = mSessionMapper.get(threadId); if (threadSession == null) { Log.d(LOGGING_TAG, "Log.getExternalSession was called with no session " + "active."); return null; } return threadSession.getInfo(); } /** * Cancels a subsession that had Log.createSubsession() called on it, but will never have * Log.continueSession(...) called on it due to an error. Allows the subsession to be cleaned Loading Loading
telecomm/java/android/telecom/ConnectionService.java +459 −111 File changed.Preview size limit exceeded, changes collapsed. Show changes
telecomm/java/android/telecom/Log.java +8 −4 Original line number Diff line number Diff line Loading @@ -184,6 +184,10 @@ public class Log { getSessionManager().startSession(shortMethodName, null); } public static void startSession(Session.Info info, String shortMethodName) { getSessionManager().startSession(info, shortMethodName, null); } public static void startSession(String shortMethodName, String callerIdentification) { getSessionManager().startSession(shortMethodName, callerIdentification); } Loading @@ -193,14 +197,14 @@ public class Log { getSessionManager().startSession(info, shortMethodName, callerIdentification); } public static void startExternalSession(Session.Info sessionInfo, String shortMethodName) { getSessionManager().startExternalSession(sessionInfo, shortMethodName); } public static Session createSubsession() { return getSessionManager().createSubsession(); } public static Session.Info getExternalSession() { return getSessionManager().getExternalSession(); } public static void cancelSubsession(Session subsession) { getSessionManager().cancelSubsession(subsession); } Loading
telecomm/java/android/telecom/Logging/Session.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package android.telecom.Logging; /** * {@hide} */ parcelable Session.Info; No newline at end of file
telecomm/java/android/telecom/Logging/Session.java +9 −1 Original line number Diff line number Diff line Loading @@ -281,7 +281,15 @@ public class Session { parentSession.getFullMethodPath(sb); sb.append(SUBSESSION_SEPARATION_CHAR); } // Encapsulate the external session's method name so it is obvious what part of the session // is external. if (isExternal()) { sb.append("("); sb.append(mShortMethodName); sb.append(")"); } else { sb.append(mShortMethodName); } if(isSessionStarted) { // Cache this value so that we do not have to do this work next time! Loading
telecomm/java/android/telecom/Logging/SessionManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,23 @@ public class SessionManager { return newSubsession; } /** * Retrieve the information of the currently active Session. This information is parcelable and * is used to create an external Session ({@link #startExternalSession(Session.Info, String)}). * If there is no Session active, this method will return null. */ public synchronized Session.Info getExternalSession() { int threadId = getCallingThreadId(); Session threadSession = mSessionMapper.get(threadId); if (threadSession == null) { Log.d(LOGGING_TAG, "Log.getExternalSession was called with no session " + "active."); return null; } return threadSession.getInfo(); } /** * Cancels a subsession that had Log.createSubsession() called on it, but will never have * Log.continueSession(...) called on it due to an error. Allows the subsession to be cleaned Loading