@@ -87,6 +87,36 @@ data class NotificationChannel (
87
87
}
88
88
}
89
89
90
+ /* *
91
+ * Corresponds to `android.content.Intent`
92
+ *
93
+ * See:
94
+ * https://developer.android.com/reference/android/content/Intent
95
+ * https://developer.android.com/reference/android/content/Intent#Intent(java.lang.String,%20android.net.Uri,%20android.content.Context,%20java.lang.Class%3C?%3E)
96
+ *
97
+ * Generated class from Pigeon that represents data sent in messages.
98
+ */
99
+ data class AndroidIntent (
100
+ val action : String ,
101
+ val uri : String
102
+
103
+ ) {
104
+ companion object {
105
+ @Suppress(" LocalVariableName" )
106
+ fun fromList (__pigeon_list : List <Any ?>): AndroidIntent {
107
+ val action = __pigeon_list [0 ] as String
108
+ val uri = __pigeon_list [1 ] as String
109
+ return AndroidIntent (action, uri)
110
+ }
111
+ }
112
+ fun toList (): List <Any ?> {
113
+ return listOf (
114
+ action,
115
+ uri,
116
+ )
117
+ }
118
+ }
119
+
90
120
/* *
91
121
* Corresponds to `android.app.PendingIntent`.
92
122
*
@@ -96,11 +126,7 @@ data class NotificationChannel (
96
126
*/
97
127
data class PendingIntent (
98
128
val requestCode : Long ,
99
- /* *
100
- * A value set on an extra on the Intent, and passed to
101
- * the on-notification-opened callback.
102
- */
103
- val intentPayload : String ,
129
+ val intent : AndroidIntent ,
104
130
/* *
105
131
* A combination of flags from [PendingIntent.flags], and others associated
106
132
* with `Intent`; see Android docs for `PendingIntent.getActivity`.
@@ -112,15 +138,15 @@ data class PendingIntent (
112
138
@Suppress(" LocalVariableName" )
113
139
fun fromList (__pigeon_list : List <Any ?>): PendingIntent {
114
140
val requestCode = __pigeon_list [0 ].let { num -> if (num is Int ) num.toLong() else num as Long }
115
- val intentPayload = __pigeon_list [1 ] as String
141
+ val intent = __pigeon_list [1 ] as AndroidIntent
116
142
val flags = __pigeon_list [2 ].let { num -> if (num is Int ) num.toLong() else num as Long }
117
- return PendingIntent (requestCode, intentPayload , flags)
143
+ return PendingIntent (requestCode, intent , flags)
118
144
}
119
145
}
120
146
fun toList (): List <Any ?> {
121
147
return listOf (
122
148
requestCode,
123
- intentPayload ,
149
+ intent ,
124
150
flags,
125
151
)
126
152
}
@@ -266,25 +292,30 @@ private object NotificationsPigeonCodec : StandardMessageCodec() {
266
292
}
267
293
130 .toByte() -> {
268
294
return (readValue(buffer) as ? List <Any ?>)?.let {
269
- PendingIntent .fromList(it)
295
+ AndroidIntent .fromList(it)
270
296
}
271
297
}
272
298
131 .toByte() -> {
273
299
return (readValue(buffer) as ? List <Any ?>)?.let {
274
- InboxStyle .fromList(it)
300
+ PendingIntent .fromList(it)
275
301
}
276
302
}
277
303
132 .toByte() -> {
278
304
return (readValue(buffer) as ? List <Any ?>)?.let {
279
- Person .fromList(it)
305
+ InboxStyle .fromList(it)
280
306
}
281
307
}
282
308
133 .toByte() -> {
283
309
return (readValue(buffer) as ? List <Any ?>)?.let {
284
- MessagingStyleMessage .fromList(it)
310
+ Person .fromList(it)
285
311
}
286
312
}
287
313
134 .toByte() -> {
314
+ return (readValue(buffer) as ? List <Any ?>)?.let {
315
+ MessagingStyleMessage .fromList(it)
316
+ }
317
+ }
318
+ 135 .toByte() -> {
288
319
return (readValue(buffer) as ? List <Any ?>)?.let {
289
320
MessagingStyle .fromList(it)
290
321
}
@@ -298,26 +329,30 @@ private object NotificationsPigeonCodec : StandardMessageCodec() {
298
329
stream.write(129 )
299
330
writeValue(stream, value.toList())
300
331
}
301
- is PendingIntent -> {
332
+ is AndroidIntent -> {
302
333
stream.write(130 )
303
334
writeValue(stream, value.toList())
304
335
}
305
- is InboxStyle -> {
336
+ is PendingIntent -> {
306
337
stream.write(131 )
307
338
writeValue(stream, value.toList())
308
339
}
309
- is Person -> {
340
+ is InboxStyle -> {
310
341
stream.write(132 )
311
342
writeValue(stream, value.toList())
312
343
}
313
- is MessagingStyleMessage -> {
344
+ is Person -> {
314
345
stream.write(133 )
315
346
writeValue(stream, value.toList())
316
347
}
317
- is MessagingStyle -> {
348
+ is MessagingStyleMessage -> {
318
349
stream.write(134 )
319
350
writeValue(stream, value.toList())
320
351
}
352
+ is MessagingStyle -> {
353
+ stream.write(135 )
354
+ writeValue(stream, value.toList())
355
+ }
321
356
else -> super .writeValue(stream, value)
322
357
}
323
358
}
0 commit comments