Skip to content

Commit 28f030e

Browse files
committed
Reformat code for processCollapseKey method
1 parent 4f51367 commit 28f030e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -347,23 +347,23 @@ private static void processCollapseKey(OSNotificationGenerationJob notificationJ
347347
return;
348348
String collapse_id = notificationJob.getJsonPayload().optString("collapse_key");
349349

350-
OneSignalDbHelper dbHelper = OneSignalDbHelper.getInstance(notificationJob.getContext());
351-
Cursor cursor = dbHelper.query(
352-
NotificationTable.TABLE_NAME,
353-
new String[]{NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID}, // retColumn
354-
NotificationTable.COLUMN_NAME_COLLAPSE_ID + " = ? AND " +
355-
NotificationTable.COLUMN_NAME_DISMISSED + " = 0 AND " +
356-
NotificationTable.COLUMN_NAME_OPENED + " = 0 ",
357-
new String[]{collapse_id},
358-
null, null, null);
359-
360-
if (cursor.moveToFirst()) {
361-
int androidNotificationId = cursor.getInt(cursor.getColumnIndex(NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID));
362-
notificationJob.setAndroidIdWithoutOverriding(androidNotificationId);
363-
}
350+
OneSignalDbHelper dbHelper = OneSignalDbHelper.getInstance(notificationJob.getContext());
351+
Cursor cursor = dbHelper.query(
352+
NotificationTable.TABLE_NAME,
353+
new String[]{NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID}, // retColumn
354+
NotificationTable.COLUMN_NAME_COLLAPSE_ID + " = ? AND " +
355+
NotificationTable.COLUMN_NAME_DISMISSED + " = 0 AND " +
356+
NotificationTable.COLUMN_NAME_OPENED + " = 0 ",
357+
new String[]{collapse_id},
358+
null, null, null);
359+
360+
if (cursor.moveToFirst()) {
361+
int androidNotificationId = cursor.getInt(cursor.getColumnIndex(NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID));
362+
notificationJob.setAndroidIdWithoutOverriding(androidNotificationId);
363+
}
364364

365-
cursor.close();
366-
}
365+
cursor.close();
366+
}
367367

368368
/**
369369
* Process bundle passed from FCM / HMS / ADM broadcast receiver

0 commit comments

Comments
 (0)