Skip to content

Commit 003779b

Browse files
authored
Enable UI load traces if remote config not specified (#2089)
## Goal Enabled UI load tracing if the remote config is not specified. ## Testing Updated test to reflect new default
2 parents 79273f6 + d048e1e commit 003779b

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/config/behavior/AutoDataCaptureBehaviorImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AutoDataCaptureBehaviorImpl(
1515

1616
private companion object {
1717
const val THERMAL_STATUS_ENABLED_DEFAULT = true
18-
const val UI_LOAD_REMOTE_ENABLED_DEFAULT = false
18+
const val UI_LOAD_REMOTE_ENABLED_DEFAULT = true
1919
}
2020

2121
override val local = local.enabledFeatures

embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/config/behavior/AutoDataCaptureBehaviorImplTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ internal class AutoDataCaptureBehaviorImplTest {
3535
assertFalse(isNativeCrashCaptureEnabled())
3636
assertTrue(isDiskUsageCaptureEnabled())
3737
assertTrue(isThermalStatusCaptureEnabled())
38-
assertFalse(isUiLoadTracingEnabled())
39-
assertFalse(isUiLoadTracingTraceAll())
38+
assertTrue(isUiLoadTracingEnabled())
39+
assertTrue(isUiLoadTracingTraceAll())
4040
assertTrue(isThermalStatusCaptureEnabled())
4141
assertFalse(isEndStartupWithAppReadyEnabled())
4242
}

embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/injection/DataCaptureServiceModuleImplTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ internal class DataCaptureServiceModuleImplTest {
2929
assertNotNull(module.appStartupDataCollector)
3030
assertNotNull(module.pushNotificationService)
3131
assertNotNull(module.startupService)
32-
assertNull(module.activityLoadEventEmitter)
33-
assertNull(module.uiLoadDataListener)
32+
assertNotNull(module.activityLoadEventEmitter)
33+
assertNotNull(module.uiLoadDataListener)
3434
}
3535

3636
@Test

embrace-android-sdk/src/integrationTest/kotlin/io/embrace/android/embracesdk/testcases/features/UiLoadTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ internal class UiLoadTest {
4040

4141
@Config(sdk = [Build.VERSION_CODES.LOLLIPOP])
4242
@Test
43-
fun `activity open does not create a trace by default`() {
43+
fun `activity open create a trace by default`() {
4444
testRule.runTest(
4545
instrumentedConfig = FakeInstrumentedConfig(
4646
enabledFeatures = FakeEnabledFeatureConfig(bgActivityCapture = true),
@@ -50,7 +50,7 @@ internal class UiLoadTest {
5050
simulateOpeningActivities()
5151
},
5252
assertAction = {
53-
assertTrue(getSingleSessionEnvelope().findSpansOfType(EmbType.Performance.UiLoad).isEmpty())
53+
assertEquals(1, getSingleSessionEnvelope().findSpansOfType(EmbType.Performance.UiLoad).size)
5454
}
5555
)
5656
}

0 commit comments

Comments
 (0)