Skip to content

Commit 2a56b88

Browse files
authored
updated tags used for Android Log.e calls (#2015)
1 parent c72971d commit 2a56b88

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

flutter_local_notifications/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* **Breaking change** removed deprecated `schedule`, `showDailyAtTime` and `showWeeklyAtDayAndTime` methods. Notifications that were scheduled prior to this release should still work
44
* **Breaking change** removed `Time` class
5+
* [Android] updated tags used when writing error logs. For corrupt scheduled notifications and error is logged the tag is now `ScheduledNotifReceiver` instead of `ScheduledNotifReceiver`. When logging that exact alarm permissions have been revoked the the tag is now `FLTLocalNotifPlugin` instead of `notification`
56

67
# [14.1.1]
78

flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ public class FlutterLocalNotificationsPlugin
117117
static final String PAYLOAD = "payload";
118118
static final String NOTIFICATION_ID = "notificationId";
119119
static final String CANCEL_NOTIFICATION = "cancelNotification";
120+
121+
private static final String TAG = "FLTLocalNotifPlugin";
122+
120123
private static final String SHARED_PREFERENCES_KEY = "notification_plugin_cache";
121124
private static final String DISPATCHER_HANDLE = "dispatcher_handle";
122125
private static final String CALLBACK_HANDLE = "callback_handle";
@@ -206,8 +209,7 @@ static void rescheduleNotifications(Context context) {
206209
scheduleNotification(context, notificationDetails, false);
207210
}
208211
} catch (ExactAlarmPermissionException e) {
209-
// TODO: update tag used to match name of class
210-
Log.e("notification", e.getMessage());
212+
Log.e(TAG, e.getMessage());
211213
removeNotificationFromCache(context, notificationDetails.id);
212214
}
213215
}
@@ -225,8 +227,7 @@ static void scheduleNextNotification(Context context, NotificationDetails notifi
225227
removeNotificationFromCache(context, notificationDetails.id);
226228
}
227229
} catch (ExactAlarmPermissionException e) {
228-
// TODO: update tag used to match name of class
229-
Log.e("notification", e.getMessage());
230+
Log.e(TAG, e.getMessage());
230231
removeNotificationFromCache(context, notificationDetails.id);
231232
}
232233
}

flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/ScheduledNotificationReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@Keep
2121
public class ScheduledNotificationReceiver extends BroadcastReceiver {
2222

23-
private static final String TAG = "ScheduledNotificationReceiver";
23+
private static final String TAG = "ScheduledNotifReceiver";
2424

2525
@Override
2626
@SuppressWarnings("deprecation")

0 commit comments

Comments
 (0)