Skip to content

Commit

Permalink
Merge pull request #20630 from wordpress-mobile/fix/appinitialiserdet…
Browse files Browse the repository at this point in the history
…ektissue

Fixes LongMethod detekt issue in AppInitializer.init method
  • Loading branch information
Antonis Lilis authored Apr 12, 2024
2 parents 0f6f547 + 5f98281 commit d74131a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions WordPress/src/main/java/org/wordpress/android/AppInitializer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,7 @@ class AppInitializer @Inject constructor(

exPlat.forceRefresh()

if (buildConfig.isDebugSettingsEnabled()) {
debugCookieManager = DebugCookieManager(application, cookieManager, buildConfig)
debugCookieManager.sync()
}
initDebugCookieManager()

if (!initialized && BuildConfig.DEBUG && Build.VERSION.SDK_INT >= VERSION_CODES.R) {
initAppOpsManager()
Expand All @@ -381,6 +378,13 @@ class AppInitializer @Inject constructor(
initialized = true
}

private fun initDebugCookieManager() {
if (buildConfig.isDebugSettingsEnabled()) {
debugCookieManager = DebugCookieManager(application, cookieManager, buildConfig)
debugCookieManager.sync()
}
}

/**
* Data access auditing
* @link https://developer.android.com/guide/topics/data/audit-access
Expand Down

0 comments on commit d74131a

Please sign in to comment.