Loading core/java/com/android/internal/protolog/ProtoLogConfigurationService.java +12 −15 Original line number Diff line number Diff line Loading @@ -211,8 +211,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe * want to write to the trace buffer. * @throws FileNotFoundException if the viewerConfigFilePath is invalid. */ void trace(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath) throws FileNotFoundException; void trace(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath); } @Override Loading Loading @@ -352,11 +351,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe private void onTracingInstanceFlush() { for (String fileName : mConfigFileCounts.keySet()) { try { mViewerConfigFileTracer.trace(mDataSource, fileName); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } Loading @@ -365,10 +360,16 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe } private static void dumpTransitionTraceConfig(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath) throws FileNotFoundException { final var pis = new ProtoInputStream(new FileInputStream(viewerConfigFilePath)); @NonNull String viewerConfigFilePath) { dataSource.trace(ctx -> { final ProtoInputStream pis; try { pis = new ProtoInputStream(new FileInputStream(viewerConfigFilePath)); } catch (FileNotFoundException e) { throw new RuntimeException( "Failed to load viewer config file " + viewerConfigFilePath, e); } try { final ProtoOutputStream os = ctx.newTracePacket(); Loading Loading @@ -397,11 +398,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe mConfigFileCounts.put(configFile, newCount); boolean lastProcessWithViewerConfig = newCount == 0; if (lastProcessWithViewerConfig) { try { mViewerConfigFileTracer.trace(mDataSource, configFile); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } } Loading Loading
core/java/com/android/internal/protolog/ProtoLogConfigurationService.java +12 −15 Original line number Diff line number Diff line Loading @@ -211,8 +211,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe * want to write to the trace buffer. * @throws FileNotFoundException if the viewerConfigFilePath is invalid. */ void trace(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath) throws FileNotFoundException; void trace(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath); } @Override Loading Loading @@ -352,11 +351,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe private void onTracingInstanceFlush() { for (String fileName : mConfigFileCounts.keySet()) { try { mViewerConfigFileTracer.trace(mDataSource, fileName); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } Loading @@ -365,10 +360,16 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe } private static void dumpTransitionTraceConfig(@NonNull ProtoLogDataSource dataSource, @NonNull String viewerConfigFilePath) throws FileNotFoundException { final var pis = new ProtoInputStream(new FileInputStream(viewerConfigFilePath)); @NonNull String viewerConfigFilePath) { dataSource.trace(ctx -> { final ProtoInputStream pis; try { pis = new ProtoInputStream(new FileInputStream(viewerConfigFilePath)); } catch (FileNotFoundException e) { throw new RuntimeException( "Failed to load viewer config file " + viewerConfigFilePath, e); } try { final ProtoOutputStream os = ctx.newTracePacket(); Loading Loading @@ -397,11 +398,7 @@ public final class ProtoLogConfigurationService extends IProtoLogConfigurationSe mConfigFileCounts.put(configFile, newCount); boolean lastProcessWithViewerConfig = newCount == 0; if (lastProcessWithViewerConfig) { try { mViewerConfigFileTracer.trace(mDataSource, configFile); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } } Loading