Skip to content

Commit 888b043

Browse files
committed
Merge remote-tracking branch 'pr/1379'
2 parents d19ed9f + 22f6d28 commit 888b043

File tree

21 files changed

+2358
-919
lines changed

21 files changed

+2358
-919
lines changed

android/app/src/main/kotlin/com/zulip/flutter/Notifications.g.kt renamed to android/app/src/main/kotlin/com/zulip/flutter/AndroidNotifications.g.kt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import io.flutter.plugin.common.StandardMethodCodec
1313
import io.flutter.plugin.common.StandardMessageCodec
1414
import java.io.ByteArrayOutputStream
1515
import java.nio.ByteBuffer
16-
private object NotificationsPigeonUtils {
16+
private object AndroidNotificationsPigeonUtils {
1717

1818
fun wrapResult(result: Any?): List<Any?> {
1919
return listOf(result)
@@ -128,7 +128,7 @@ data class NotificationChannel (
128128
if (this === other) {
129129
return true
130130
}
131-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
131+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
132132

133133
override fun hashCode(): Int = toList().hashCode()
134134
}
@@ -171,7 +171,7 @@ data class AndroidIntent (
171171
if (this === other) {
172172
return true
173173
}
174-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
174+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
175175

176176
override fun hashCode(): Int = toList().hashCode()
177177
}
@@ -215,7 +215,7 @@ data class PendingIntent (
215215
if (this === other) {
216216
return true
217217
}
218-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
218+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
219219

220220
override fun hashCode(): Int = toList().hashCode()
221221
}
@@ -249,7 +249,7 @@ data class InboxStyle (
249249
if (this === other) {
250250
return true
251251
}
252-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
252+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
253253

254254
override fun hashCode(): Int = toList().hashCode()
255255
}
@@ -299,7 +299,7 @@ data class Person (
299299
if (this === other) {
300300
return true
301301
}
302-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
302+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
303303

304304
override fun hashCode(): Int = toList().hashCode()
305305
}
@@ -339,7 +339,7 @@ data class MessagingStyleMessage (
339339
if (this === other) {
340340
return true
341341
}
342-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
342+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
343343

344344
override fun hashCode(): Int = toList().hashCode()
345345
}
@@ -382,7 +382,7 @@ data class MessagingStyle (
382382
if (this === other) {
383383
return true
384384
}
385-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
385+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
386386

387387
override fun hashCode(): Int = toList().hashCode()
388388
}
@@ -419,7 +419,7 @@ data class Notification (
419419
if (this === other) {
420420
return true
421421
}
422-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
422+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
423423

424424
override fun hashCode(): Int = toList().hashCode()
425425
}
@@ -459,7 +459,7 @@ data class StatusBarNotification (
459459
if (this === other) {
460460
return true
461461
}
462-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
462+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
463463

464464
override fun hashCode(): Int = toList().hashCode()
465465
}
@@ -509,11 +509,11 @@ data class StoredNotificationSound (
509509
if (this === other) {
510510
return true
511511
}
512-
return NotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
512+
return AndroidNotificationsPigeonUtils.deepEquals(toList(), other.toList()) }
513513

514514
override fun hashCode(): Int = toList().hashCode()
515515
}
516-
private open class NotificationsPigeonCodec : StandardMessageCodec() {
516+
private open class AndroidNotificationsPigeonCodec : StandardMessageCodec() {
517517
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
518518
return when (type) {
519519
129.toByte() -> {
@@ -721,7 +721,7 @@ interface AndroidNotificationHostApi {
721721
companion object {
722722
/** The codec used by AndroidNotificationHostApi. */
723723
val codec: MessageCodec<Any?> by lazy {
724-
NotificationsPigeonCodec()
724+
AndroidNotificationsPigeonCodec()
725725
}
726726
/** Sets up an instance of `AndroidNotificationHostApi` to handle messages through the `binaryMessenger`. */
727727
@JvmOverloads
@@ -737,7 +737,7 @@ interface AndroidNotificationHostApi {
737737
api.createNotificationChannel(channelArg)
738738
listOf(null)
739739
} catch (exception: Throwable) {
740-
NotificationsPigeonUtils.wrapError(exception)
740+
AndroidNotificationsPigeonUtils.wrapError(exception)
741741
}
742742
reply.reply(wrapped)
743743
}
@@ -752,7 +752,7 @@ interface AndroidNotificationHostApi {
752752
val wrapped: List<Any?> = try {
753753
listOf(api.getNotificationChannels())
754754
} catch (exception: Throwable) {
755-
NotificationsPigeonUtils.wrapError(exception)
755+
AndroidNotificationsPigeonUtils.wrapError(exception)
756756
}
757757
reply.reply(wrapped)
758758
}
@@ -770,7 +770,7 @@ interface AndroidNotificationHostApi {
770770
api.deleteNotificationChannel(channelIdArg)
771771
listOf(null)
772772
} catch (exception: Throwable) {
773-
NotificationsPigeonUtils.wrapError(exception)
773+
AndroidNotificationsPigeonUtils.wrapError(exception)
774774
}
775775
reply.reply(wrapped)
776776
}
@@ -785,7 +785,7 @@ interface AndroidNotificationHostApi {
785785
val wrapped: List<Any?> = try {
786786
listOf(api.listStoredSoundsInNotificationsDirectory())
787787
} catch (exception: Throwable) {
788-
NotificationsPigeonUtils.wrapError(exception)
788+
AndroidNotificationsPigeonUtils.wrapError(exception)
789789
}
790790
reply.reply(wrapped)
791791
}
@@ -803,7 +803,7 @@ interface AndroidNotificationHostApi {
803803
val wrapped: List<Any?> = try {
804804
listOf(api.copySoundResourceToMediaStore(targetFileDisplayNameArg, sourceResourceNameArg))
805805
} catch (exception: Throwable) {
806-
NotificationsPigeonUtils.wrapError(exception)
806+
AndroidNotificationsPigeonUtils.wrapError(exception)
807807
}
808808
reply.reply(wrapped)
809809
}
@@ -835,7 +835,7 @@ interface AndroidNotificationHostApi {
835835
api.notify(tagArg, idArg, autoCancelArg, channelIdArg, colorArg, contentIntentArg, contentTextArg, contentTitleArg, extrasArg, groupKeyArg, inboxStyleArg, isGroupSummaryArg, messagingStyleArg, numberArg, smallIconResourceNameArg)
836836
listOf(null)
837837
} catch (exception: Throwable) {
838-
NotificationsPigeonUtils.wrapError(exception)
838+
AndroidNotificationsPigeonUtils.wrapError(exception)
839839
}
840840
reply.reply(wrapped)
841841
}
@@ -852,7 +852,7 @@ interface AndroidNotificationHostApi {
852852
val wrapped: List<Any?> = try {
853853
listOf(api.getActiveNotificationMessagingStyleByTag(tagArg))
854854
} catch (exception: Throwable) {
855-
NotificationsPigeonUtils.wrapError(exception)
855+
AndroidNotificationsPigeonUtils.wrapError(exception)
856856
}
857857
reply.reply(wrapped)
858858
}
@@ -869,7 +869,7 @@ interface AndroidNotificationHostApi {
869869
val wrapped: List<Any?> = try {
870870
listOf(api.getActiveNotifications(desiredExtrasArg))
871871
} catch (exception: Throwable) {
872-
NotificationsPigeonUtils.wrapError(exception)
872+
AndroidNotificationsPigeonUtils.wrapError(exception)
873873
}
874874
reply.reply(wrapped)
875875
}
@@ -888,7 +888,7 @@ interface AndroidNotificationHostApi {
888888
api.cancel(tagArg, idArg)
889889
listOf(null)
890890
} catch (exception: Throwable) {
891-
NotificationsPigeonUtils.wrapError(exception)
891+
AndroidNotificationsPigeonUtils.wrapError(exception)
892892
}
893893
reply.reply(wrapped)
894894
}

0 commit comments

Comments
 (0)