Skip to content

Commit 19a2f2e

Browse files
committed
Use Unbox to unpack Integer
1 parent 775c21e commit 19a2f2e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

com.unity.mobile.notifications/Runtime/Android/AndroidNotificationCenter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,13 @@ public void SetNotificationColor(AndroidJavaObject builder, int color)
136136
{
137137
if (color == null)
138138
return null;
139+
#if UNITY_2022_2_OR_NEWER
140+
int val;
141+
AndroidJNIHelper.Unbox(color.GetRawObject(), out val);
142+
return val.ToColor();
143+
#else
139144
return color.Call<int>("intValue").ToColor();
145+
#endif
140146
}
141147
}
142148

0 commit comments

Comments
 (0)