Readability improvements in Logging
We now truncate Session method paths and IDs based on the Logging level to improve Session Logging readability in logcat. If another external session is started off of an existing external Session, the preceding histories are replaced with "..." so that the Session information is not overwhelming. Bug: 26571395 Test: Unit Tests and manual tests pass Change-Id: I9ffda3d64f1072fa6228a82a86116a5e47d18c96
This commit is contained in:
@@ -515,9 +515,12 @@ public abstract class ConnectionService extends Service {
|
||||
final boolean isUnknown = args.argi2 == 1;
|
||||
if (!mAreAccountsInitialized) {
|
||||
Log.d(this, "Enqueueing pre-init request %s", id);
|
||||
mPreInitializationConnectionRequests.add(new Runnable() {
|
||||
mPreInitializationConnectionRequests.add(
|
||||
new android.telecom.Logging.Runnable(
|
||||
SESSION_HANDLER + SESSION_CREATE_CONN + ".pICR",
|
||||
null /*lock*/) {
|
||||
@Override
|
||||
public void run() {
|
||||
public void loggedRun() {
|
||||
createConnection(
|
||||
connectionManagerPhoneAccount,
|
||||
id,
|
||||
@@ -525,7 +528,7 @@ public abstract class ConnectionService extends Service {
|
||||
isIncoming,
|
||||
isUnknown);
|
||||
}
|
||||
});
|
||||
}.prepare());
|
||||
} else {
|
||||
createConnection(
|
||||
connectionManagerPhoneAccount,
|
||||
@@ -1378,9 +1381,9 @@ public abstract class ConnectionService extends Service {
|
||||
public void onResult(
|
||||
final List<ComponentName> componentNames,
|
||||
final List<IBinder> services) {
|
||||
mHandler.post(new Runnable() {
|
||||
mHandler.post(new android.telecom.Logging.Runnable("oAA.qRCS.oR", null /*lock*/) {
|
||||
@Override
|
||||
public void run() {
|
||||
public void loggedRun() {
|
||||
for (int i = 0; i < componentNames.size() && i < services.size(); i++) {
|
||||
mRemoteConnectionManager.addConnectionService(
|
||||
componentNames.get(i),
|
||||
@@ -1389,17 +1392,17 @@ public abstract class ConnectionService extends Service {
|
||||
onAccountsInitialized();
|
||||
Log.d(this, "remote connection services found: " + services);
|
||||
}
|
||||
});
|
||||
}.prepare());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
mHandler.post(new Runnable() {
|
||||
mHandler.post(new android.telecom.Logging.Runnable("oAA.qRCS.oE", null /*lock*/) {
|
||||
@Override
|
||||
public void run() {
|
||||
public void loggedRun() {
|
||||
mAreAccountsInitialized = true;
|
||||
}
|
||||
});
|
||||
}.prepare());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user