@@ -225,9 +225,9 @@ private static Object deserializeNotification(Context context, byte[] bytes) {
225
225
if (notification != null )
226
226
return notification ;
227
227
data .reset ();
228
- Notification .Builder builder = deserializeNotificationCustom (in );
228
+ Notification .Builder builder = deserializeNotificationCustom (context , in );
229
229
if (builder == null ) {
230
- builder = deserializedFromOldIntent (bytes );
230
+ builder = deserializedFromOldIntent (context , bytes );
231
231
}
232
232
return builder ;
233
233
}
@@ -268,7 +268,7 @@ private static Notification deserializeNotificationParcelable(DataInputStream in
268
268
return null ;
269
269
}
270
270
271
- private static Notification .Builder deserializeNotificationCustom (DataInputStream in ) {
271
+ private static Notification .Builder deserializeNotificationCustom (Context context , DataInputStream in ) {
272
272
try {
273
273
if (!readAndCheckMagicNumber (in , UNITY_MAGIC_NUMBER ))
274
274
return null ;
@@ -329,7 +329,7 @@ private static Notification.Builder deserializeNotificationCustom(DataInputStrea
329
329
String sortKey = deserializeString (in );
330
330
long when = showWhen ? in .readLong () : 0 ;
331
331
332
- Notification .Builder builder = UnityNotificationManager .mUnityNotificationManager . createNotificationBuilder (channelId );
332
+ Notification .Builder builder = UnityNotificationManager .createNotificationBuilder (context , channelId );
333
333
if (extras != null )
334
334
builder .setExtras (extras );
335
335
else {
@@ -377,7 +377,7 @@ private static Notification.Builder deserializeNotificationCustom(DataInputStrea
377
377
return null ;
378
378
}
379
379
380
- private static Notification .Builder deserializedFromOldIntent (byte [] bytes ) {
380
+ private static Notification .Builder deserializedFromOldIntent (Context context , byte [] bytes ) {
381
381
try {
382
382
Parcel p = Parcel .obtain ();
383
383
p .unmarshall (bytes , 0 , bytes .length );
@@ -405,7 +405,7 @@ private static Notification.Builder deserializedFromOldIntent(byte[] bytes) {
405
405
int groupAlertBehaviour = bundle .getInt ("groupAlertBehaviour" , -1 );
406
406
boolean showTimestamp = bundle .getBoolean ("showTimestamp" , false );
407
407
408
- Notification .Builder builder = UnityNotificationManager .mUnityNotificationManager . createNotificationBuilder (channelId );
408
+ Notification .Builder builder = UnityNotificationManager .createNotificationBuilder (context , channelId );
409
409
builder .getExtras ().putInt (KEY_ID , id );
410
410
builder .setContentTitle (textTitle );
411
411
builder .setContentText (textContent );
0 commit comments