Skip to content

Commit c7d0e40

Browse files
committed
Rename method
1 parent efb66d1 commit c7d0e40

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/UnityNotificationUtilities.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,11 @@ protected static Notification.Builder recoverBuilder(Context context, Notificati
530530
builder.setExtras(notification.extras);
531531
return builder;
532532
}
533-
else {
534-
return recoverBuilderPreNougat(context, notification);
535-
}
533+
534+
return recoverBuilderCustom(context, notification);
536535
}
537536

538-
private static Notification.Builder recoverBuilderPreNougat(Context context, Notification notification) {
537+
private static Notification.Builder recoverBuilderCustom(Context context, Notification notification) {
539538
String channelID = notification.extras.getString(KEY_CHANNEL_ID);
540539
Notification.Builder builder = UnityNotificationManager.createNotificationBuilder(context, channelID);
541540
UnityNotificationManager.setNotificationIcon(builder, KEY_SMALL_ICON, notification.extras.getString(KEY_SMALL_ICON));

com.unity.mobile.notifications/Tests/Runtime/Android/AndroidNotificationSimpleTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public void LegacyRecoverBuilderProducesTheSameNotification()
472472
var manager = managerClass.GetStatic<AndroidJavaObject>("mUnityNotificationManager");
473473
var context = manager.Get<AndroidJavaObject>("mContext");
474474
var utils = new AndroidJavaClass("com.unity.androidnotifications.UnityNotificationUtilities");
475-
var recoveredBuilder = utils.CallStatic<AndroidJavaObject>("recoverBuilderPreNougat", context, notification);
475+
var recoveredBuilder = utils.CallStatic<AndroidJavaObject>("recoverBuilderCustom", context, notification);
476476
Assert.IsNotNull(recoveredBuilder);
477477

478478
var notificationAfterRecover = recoveredBuilder.Call<AndroidJavaObject>("build");

0 commit comments

Comments
 (0)