using Config strict mode flag directly within the Application as the build meta can't be injected before super application.onCreate
This commit is contained in:
parent
3d207f93f1
commit
fe1019f29f
|
@ -40,6 +40,7 @@ import com.mapbox.mapboxsdk.Mapbox
|
|||
import com.vanniktech.emoji.EmojiManager
|
||||
import com.vanniktech.emoji.google.GoogleEmojiProvider
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import im.vector.app.config.Config
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.resources.BuildMeta
|
||||
import im.vector.app.features.analytics.VectorAnalytics
|
||||
|
@ -198,7 +199,7 @@ class VectorApplication :
|
|||
}
|
||||
|
||||
private fun enableStrictModeIfNeeded() {
|
||||
if (buildMeta.enableStrictModeLogs) {
|
||||
if (Config.ENABLE_STRICT_MODE_LOGS) {
|
||||
StrictMode.setThreadPolicy(
|
||||
StrictMode.ThreadPolicy.Builder()
|
||||
.detectAll()
|
||||
|
|
|
@ -215,7 +215,6 @@ object VectorStaticModule {
|
|||
sdkInt = Build.VERSION.SDK_INT,
|
||||
applicationId = BuildConfig.APPLICATION_ID,
|
||||
lowPrivacyLoggingEnabled = Config.LOW_PRIVACY_LOG_ENABLE,
|
||||
enableStrictModeLogs = Config.ENABLE_STRICT_MODE_LOGS,
|
||||
versionName = BuildConfig.VERSION_NAME,
|
||||
gitRevision = BuildConfig.GIT_REVISION,
|
||||
gitRevisionDate = BuildConfig.GIT_REVISION_DATE,
|
||||
|
|
|
@ -21,7 +21,6 @@ data class BuildMeta(
|
|||
val sdkInt: Int,
|
||||
val applicationId: String,
|
||||
val lowPrivacyLoggingEnabled: Boolean,
|
||||
val enableStrictModeLogs: Boolean,
|
||||
val versionName: String,
|
||||
val gitRevision: String,
|
||||
val gitRevisionDate: String,
|
||||
|
|
|
@ -24,7 +24,6 @@ fun aBuildMeta() = BuildMeta(
|
|||
sdkInt = Build.VERSION_CODES.O,
|
||||
applicationId = "im.vector",
|
||||
lowPrivacyLoggingEnabled = false,
|
||||
enableStrictModeLogs = false,
|
||||
versionName = "app-version-name",
|
||||
gitRevision = "abcdef",
|
||||
gitRevisionDate = "01-01-01",
|
||||
|
|
Loading…
Reference in New Issue