mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Rageshake: log resumed screens and add the log verbosity ON/OFF to the rageshakes data
This commit is contained in:
parent
42cdb1db11
commit
1ceddd9607
6 changed files with 20 additions and 11 deletions
|
@ -222,8 +222,7 @@ abstract class VectorBaseActivity : AppCompatActivity(), HasScreenInjector {
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
Timber.i("onResume Activity ${this.javaClass.simpleName}")
|
||||||
Timber.v("onResume Activity ${this.javaClass.simpleName}")
|
|
||||||
|
|
||||||
configurationViewModel.onActivityResumed()
|
configurationViewModel.onActivityResumed()
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||||
import im.vector.riotx.core.di.DaggerScreenComponent
|
import im.vector.riotx.core.di.DaggerScreenComponent
|
||||||
import im.vector.riotx.core.di.ScreenComponent
|
import im.vector.riotx.core.di.ScreenComponent
|
||||||
import im.vector.riotx.core.utils.DimensionConverter
|
import im.vector.riotx.core.utils.DimensionConverter
|
||||||
|
import timber.log.Timber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add MvRx capabilities to bottomsheetdialog (like BaseMvRxFragment)
|
* Add MvRx capabilities to bottomsheetdialog (like BaseMvRxFragment)
|
||||||
|
@ -80,6 +81,11 @@ abstract class VectorBaseBottomSheetDialogFragment : BottomSheetDialogFragment()
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
Timber.i("onResume BottomSheet ${this.javaClass.simpleName}")
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
return super.onCreateDialog(savedInstanceState).apply {
|
return super.onCreateDialog(savedInstanceState).apply {
|
||||||
val dialog = this as? BottomSheetDialog
|
val dialog = this as? BottomSheetDialog
|
||||||
|
|
|
@ -104,7 +104,7 @@ abstract class VectorBaseFragment : BaseMvRxFragment(), HasScreenInjector {
|
||||||
@CallSuper
|
@CallSuper
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
Timber.v("onResume Fragment ${this.javaClass.simpleName}")
|
Timber.i("onResume Fragment ${this.javaClass.simpleName}")
|
||||||
}
|
}
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
|
|
|
@ -33,6 +33,7 @@ import im.vector.riotx.core.di.ActiveSessionHolder
|
||||||
import im.vector.riotx.core.extensions.toOnOff
|
import im.vector.riotx.core.extensions.toOnOff
|
||||||
import im.vector.riotx.core.utils.getDeviceLocale
|
import im.vector.riotx.core.utils.getDeviceLocale
|
||||||
import im.vector.riotx.features.settings.VectorLocale
|
import im.vector.riotx.features.settings.VectorLocale
|
||||||
|
import im.vector.riotx.features.settings.VectorPreferences
|
||||||
import im.vector.riotx.features.themes.ThemeUtils
|
import im.vector.riotx.features.themes.ThemeUtils
|
||||||
import im.vector.riotx.features.version.VersionProvider
|
import im.vector.riotx.features.version.VersionProvider
|
||||||
import okhttp3.Call
|
import okhttp3.Call
|
||||||
|
@ -44,12 +45,15 @@ import okhttp3.Response
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.io.*
|
import java.io.File
|
||||||
|
import java.io.IOException
|
||||||
|
import java.io.OutputStreamWriter
|
||||||
import java.net.HttpURLConnection
|
import java.net.HttpURLConnection
|
||||||
import java.util.Locale
|
import java.util.*
|
||||||
import java.util.zip.GZIPOutputStream
|
import java.util.zip.GZIPOutputStream
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BugReporter creates and sends the bug reports.
|
* BugReporter creates and sends the bug reports.
|
||||||
|
@ -57,6 +61,7 @@ import javax.inject.Singleton
|
||||||
@Singleton
|
@Singleton
|
||||||
class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSessionHolder,
|
class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSessionHolder,
|
||||||
private val versionProvider: VersionProvider,
|
private val versionProvider: VersionProvider,
|
||||||
|
private val vectorPreferences: VectorPreferences,
|
||||||
private val vectorFileLogger: VectorFileLogger) {
|
private val vectorFileLogger: VectorFileLogger) {
|
||||||
var inMultiWindowMode = false
|
var inMultiWindowMode = false
|
||||||
|
|
||||||
|
@ -230,7 +235,7 @@ class BugReporter @Inject constructor(private val activeSessionHolder: ActiveSes
|
||||||
.addFormDataPart("matrix_sdk_version", Matrix.getSdkVersion())
|
.addFormDataPart("matrix_sdk_version", Matrix.getSdkVersion())
|
||||||
.addFormDataPart("olm_version", olmVersion)
|
.addFormDataPart("olm_version", olmVersion)
|
||||||
.addFormDataPart("device", Build.MODEL.trim())
|
.addFormDataPart("device", Build.MODEL.trim())
|
||||||
.addFormDataPart("lazy_loading", true.toOnOff())
|
.addFormDataPart("verbose_log", vectorPreferences.labAllowedExtendedLogging().toOnOff())
|
||||||
.addFormDataPart("multi_window", inMultiWindowMode.toOnOff())
|
.addFormDataPart("multi_window", inMultiWindowMode.toOnOff())
|
||||||
.addFormDataPart("os", Build.VERSION.RELEASE + " (API " + Build.VERSION.SDK_INT + ") "
|
.addFormDataPart("os", Build.VERSION.RELEASE + " (API " + Build.VERSION.SDK_INT + ") "
|
||||||
+ Build.VERSION.INCREMENTAL + "-" + Build.VERSION.CODENAME)
|
+ Build.VERSION.INCREMENTAL + "-" + Build.VERSION.CODENAME)
|
||||||
|
|
|
@ -24,9 +24,7 @@ import java.io.File
|
||||||
import java.io.PrintWriter
|
import java.io.PrintWriter
|
||||||
import java.io.StringWriter
|
import java.io.StringWriter
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.*
|
||||||
import java.util.Locale
|
|
||||||
import java.util.TimeZone
|
|
||||||
import java.util.logging.*
|
import java.util.logging.*
|
||||||
import java.util.logging.Formatter
|
import java.util.logging.Formatter
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -83,7 +81,8 @@ class VectorFileLogger @Inject constructor(val context: Context, private val vec
|
||||||
return if (vectorPreferences.labAllowedExtendedLogging()) {
|
return if (vectorPreferences.labAllowedExtendedLogging()) {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
priority < Log.ERROR
|
// Exclude debug and verbose logs
|
||||||
|
priority <= Log.DEBUG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ abstract class VectorSettingsBaseFragment : PreferenceFragmentCompat(), HasScree
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
Timber.v("onResume Fragment ${this.javaClass.simpleName}")
|
Timber.i("onResume Fragment ${this.javaClass.simpleName}")
|
||||||
vectorActivity.supportActionBar?.setTitle(titleRes)
|
vectorActivity.supportActionBar?.setTitle(titleRes)
|
||||||
// find the view from parent activity
|
// find the view from parent activity
|
||||||
mLoadingView = vectorActivity.findViewById(R.id.vector_settings_spinner_views)
|
mLoadingView = vectorActivity.findViewById(R.id.vector_settings_spinner_views)
|
||||||
|
|
Loading…
Reference in a new issue