Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Jan 21, 2025
1 parent 9a0458f commit adf6f58
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
</intent-filter>
</service>

<!-- CAUTION: OneSignal backend includes the activity name in the payload, modifying the name without sync may result in notification click not firing -->
<activity
android:name="com.onesignal.NotificationOpenedActivityHMS"
android:noHistory="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
package com.onesignal
// OneSignal backend includes the activity name in the payload, modifying the namespace may result in notification click not firing

import android.app.Activity
import android.content.Intent
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.onesignal.notifications

import io.kotest.core.spec.style.FunSpec
import org.junit.jupiter.api.assertDoesNotThrow

class ClassPathTests : FunSpec({
test("ensure the class path for NotificationOpenedActivityHMS.kt is in consistent with that returned by the backend service") {
// The test will fail if the classpath is changed by accident.
// If the change is intentional and corresponds with the backend update, modify or remove this test accordingly.
val fullClassName = "com.onesignal.NotificationOpenedActivityHMS"
assertDoesNotThrow {
Class.forName(fullClassName)
}
}
})

0 comments on commit adf6f58

Please sign in to comment.