diff --git a/app/src/huawei/agconnect-services.json b/app/src/huawei/agconnect-services.json index 0c81d0477a..7fcb75e0f9 100644 --- a/app/src/huawei/agconnect-services.json +++ b/app/src/huawei/agconnect-services.json @@ -54,8 +54,8 @@ "channel_id":"" }, "edukit":{ - "edu_url":"edukit.edu.cloud.huawei.com.cn", - "dh_url":"edukit.edu.cloud.huawei.com.cn" + "edu_url":"edukit.cloud.huawei.com.cn", + "dh_url":"edukit.cloud.huawei.com.cn" }, "search":{ "url":"https://search-dre.cloud.huawei.com" diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/PushReceiver.kt b/app/src/main/java/org/thoughtcrime/securesms/notifications/PushReceiver.kt index e3a0d24206..e4a0fdc5a0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/PushReceiver.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/PushReceiver.kt @@ -33,13 +33,20 @@ private const val TAG = "PushHandler" class PushReceiver @Inject constructor(@ApplicationContext val context: Context) { private val json = Json { ignoreUnknownKeys = true } + /** + * Both push services should hit this method once they receive notification data + * As long as it is properly formatted + */ fun onPushDataReceived(dataMap: Map?) { addMessageReceiveJob(dataMap?.asPushData()) } + /** + * This is a fallback method in case the Huawei data is malformated, + * but it shouldn't happen. Old code used to send different data so this is kept as a safety + */ fun onPushDataReceived(data: ByteArray?) { addMessageReceiveJob(PushData(data = data, metadata = null)) - //todo DELETION verify this once I can get notifications on debug huawei builds } private fun addMessageReceiveJob(pushData: PushData?){