Push: improve Push history screen, log and stored data (#4601)
* Add adb tools to help with doze mode and app standby * Add info about the device state when an error occurs in push. * Keep more events in the DB. * Push history: add confirmation dialog when resetting the data * Push history: add a filter to see only the errors * Update screenshots * Push history: print out invalid/ignored data received. * Increase log level for push, to make such log more visible. It also appears that sometimes Timber.d are not present in the rageshakes. * Log priority * Do not include device state for invalid/ignored event. * Fix tests. * Fix format issue. * Fix mistake in code blocks and do not filter when not necessary. * Improve formatting and add missing unit test. * Reduce nesting of blocks. --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
653416fa34
commit
7ed362b9db
30 changed files with 388 additions and 58 deletions
|
|
@ -89,7 +89,7 @@ class FakePushService(
|
|||
pushCounterFlow.value = counter
|
||||
}
|
||||
|
||||
override suspend fun resetPushHistory() {
|
||||
override suspend fun resetPushHistory() = simulateLongTask {
|
||||
resetPushHistoryResult()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ import io.element.android.tests.testutils.lambda.lambdaError
|
|||
|
||||
class FakePushHandler(
|
||||
private val handleResult: (PushData, String) -> Unit = { _, _ -> lambdaError() },
|
||||
private val handleInvalidResult: (String) -> Unit = { lambdaError() },
|
||||
private val handleInvalidResult: (String, String) -> Unit = { _, _ -> lambdaError() },
|
||||
) : PushHandler {
|
||||
override suspend fun handle(pushData: PushData, providerInfo: String) {
|
||||
handleResult(pushData, providerInfo)
|
||||
}
|
||||
|
||||
override suspend fun handleInvalid(providerInfo: String) {
|
||||
handleInvalidResult(providerInfo)
|
||||
override suspend fun handleInvalid(providerInfo: String, data: String) {
|
||||
handleInvalidResult(providerInfo, data)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue