Skip to content

Commit

Permalink
fix: returns simple acitvity name instead of full class name (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Aug 8, 2024
1 parent 6d1c76c commit 45d8b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Next

- feat: add emulator detection property to static context ([#154](https://github.com/PostHog/posthog-android/pull/154))
- fix: ensure activity name is used when activity label is not defined ([#153](https://github.com/PostHog/posthog-android/pull/153))
- fix: ensure activity name is used when activity label is not defined ([#153](https://github.com/PostHog/posthog-android/pull/153)) and ([#156](https://github.com/PostHog/posthog-android/pull/156))
- recording: mask views with `contentDescription` setting and mask `WebView` if any masking is enabled ([#149](https://github.com/PostHog/posthog-android/pull/149))

## 3.4.2 - 2024-06-28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ internal fun Activity.activityLabelOrName(config: PostHogAndroidConfig): String?
val applicationLabel = applicationInfo.loadLabel(packageManager).toString()

if (activityLabel.isNotEmpty() && activityLabel != applicationLabel) {
activityLabel
if (activityLabel == activityInfo.name) {
activityLabel.substringAfterLast('.')
} else {
activityLabel
}
} else {
activityInfo.name.substringAfterLast('.')
}
Expand Down

0 comments on commit 45d8b45

Please sign in to comment.