-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: incorrect activity path for NotificationOpenedActivityHMS #2243
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 2 feedback items that we should put comments in the code.
Let's also add a test, the test should use Class.forName("...")
so it will fail if someone ever tries to use a refactoring tool and doesn't read the comments either.
@@ -66,7 +66,7 @@ | |||
</service> | |||
|
|||
<activity | |||
android:name="com.onesignal.notifications.activities.NotificationOpenedActivityHMS" | |||
android:name="com.onesignal.NotificationOpenedActivityHMS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment here that we can't change the android:name, since the OneSignal backend incudes it in the payload.
@@ -24,12 +24,11 @@ | |||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
* THE SOFTWARE. | |||
*/ | |||
package com.onesignal.notifications.activities | |||
package com.onesignal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also put a comment here and before the class definition too.
Description
One Line Summary
Fix the class path of NotificationOpenedActivityHMS so it can be consistent with the path returned by the backend service.
Details
Motivation
NotificationOpenedActivityHMS is currently broken for all Huawei devices on V5 because the class path is currently under com.onesignal.notifications.activities instead of com.onesignal used in our backend service. This PR moves the class so the path is in consistent with that used by the backend service.
Scope
RECOMMEND - OPTIONAL - What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.
Testing
Manual testing
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is