File tree Expand file tree Collapse file tree 3 files changed +2
-32
lines changed
main/java/com/amplitude/android
test/kotlin/com/amplitude/android Expand file tree Collapse file tree 3 files changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,8 @@ open class Amplitude internal constructor(
6464 init {
6565 registerShutdownHook()
6666
67- if (configuration.autocapture.any { it in AutocaptureOption .REQUIRES_ACTIVITY_CALLBACKS }) {
68- with (configuration.context as Application ) {
69- registerActivityLifecycleCallbacks(activityLifecycleCallbacks)
70- }
67+ with (configuration.context as Application ) {
68+ registerActivityLifecycleCallbacks(activityLifecycleCallbacks)
7169 }
7270 }
7371
Original file line number Diff line number Diff line change @@ -58,18 +58,6 @@ enum class AutocaptureOption {
5858 FRUSTRATION_INTERACTIONS ,
5959 )
6060
61- /* *
62- * Set of autocapture options that require Android Activity lifecycle callbacks to function properly.
63- *
64- * These options need access to activity lifecycle events and therefore require the ActivityLifecycleObserver to be registered with the Application.
65- */
66- val REQUIRES_ACTIVITY_CALLBACKS =
67- setOf (
68- APP_LIFECYCLES ,
69- SCREEN_VIEWS ,
70- ELEMENT_INTERACTIONS ,
71- DEEP_LINKS ,
72- )
7361 }
7462}
7563
Original file line number Diff line number Diff line change @@ -138,22 +138,6 @@ class ConfigurationTest {
138138 Assertions .assertFalse(AutocaptureOption .SCREEN_VIEWS in configuration.autocapture)
139139 }
140140
141- @Test
142- fun autocaptureOption_requiresActivityCallbacks_containsExpectedOptions () {
143- val expectedOptions =
144- setOf (
145- AutocaptureOption .APP_LIFECYCLES ,
146- AutocaptureOption .SCREEN_VIEWS ,
147- AutocaptureOption .ELEMENT_INTERACTIONS ,
148- AutocaptureOption .DEEP_LINKS ,
149- )
150-
151- Assertions .assertEquals(expectedOptions, AutocaptureOption .REQUIRES_ACTIVITY_CALLBACKS )
152-
153- // Verify SESSIONS is NOT included (it doesn't need activity callbacks)
154- Assertions .assertFalse(AutocaptureOption .SESSIONS in AutocaptureOption .REQUIRES_ACTIVITY_CALLBACKS )
155- }
156-
157141 @Suppress(" DEPRECATION" )
158142 @Test
159143 fun configuration_defaultTracking_replaces_autocapture_entirely_configuration () {
You can’t perform that action at this time.
0 commit comments