Loading core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -480,8 +480,19 @@ public class PerfettoProtoLogImpl extends IProtoLogClient.Stub implements IProto String messageString; if (mViewerConfigReader == null) { messageString = message.getMessage(); if (messageString == null) { Log.e(LOG_TAG, "Failed to decode message for logcat. " + "Message not available without ViewerConfig to decode the hash."); } } else { messageString = message.getMessage(mViewerConfigReader); if (messageString == null) { Log.e(LOG_TAG, "Failed to decode message for logcat. " + "Message hash either not available in viewerConfig file or " + "not loaded into memory from file before decoding."); } } if (messageString == null) { Loading core/java/com/android/internal/protolog/ProtoLogImpl.java +9 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.internal.protolog.common.ProtoLogToolInjected.Value.LO import static com.android.internal.protolog.common.ProtoLogToolInjected.Value.VIEWER_CONFIG_PATH; import android.annotation.Nullable; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.common.IProtoLog; Loading @@ -37,6 +38,8 @@ import java.util.TreeMap; * A service for the ProtoLog logging system. */ public class ProtoLogImpl { private static final String LOG_TAG = "ProtoLogImpl"; private static IProtoLog sServiceInstance = null; @ProtoLogToolInjected(VIEWER_CONFIG_PATH) Loading Loading @@ -97,6 +100,9 @@ public class ProtoLogImpl { */ public static synchronized IProtoLog getSingleInstance() { if (sServiceInstance == null) { Log.i(LOG_TAG, "Setting up " + ProtoLogImpl.class.getSimpleName() + " with " + "viewerConfigPath = " + sViewerConfigPath); final var groups = sLogGroups.values().toArray(new IProtoLogGroup[0]); if (android.tracing.Flags.perfettoProtologTracing()) { Loading @@ -105,6 +111,9 @@ public class ProtoLogImpl { // TODO(b/353530422): Remove - temporary fix to unblock b/352290057 // In some tests the viewer config file might not exist in which we don't // want to provide config path to the user Log.w(LOG_TAG, "Failed to find viewerConfigFile when setting up " + ProtoLogImpl.class.getSimpleName() + ". " + "Setting up without a viewer config instead..."); sServiceInstance = new PerfettoProtoLogImpl(sCacheUpdater, groups); } else { sServiceInstance = Loading Loading
core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -480,8 +480,19 @@ public class PerfettoProtoLogImpl extends IProtoLogClient.Stub implements IProto String messageString; if (mViewerConfigReader == null) { messageString = message.getMessage(); if (messageString == null) { Log.e(LOG_TAG, "Failed to decode message for logcat. " + "Message not available without ViewerConfig to decode the hash."); } } else { messageString = message.getMessage(mViewerConfigReader); if (messageString == null) { Log.e(LOG_TAG, "Failed to decode message for logcat. " + "Message hash either not available in viewerConfig file or " + "not loaded into memory from file before decoding."); } } if (messageString == null) { Loading
core/java/com/android/internal/protolog/ProtoLogImpl.java +9 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.internal.protolog.common.ProtoLogToolInjected.Value.LO import static com.android.internal.protolog.common.ProtoLogToolInjected.Value.VIEWER_CONFIG_PATH; import android.annotation.Nullable; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.common.IProtoLog; Loading @@ -37,6 +38,8 @@ import java.util.TreeMap; * A service for the ProtoLog logging system. */ public class ProtoLogImpl { private static final String LOG_TAG = "ProtoLogImpl"; private static IProtoLog sServiceInstance = null; @ProtoLogToolInjected(VIEWER_CONFIG_PATH) Loading Loading @@ -97,6 +100,9 @@ public class ProtoLogImpl { */ public static synchronized IProtoLog getSingleInstance() { if (sServiceInstance == null) { Log.i(LOG_TAG, "Setting up " + ProtoLogImpl.class.getSimpleName() + " with " + "viewerConfigPath = " + sViewerConfigPath); final var groups = sLogGroups.values().toArray(new IProtoLogGroup[0]); if (android.tracing.Flags.perfettoProtologTracing()) { Loading @@ -105,6 +111,9 @@ public class ProtoLogImpl { // TODO(b/353530422): Remove - temporary fix to unblock b/352290057 // In some tests the viewer config file might not exist in which we don't // want to provide config path to the user Log.w(LOG_TAG, "Failed to find viewerConfigFile when setting up " + ProtoLogImpl.class.getSimpleName() + ". " + "Setting up without a viewer config instead..."); sServiceInstance = new PerfettoProtoLogImpl(sCacheUpdater, groups); } else { sServiceInstance = Loading