Use the same name for the 2 db log methods
This commit is contained in:
parent
3c7f61e45c
commit
d4963dfb31
|
@ -242,5 +242,5 @@ interface Session :
|
|||
/**
|
||||
* Maintenance API, allows to print outs info on DB size to logcat
|
||||
*/
|
||||
fun dbgTraceDbInfo()
|
||||
fun logDbUsageInfo()
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ internal class DefaultSession @Inject constructor(
|
|||
return "$myUserId - ${sessionParams.deviceId}"
|
||||
}
|
||||
|
||||
override fun dbgTraceDbInfo() {
|
||||
override fun logDbUsageInfo() {
|
||||
Realm.getInstance(realmConfiguration).use { realm ->
|
||||
val info = StringBuilder()
|
||||
|
||||
|
|
|
@ -212,20 +212,20 @@ class BugReporter @Inject constructor(
|
|||
}
|
||||
|
||||
activeSessionHolder.getSafeActiveSession()
|
||||
?.takeIf { !mIsCancelled && withKeyRequestHistory }
|
||||
?.cryptoService()
|
||||
?.getGossipingEvents()
|
||||
?.let { GossipingEventsSerializer().serialize(it) }
|
||||
?.toByteArray()
|
||||
?.let { rawByteArray ->
|
||||
File(context.cacheDir.absolutePath, KEY_REQUESTS_FILENAME)
|
||||
.also {
|
||||
it.outputStream()
|
||||
?.takeIf { !mIsCancelled && withKeyRequestHistory }
|
||||
?.cryptoService()
|
||||
?.getGossipingEvents()
|
||||
?.let { GossipingEventsSerializer().serialize(it) }
|
||||
?.toByteArray()
|
||||
?.let { rawByteArray ->
|
||||
File(context.cacheDir.absolutePath, KEY_REQUESTS_FILENAME)
|
||||
.also {
|
||||
it.outputStream()
|
||||
.use { os -> os.write(rawByteArray) }
|
||||
}
|
||||
}
|
||||
?.let { compressFile(it) }
|
||||
?.let { gzippedFiles.add(it) }
|
||||
}
|
||||
}
|
||||
?.let { compressFile(it) }
|
||||
?.let { gzippedFiles.add(it) }
|
||||
|
||||
var deviceId = "undefined"
|
||||
var userId = "undefined"
|
||||
|
@ -446,8 +446,10 @@ class BugReporter @Inject constructor(
|
|||
*/
|
||||
fun openBugReportScreen(activity: FragmentActivity, forSuggestion: Boolean = false) {
|
||||
screenshot = takeScreenshot(activity)
|
||||
activeSessionHolder.getSafeActiveSession()?.dbgTraceDbInfo()
|
||||
activeSessionHolder.getSafeActiveSession()?.cryptoService()?.logDbUsageInfo()
|
||||
activeSessionHolder.getSafeActiveSession()?.let {
|
||||
it.logDbUsageInfo()
|
||||
it.cryptoService().logDbUsageInfo()
|
||||
}
|
||||
|
||||
val intent = Intent(activity, BugReportActivity::class.java)
|
||||
intent.putExtra("FOR_SUGGESTION", forSuggestion)
|
||||
|
|
Loading…
Reference in New Issue