Skip to content

Commit bbe193f

Browse files
committed
Method visibility based on usage and remove misleading comment
1 parent ee95d3c commit bbe193f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected static String getSharedPrefsNameByChannelId(String id)
190190
return String.format("unity_notification_channel_%s", id);
191191
}
192192

193-
protected static NotificationChannelWrapper getNotificationChannel(Context context, String id) {
193+
private static NotificationChannelWrapper getNotificationChannel(Context context, String id) {
194194
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
195195
NotificationChannel ch = getNotificationManager(context).getNotificationChannel(id);
196196
if (ch == null)
@@ -229,7 +229,7 @@ protected static NotificationChannelWrapper getNotificationChannel(Context conte
229229
}
230230

231231
@TargetApi(Build.VERSION_CODES.O)
232-
protected static NotificationChannelWrapper notificationChannelToWrapper(Object chan) {
232+
private static NotificationChannelWrapper notificationChannelToWrapper(Object chan) {
233233
// Possibly unavailable classes cannot be in API, breaks reflection code looping over when searching for method
234234
NotificationChannel channel = (NotificationChannel)chan;
235235
NotificationChannelWrapper wrapper = new NotificationChannelWrapper();
@@ -248,9 +248,7 @@ protected static NotificationChannelWrapper notificationChannelToWrapper(Object
248248
return wrapper;
249249
}
250250

251-
// Get a notification channel by id.
252-
// This function will only be called for devices which are low than Android O.
253-
protected NotificationChannelWrapper getNotificationChannel(String id) {
251+
public NotificationChannelWrapper getNotificationChannel(String id) {
254252
return UnityNotificationManager.getNotificationChannel(mContext, id);
255253
}
256254

0 commit comments

Comments
 (0)