Skip to content

Commit 181a451

Browse files
committed
Remove unused code from OneSignal.java
* Remove getNotificationIdFromFCMBundle method * Remove getNotificationIdFromFCMJsonPayload method
1 parent 27d703e commit 181a451

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,36 +3049,6 @@ static String getNotificationIdFromFCMJson(@Nullable JSONObject fcmJson) {
30493049
return null;
30503050
}
30513051

3052-
static String getNotificationIdFromFCMBundle(@Nullable Bundle fcmBundle) {
3053-
if (fcmBundle == null || fcmBundle.isEmpty())
3054-
return null;
3055-
3056-
try {
3057-
if (fcmBundle.containsKey("custom")) {
3058-
JSONObject customJSON = new JSONObject(fcmBundle.getString("custom"));
3059-
3060-
if (customJSON.has("i"))
3061-
return customJSON.optString("i", null);
3062-
else
3063-
Log(LOG_LEVEL.DEBUG, "Not a OneSignal formatted FCM message. No 'i' field in custom.");
3064-
}
3065-
else
3066-
Log(LOG_LEVEL.DEBUG, "Not a OneSignal formatted FCM message. No 'custom' field in the bundle.");
3067-
} catch (Throwable t) {
3068-
Log(LOG_LEVEL.DEBUG, "Could not parse bundle, probably not a OneSignal notification.", t);
3069-
}
3070-
3071-
return null;
3072-
}
3073-
3074-
private static String getNotificationIdFromFCMJsonPayload(JSONObject fcmJson) {
3075-
try {
3076-
JSONObject customJSON = new JSONObject(fcmJson.optString("custom"));
3077-
return customJSON.optString("i", null);
3078-
} catch(Throwable t) {}
3079-
return null;
3080-
}
3081-
30823052
static boolean isAppActive() {
30833053
return initDone && isInForeground();
30843054
}

0 commit comments

Comments
 (0)