Skip to content

Commit 49c0935

Browse files
authored
PLAT-9086 inaccurate Session.Handled and Unhandled counts on android (#684)
* PLAT-9086 inaccurate Session.Handled and Unhandled counts on android * changelog
1 parent 481546c commit 49c0935

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
* Fix an issue where android metadata was not deserialised as the correct type, which could cause exceptions when processing metadata. [#652](https://github.com/bugsnag/bugsnag-unity/pull/652)
3636

37+
* Fix an issue where android sessions had inaccurate Session.Handled and Unhandled counts. [#684](https://github.com/bugsnag/bugsnag-unity/pull/684)
38+
3739
## 7.4.0 (2022-10-26)
3840

3941
### Dependency updates

features/csharp/csharp_sessions.feature

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Feature: Session Tracking
9898
And the session "user.email" is null
9999
And the session "user.name" is null
100100

101-
@skip_android #pending PLAT-9086
102101
Scenario: Multiple event counts in one session
103102
When I run the game in the "MultipleEventCounts" state
104103
And I wait to receive a session
@@ -124,7 +123,6 @@ Feature: Session Tracking
124123
And the exception "message" equals "PausedSessionEvent"
125124
And the event "session" is null
126125

127-
@skip_android #pending PLAT-9086
128126
Scenario: When a session is resumed the error uses the previous session information
129127
When I run the game in the "ResumedSession" state
130128
And I wait to receive a session
@@ -146,7 +144,6 @@ Feature: Session Tracking
146144
And the error payload field "session.startedAt" equals the stored value "session_startedAt"
147145
And the error payload field "events.0.session.events.handled" equals 2
148146

149-
@skip_android #pending PLAT-9086
150147
Scenario: When a new session is started the error uses different session information
151148
When I run the game in the "NewSession" state
152149
And I wait to receive 2 sessions

src/BugsnagUnity/Native/Android/NativeInterface.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public Session GetCurrentSession()
595595
var timeLong = AndroidJNI.CallLongMethod(javaStartedAt, AndroidJNIHelper.GetMethodID(DateClass, "getTime"), new jvalue[] { });
596596
var unityDateTime = new DateTime(1970, 1, 1).AddMilliseconds(timeLong);
597597

598-
return new Session(id, unityDateTime, unhandledCount, handledCount);
598+
return new Session(id, unityDateTime, handledCount, unhandledCount );
599599

600600
}
601601

0 commit comments

Comments
 (0)