Skip to content

Commit 982efec

Browse files
committed
Remove OSNotificationPayload
* Remove already not in use OSNotificationPayload class * Remove OSNotificationReceived.java file * Rename NotificationID to NotificationId
1 parent 61a7dbd commit 982efec

File tree

4 files changed

+7
-429
lines changed

4 files changed

+7
-429
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/NotificationBundleProcessor.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,6 @@ private static void maximizeButtonsFromBundle(Bundle fcmBundle) {
367367
}
368368
}
369369

370-
static OSNotificationPayload OSNotificationPayloadFrom(JSONObject currentJsonPayload) {
371-
JSONObject customJson = null;
372-
try {
373-
customJson = NotificationBundleProcessor.getCustomJSONObject(currentJsonPayload);
374-
} catch (Throwable t) {
375-
OneSignal.Log(OneSignal.LOG_LEVEL.ERROR, "Error assigning OSNotificationPayload values!", t);
376-
}
377-
return customJson == null ? new OSNotificationPayload() : OSNotificationPayload.OSNotificationPayloadFrom(currentJsonPayload, customJson);
378-
}
379-
380370
private static void processCollapseKey(OSNotificationGenerationJob notificationJob) {
381371
if (notificationJob.isRestoring())
382372
return;

OneSignalSDK/onesignal/src/main/java/com/onesignal/OSNotification.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ OSNotification copy() {
221221
.setNotificationExtender(notificationExtender)
222222
.setGroupedNotifications(groupedNotifications)
223223
.setAndroidNotificationId(androidNotificationId)
224-
.setNotificationID(notificationId)
224+
.setNotificationId(notificationId)
225225
.setTemplateName(templateName)
226226
.setTemplateId(templateId)
227227
.setTitle(title)
@@ -533,7 +533,7 @@ public String toString() {
533533
}
534534

535535
/**
536-
* List of action buttons on the notification. Part of {@link OSNotificationPayload}.
536+
* List of action buttons on the notification.
537537
*/
538538
public static class ActionButton {
539539
private String id;
@@ -582,7 +582,7 @@ public String getIcon() {
582582
}
583583

584584
/**
585-
* If a background image was set, this object will be available. Part of {@link OSNotificationPayload}.
585+
* If a background image was set, this object will be available.
586586
*/
587587
public static class BackgroundImageLayout {
588588
private String image;
@@ -608,7 +608,7 @@ public static class OSNotificationBuilder {
608608
private List<OSNotification> groupedNotifications;
609609
private int androidNotificationId;
610610

611-
private String notificationID;
611+
private String notificationId;
612612
private String templateName, templateId;
613613
private String title, body;
614614
private JSONObject additionalData;
@@ -647,8 +647,8 @@ public OSNotificationBuilder setAndroidNotificationId(int androidNotificationId)
647647
return this;
648648
}
649649

650-
public OSNotificationBuilder setNotificationID(String notificationID) {
651-
this.notificationID = notificationID;
650+
public OSNotificationBuilder setNotificationId(String notificationId) {
651+
this.notificationId = notificationId;
652652
return this;
653653
}
654654

@@ -762,7 +762,7 @@ public OSNotification build() {
762762
payload.setNotificationExtender(notificationExtender);
763763
payload.setGroupedNotifications(groupedNotifications);
764764
payload.setAndroidNotificationId(androidNotificationId);
765-
payload.setNotificationId(notificationID);
765+
payload.setNotificationId(notificationId);
766766
payload.setTemplateName(templateName);
767767
payload.setTemplateId(templateId);
768768
payload.setTitle(title);

0 commit comments

Comments
 (0)