Skip to content

Commit 89633eb

Browse files
authored
Remove ExPlat from the project. Replace it with experimentation library from Tracks. (#22354)
* Remove ExPlat logic from the project. Replace it with `experimentation` library from Tracks. * Provide `AppLogWrapper#e` with `throwable` directly Otherwise unit tests fail because Mockito has a problem with the synthethic Kotlin method (doesn't see it) * Fix static code analysis issues * Remove `experimentation` from the project There are no currently running experiments, so this integration is redundant. #22354 (review)
1 parent ac7304b commit 89633eb

File tree

15 files changed

+2
-1066
lines changed

15 files changed

+2
-1066
lines changed

WordPress/src/main/java/org/wordpress/android/AppInitializer.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ import org.wordpress.android.util.analytics.AnalyticsUtils
110110
import org.wordpress.android.util.config.AppConfig
111111
import org.wordpress.android.util.config.OpenWebLinksWithJetpackFlowFeatureConfig
112112
import org.wordpress.android.util.enqueuePeriodicUploadWorkRequestForAllSites
113-
import org.wordpress.android.util.experiments.ExPlat
114113
import org.wordpress.android.util.image.ImageManager
115114
import org.wordpress.android.widgets.AppReviewManager
116115
import org.wordpress.android.workers.WordPressWorkersFactory
@@ -184,9 +183,6 @@ class AppInitializer @Inject constructor(
184183
@Inject
185184
lateinit var imageEditorFileUtils: ImageEditorFileUtils
186185

187-
@Inject
188-
lateinit var exPlat: ExPlat
189-
190186
@Inject
191187
lateinit var wordPressWorkerFactory: WordPressWorkersFactory
192188

@@ -372,8 +368,6 @@ class AppInitializer @Inject constructor(
372368
systemNotificationsTracker.checkSystemNotificationsState()
373369
ImageEditorInitializer.init(imageManager, imageEditorTracker, imageEditorFileUtils, appScope)
374370

375-
exPlat.forceRefresh()
376-
377371
initDebugCookieManager()
378372

379373
if (!initialized && BuildConfig.DEBUG && Build.VERSION.SDK_INT >= VERSION_CODES.R) {
@@ -662,9 +656,6 @@ class AppInitializer @Inject constructor(
662656
if (accountStore.hasAccessToken()) {
663657
// Make sure the Push Notification token is sent to our servers after a successful login
664658
gcmRegistrationScheduler.scheduleRegistration()
665-
666-
// Force a refresh if user has logged in. This can be removed once we start using an anonymous ID.
667-
exPlat.forceRefresh()
668659
}
669660
}
670661

@@ -727,9 +718,6 @@ class AppInitializer @Inject constructor(
727718

728719
// Clear WordPress.com account cookie cache
729720
wordPressCookieAuthenticator.clearAllCachedCookies()
730-
731-
// Clear cached assignments if user has logged out. This can be removed once we start using an anonymous ID.
732-
exPlat.clear()
733721
}
734722

735723
/*
@@ -934,11 +922,6 @@ class AppInitializer @Inject constructor(
934922

935923
// Let's migrate the old editor preference if available in AppPrefs to the remote backend
936924
SiteUtils.migrateAppWideMobileEditorPreferenceToRemote(accountStore, siteStore, dispatcher)
937-
if (!firstActivityResumed) {
938-
// Since we're force refreshing on app startup, we don't need to try refreshing again when starting
939-
// our first Activity.
940-
exPlat.refreshIfNeeded()
941-
}
942925
if (firstActivityResumed) {
943926
deferredInit()
944927
}

WordPress/src/main/java/org/wordpress/android/modules/ExperimentModule.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

WordPress/src/main/java/org/wordpress/android/util/experiments/ExPlat.kt

Lines changed: 0 additions & 100 deletions
This file was deleted.

WordPress/src/main/java/org/wordpress/android/util/experiments/ExampleExperiment.kt

Lines changed: 0 additions & 11 deletions
This file was deleted.

WordPress/src/main/java/org/wordpress/android/util/experiments/Experiment.kt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)