diff options
Diffstat (limited to 'tests')
7 files changed, 123 insertions, 80 deletions
diff --git a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonLandscape.kt b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonLandscape.kt index 8040610c485b..cfc818b6c0e9 100644 --- a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonLandscape.kt +++ b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonLandscape.kt @@ -31,8 +31,7 @@ import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class CloseAppBackButton3ButtonLandscape : CloseAppBackButton(NavBar.MODE_3BUTTON, Rotation.ROTATION_90) { - // TODO: Missing CUJ (b/300078127) - @ExpectedScenarios(["ENTIRE_TRACE"]) + @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) @Test override fun closeAppBackButtonTest() = super.closeAppBackButtonTest() diff --git a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonPortrait.kt b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonPortrait.kt index aacccf4e680c..6bf32a8e2083 100644 --- a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonPortrait.kt +++ b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButton3ButtonPortrait.kt @@ -31,8 +31,7 @@ import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class CloseAppBackButton3ButtonPortrait : CloseAppBackButton(NavBar.MODE_3BUTTON, Rotation.ROTATION_0) { - // TODO: Missing CUJ (b/300078127) - @ExpectedScenarios(["ENTIRE_TRACE"]) + @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) @Test override fun closeAppBackButtonTest() = super.closeAppBackButtonTest() diff --git a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavLandscape.kt b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavLandscape.kt index 74ee46093f6e..4b6ab773f15e 100644 --- a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavLandscape.kt +++ b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavLandscape.kt @@ -31,8 +31,7 @@ import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class CloseAppBackButtonGesturalNavLandscape : CloseAppBackButton(NavBar.MODE_GESTURAL, Rotation.ROTATION_90) { - // TODO: Missing CUJ (b/300078127) - @ExpectedScenarios(["ENTIRE_TRACE"]) + @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) @Test override fun closeAppBackButtonTest() = super.closeAppBackButtonTest() diff --git a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavPortrait.kt b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavPortrait.kt index 57463c33c1fa..7cc9db027e1f 100644 --- a/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavPortrait.kt +++ b/tests/FlickerTests/FlickerService/src/com/android/server/wm/flicker/service/close/flicker/CloseAppBackButtonGesturalNavPortrait.kt @@ -31,8 +31,7 @@ import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class CloseAppBackButtonGesturalNavPortrait : CloseAppBackButton(NavBar.MODE_GESTURAL, Rotation.ROTATION_0) { - // TODO: Missing CUJ (b/300078127) - @ExpectedScenarios(["ENTIRE_TRACE"]) + @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) @Test override fun closeAppBackButtonTest() = super.closeAppBackButtonTest() diff --git a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java index 05a68e9649d4..6db5f8277e52 100644 --- a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java +++ b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java @@ -798,6 +798,38 @@ public class PerfettoProtoLogImplTest { .isEqualTo("My Test Debug Log Message true"); } + @Test + public void usesDefaultLogFromLevel() throws IOException { + PerfettoTraceMonitor traceMonitor = + PerfettoTraceMonitor.newBuilder().enableProtoLog(LogLevel.WARN).build(); + try { + traceMonitor.start(); + mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, + "This message should not be logged"); + mProtoLog.log(LogLevel.WARN, TestProtoLogGroup.TEST_GROUP, + "This message should logged %d", 123); + mProtoLog.log(LogLevel.ERROR, TestProtoLogGroup.TEST_GROUP, + "This message should also be logged %d", 567); + } finally { + traceMonitor.stop(mWriter); + } + + final ResultReader reader = new ResultReader(mWriter.write(), mTraceConfig); + final ProtoLogTrace protolog = reader.readProtoLogTrace(); + + Truth.assertThat(protolog.messages).hasSize(2); + + Truth.assertThat(protolog.messages.get(0).getLevel()) + .isEqualTo(LogLevel.WARN); + Truth.assertThat(protolog.messages.get(0).getMessage()) + .isEqualTo("This message should logged 123"); + + Truth.assertThat(protolog.messages.get(1).getLevel()) + .isEqualTo(LogLevel.ERROR); + Truth.assertThat(protolog.messages.get(1).getMessage()) + .isEqualTo("This message should also be logged 567"); + } + private enum TestProtoLogGroup implements IProtoLogGroup { TEST_GROUP(true, true, false, "TEST_TAG"); diff --git a/tests/Internal/src/com/android/internal/protolog/ProtoLogCommandHandlerTest.java b/tests/Internal/src/com/android/internal/protolog/ProtoLogCommandHandlerTest.java index e3ec62d5b5a6..aba6722c0813 100644 --- a/tests/Internal/src/com/android/internal/protolog/ProtoLogCommandHandlerTest.java +++ b/tests/Internal/src/com/android/internal/protolog/ProtoLogCommandHandlerTest.java @@ -41,14 +41,14 @@ import java.io.PrintWriter; public class ProtoLogCommandHandlerTest { @Mock - ProtoLogService mProtoLogService; + ProtoLogConfigurationService mProtoLogConfigurationService; @Mock PrintWriter mPrintWriter; @Test public void printsHelpForAllAvailableCommands() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); cmdHandler.onHelp(); validateOnHelpPrinted(); @@ -57,7 +57,7 @@ public class ProtoLogCommandHandlerTest { @Test public void printsHelpIfCommandIsNull() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); cmdHandler.onCommand(null); validateOnHelpPrinted(); @@ -65,13 +65,13 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesGroupListCommand() { - Mockito.when(mProtoLogService.getGroups()) + Mockito.when(mProtoLogConfigurationService.getGroups()) .thenReturn(new String[] {"MY_TEST_GROUP", "MY_OTHER_GROUP"}); final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "groups", "list" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "groups", "list" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("MY_TEST_GROUP")); @@ -82,10 +82,10 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesIncompleteGroupsCommand() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "groups" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "groups" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("Incomplete command")); @@ -93,13 +93,14 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesGroupStatusCommand() { - Mockito.when(mProtoLogService.getGroups()).thenReturn(new String[] {"MY_GROUP"}); - Mockito.when(mProtoLogService.isLoggingToLogcat("MY_GROUP")).thenReturn(true); + Mockito.when(mProtoLogConfigurationService.getGroups()) + .thenReturn(new String[] {"MY_GROUP"}); + Mockito.when(mProtoLogConfigurationService.isLoggingToLogcat("MY_GROUP")).thenReturn(true); final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "groups", "status", "MY_GROUP" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "groups", "status", "MY_GROUP" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("MY_GROUP")); @@ -109,12 +110,12 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesGroupStatusCommandOfUnregisteredGroups() { - Mockito.when(mProtoLogService.getGroups()).thenReturn(new String[] {}); + Mockito.when(mProtoLogConfigurationService.getGroups()).thenReturn(new String[] {}); final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "groups", "status", "MY_GROUP" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "groups", "status", "MY_GROUP" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("MY_GROUP")); @@ -125,10 +126,10 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesGroupStatusCommandWithNoGroups() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "groups", "status" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "groups", "status" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("Incomplete command")); @@ -137,10 +138,10 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesIncompleteLogcatCommand() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "logcat" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat" }); Mockito.verify(mPrintWriter, times(1)) .println(contains("Incomplete command")); @@ -149,50 +150,52 @@ public class ProtoLogCommandHandlerTest { @Test public void handlesLogcatEnableCommand() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "logcat", "enable", "MY_GROUP" }); - Mockito.verify(mProtoLogService).enableProtoLogToLogcat("MY_GROUP"); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "enable", "MY_GROUP" }); + Mockito.verify(mProtoLogConfigurationService).enableProtoLogToLogcat("MY_GROUP"); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "enable", "MY_GROUP", "MY_OTHER_GROUP" }); - Mockito.verify(mProtoLogService) + Mockito.verify(mProtoLogConfigurationService) .enableProtoLogToLogcat("MY_GROUP", "MY_OTHER_GROUP"); } @Test public void handlesLogcatDisableCommand() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "logcat", "disable", "MY_GROUP" }); - Mockito.verify(mProtoLogService).disableProtoLogToLogcat("MY_GROUP"); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "disable", "MY_GROUP" }); + Mockito.verify(mProtoLogConfigurationService).disableProtoLogToLogcat("MY_GROUP"); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "disable", "MY_GROUP", "MY_OTHER_GROUP" }); - Mockito.verify(mProtoLogService) + Mockito.verify(mProtoLogConfigurationService) .disableProtoLogToLogcat("MY_GROUP", "MY_OTHER_GROUP"); } @Test public void handlesLogcatEnableCommandWithNoGroups() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "logcat", "enable" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "enable" }); Mockito.verify(mPrintWriter).println(contains("Incomplete command")); } @Test public void handlesLogcatDisableCommandWithNoGroups() { final ProtoLogCommandHandler cmdHandler = - new ProtoLogCommandHandler(mProtoLogService, mPrintWriter); + new ProtoLogCommandHandler(mProtoLogConfigurationService, mPrintWriter); - cmdHandler.exec(mProtoLogService, FileDescriptor.in, FileDescriptor.out, FileDescriptor.err, - new String[] { "logcat", "disable" }); + cmdHandler.exec(mProtoLogConfigurationService, FileDescriptor.in, FileDescriptor.out, + FileDescriptor.err, new String[] { "logcat", "disable" }); Mockito.verify(mPrintWriter).println(contains("Incomplete command")); } diff --git a/tests/Internal/src/com/android/internal/protolog/ProtoLogServiceTest.java b/tests/Internal/src/com/android/internal/protolog/ProtoLogConfigurationServiceTest.java index feac59c702ea..e1bdd777dc5f 100644 --- a/tests/Internal/src/com/android/internal/protolog/ProtoLogServiceTest.java +++ b/tests/Internal/src/com/android/internal/protolog/ProtoLogConfigurationServiceTest.java @@ -67,7 +67,7 @@ import java.util.List; */ @Presubmit @RunWith(MockitoJUnitRunner.class) -public class ProtoLogServiceTest { +public class ProtoLogConfigurationServiceTest { private static final String TEST_GROUP = "MY_TEST_GROUP"; private static final String OTHER_TEST_GROUP = "MY_OTHER_TEST_GROUP"; @@ -128,7 +128,7 @@ public class ProtoLogServiceTest { private File mViewerConfigFile; - public ProtoLogServiceTest() throws IOException { + public ProtoLogConfigurationServiceTest() throws IOException { } @Before @@ -150,10 +150,12 @@ public class ProtoLogServiceTest { @Test public void canRegisterClientWithGroupsOnly() throws RemoteException { - final ProtoLogService service = new ProtoLogService(); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(); - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, true)); + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, true)); service.registerClient(mMockClient, args); Truth.assertThat(service.isLoggingToLogcat(TEST_GROUP)).isTrue(); @@ -163,11 +165,13 @@ public class ProtoLogServiceTest { @Test public void willDumpViewerConfigOnlyOnceOnTraceStop() throws RemoteException, InvalidProtocolBufferException { - final ProtoLogService service = new ProtoLogService(); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(); - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, true)) - .setViewerConfigFile(mViewerConfigFile.getAbsolutePath()); + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, true)) + .setViewerConfigFile(mViewerConfigFile.getAbsolutePath()); service.registerClient(mMockClient, args); service.registerClient(mSecondMockClient, args); @@ -196,14 +200,15 @@ public class ProtoLogServiceTest { @Test public void willDumpViewerConfigOnLastClientDisconnected() throws RemoteException, FileNotFoundException { - final ProtoLogService.ViewerConfigFileTracer tracer = - Mockito.mock(ProtoLogService.ViewerConfigFileTracer.class); - final ProtoLogService service = new ProtoLogService(tracer); - - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig( - TEST_GROUP, true)) - .setViewerConfigFile(mViewerConfigFile.getAbsolutePath()); + final ProtoLogConfigurationService.ViewerConfigFileTracer tracer = + Mockito.mock(ProtoLogConfigurationService.ViewerConfigFileTracer.class); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(tracer); + + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, true)) + .setViewerConfigFile(mViewerConfigFile.getAbsolutePath()); service.registerClient(mMockClient, args); service.registerClient(mSecondMockClient, args); @@ -220,10 +225,11 @@ public class ProtoLogServiceTest { @Test public void sendEnableLoggingToLogcatToClient() throws RemoteException { - final var service = new ProtoLogService(); + final var service = new ProtoLogConfigurationService(); - final var args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, false)); + final var args = new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, false)); service.registerClient(mMockClient, args); Truth.assertThat(service.isLoggingToLogcat(TEST_GROUP)).isFalse(); @@ -236,10 +242,12 @@ public class ProtoLogServiceTest { @Test public void sendDisableLoggingToLogcatToClient() throws RemoteException { - final ProtoLogService service = new ProtoLogService(); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(); - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, true)); + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, true)); service.registerClient(mMockClient, args); Truth.assertThat(service.isLoggingToLogcat(TEST_GROUP)).isTrue(); @@ -252,10 +260,12 @@ public class ProtoLogServiceTest { @Test public void doNotSendLoggingToLogcatToClientWithoutRegisteredGroup() throws RemoteException { - final ProtoLogService service = new ProtoLogService(); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(); - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, false)); + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, false)); service.registerClient(mMockClient, args); Truth.assertThat(service.isLoggingToLogcat(TEST_GROUP)).isFalse(); @@ -267,14 +277,16 @@ public class ProtoLogServiceTest { @Test public void handlesToggleToLogcatBeforeClientIsRegistered() throws RemoteException { - final ProtoLogService service = new ProtoLogService(); + final ProtoLogConfigurationService service = new ProtoLogConfigurationService(); Truth.assertThat(service.getGroups()).asList().doesNotContain(TEST_GROUP); service.enableProtoLogToLogcat(TEST_GROUP); Truth.assertThat(service.isLoggingToLogcat(TEST_GROUP)).isTrue(); - final ProtoLogService.RegisterClientArgs args = new ProtoLogService.RegisterClientArgs() - .setGroups(new ProtoLogService.RegisterClientArgs.GroupConfig(TEST_GROUP, false)); + final ProtoLogConfigurationService.RegisterClientArgs args = + new ProtoLogConfigurationService.RegisterClientArgs() + .setGroups(new ProtoLogConfigurationService.RegisterClientArgs + .GroupConfig(TEST_GROUP, false)); service.registerClient(mMockClient, args); Mockito.verify(mMockClient).toggleLogcat(eq(true), |