Commit 0a15c12e authored by Jonathan Almeida's avatar Jonathan Almeida
Browse files

Closes #4165: Add more logging for push

parent 6af2b942
......@@ -92,6 +92,8 @@ class AutoPushFeature(
// If we have a token, initialize the rust component first.
prefToken?.let { token ->
scope.launch {
logger.debug("Initializing native component with the cached token.")
connection.updateToken(token)
}
}
......@@ -126,6 +128,8 @@ class AutoPushFeature(
*/
override fun onNewToken(newToken: String) {
scope.launchAndTry {
logger.info("Received a new registration token from push service.")
connection.updateToken(newToken)
// Subscribe all only if this is the first time.
......@@ -144,6 +148,7 @@ class AutoPushFeature(
scope.launchAndTry {
val type = DeliveryManager.serviceForChannelId(message.channelId)
DeliveryManager.with(connection) {
logger.info("New push message decrypted.")
val decrypted = decrypt(
channelId = message.channelId,
body = message.body,
......@@ -243,6 +248,8 @@ class AutoPushFeature(
* [0]: https://github.com/mozilla-mobile/android-components/issues/3173
*/
fun forceRegistrationRenewal() {
logger.warn("Forcing registration renewal by deleting our (cached) token.")
// Remove the cached token we have.
deleteToken(context)
......
......@@ -50,7 +50,10 @@ permalink: /changelog/
* `begin*` OAuthAccount methods now return an `AuthFlowUrl`, which encapsulates an OAuth state identifier.
* `AccountObserver:onAuthenticated` method now has `authType` parameter (instead of `newAccount`), which describes in detail what caused an authentication.
* `GlobalSyncableStoreProvider.configureStore` now takes a pair of `Pair<SyncEngine, SyncableStore>`, instead of allowing arbitrary string names for engines.
* `GlobalSyncableStoreProvider.getStore` is no longer part of the public API.
* `GlobalSyncableStoreProvider.getStore` is no longer part of the public API.
* **feature-push**
* Added more logging into `AutoPushFeature` to aid in debugging in release builds.
# 11.0.0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment