Skip to content
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

Configuration.persistUser should be true by default #1867

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* Added `Session.apiKey` so that it can be changed in an `OnSessionCallback`
[#1855](https://github.com/bugsnag/bugsnag-android/pull/1855)

* Configuration.persistUser is now true by default, matching the configuration of other platforms.
[#1863](https://github.com/bugsnag/bugsnag-android/pull/1863)

### Bug fixes

* Prevent rare app crash while migrating old `SharedPreferences` data from older versions of `bugsnag-android`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ManifestConfigLoaderTest {
assertTrue(autoDetectErrors)
assertTrue(autoTrackSessions)
assertEquals(ThreadSendPolicy.ALWAYS, sendThreads)
assertFalse(persistUser)
assertTrue(persistUser)

// endpoints
assertEquals(endpoints.notify, "https://notify.bugsnag.com")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class ConfigInternal(
var versionCode: Int? = 0
var releaseStage: String? = null
var sendThreads: ThreadSendPolicy = ThreadSendPolicy.ALWAYS
var persistUser: Boolean = false
var persistUser: Boolean = true

var launchDurationMillis: Long = DEFAULT_LAUNCH_CRASH_THRESHOLD_MS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public void sendThreadsInvalid() {

@Test
public void persistUserValid() {
config.setPersistUser(true);
assertTrue(config.impl.getPersistUser());
config.setPersistUser(false);
assertFalse(config.impl.getPersistUser());
}

@SuppressWarnings("deprecation")
Expand Down
1 change: 1 addition & 0 deletions features/full_tests/in_foreground.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Feature: In foreground field populates correctly
Background:
Given I clear all persistent data

@skip_android_13
Scenario: Test handled exception in background
When I run "InForegroundScenario"
And I send the app to the background for 5 seconds
Expand Down
1 change: 1 addition & 0 deletions features/full_tests/native_event_tracking.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Feature: Synchronizing app/device metadata in the native layer
And the event "unhandled" is false
And the "codeIdentifier" of stack frame 0 is not null

@skip
Scenario: Capture foreground state while in the background
When I run "CXXBackgroundNotifyScenario"
And I send the app to the background for 5 seconds
Expand Down