Skip to content

Commit 516648a

Browse files
committed
code style changes
1 parent ee39140 commit 516648a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/ADMMessageHandlerJob.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
package com.onesignal
22

3-
43
import android.content.Context
54
import android.content.Intent
65
import com.amazon.device.messaging.ADMMessageHandlerJobBase
76

87
class ADMMessageHandlerJob : ADMMessageHandlerJobBase() {
98

109
override fun onMessage(context: Context?, intent: Intent?) {
11-
val bundle = intent!!.extras
10+
val bundle = intent?.extras
1211

1312
val processedResult = NotificationBundleProcessor.processBundleFromReceiver(context, bundle)
1413
// TODO: Figure out the correct replacement or usage of completeWakefulIntent method
1514
// FCMBroadcastReceiver.completeWakefulIntent(intent);
1615

17-
// TODO: Figure out the correct replacement or usage of completeWakefulIntent method
18-
// FCMBroadcastReceiver.completeWakefulIntent(intent);
1916
if (processedResult.processed()) return
2017

2118
val payload = NotificationBundleProcessor.bundleAsJSONObject(bundle)
2219
val notification = OSNotification(payload)
2320

24-
val notificationJob = OSNotificationGenerationJob(context)
25-
notificationJob.jsonPayload = payload
26-
notificationJob.context = context
27-
notificationJob.notification = notification
21+
val notificationJob = OSNotificationGenerationJob(context).apply {
22+
this.jsonPayload = payload
23+
this.context = context
24+
this.notification = notification
25+
}
26+
2827
NotificationBundleProcessor.processJobForDisplay(notificationJob, true)
2928
}
3029

0 commit comments

Comments
 (0)