Skip to content

Commit

Permalink
Merge pull request #1975 from bugsnag/release/v6.2.0
Browse files Browse the repository at this point in the history
Release v6.2.0
  • Loading branch information
YingYing Chen committed Feb 8, 2024
2 parents 01f4fc3 + 6475446 commit 96c1d40
Show file tree
Hide file tree
Showing 27 changed files with 544 additions and 165 deletions.
28 changes: 28 additions & 0 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ steps:
command:
- "features/minimal"
- "--app=/app/build/fixture-minimal.apk"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_9"
- "--no-tunnel"
Expand All @@ -73,6 +75,8 @@ steps:
- "features/smoke_tests"
- "--tags=debug-safe"
- "--app=/app/build/fixture-debug.apk"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_9"
- "--no-tunnel"
Expand Down Expand Up @@ -102,6 +106,8 @@ steps:
command:
- "features/full_tests"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_7"
- "--no-tunnel"
Expand Down Expand Up @@ -133,6 +139,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_7"
- "--no-tunnel"
Expand Down Expand Up @@ -160,6 +168,8 @@ steps:
command:
- "features/full_tests"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_8"
- "--no-tunnel"
Expand Down Expand Up @@ -189,6 +199,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_8"
- "--no-tunnel"
Expand Down Expand Up @@ -218,6 +230,8 @@ steps:
command:
- "features/full_tests"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_9"
- "--no-tunnel"
Expand Down Expand Up @@ -249,6 +263,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_9"
- "--no-tunnel"
Expand Down Expand Up @@ -279,6 +295,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^a-k].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_10"
- "--no-tunnel"
Expand Down Expand Up @@ -309,6 +327,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_10"
- "--no-tunnel"
Expand Down Expand Up @@ -343,6 +363,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^a-k].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_11"
- "--no-tunnel"
Expand Down Expand Up @@ -373,6 +395,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_11"
- "--no-tunnel"
Expand Down Expand Up @@ -403,6 +427,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^a-k].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_13"
- "--no-tunnel"
Expand Down Expand Up @@ -433,6 +459,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_13"
- "--no-tunnel"
Expand Down
16 changes: 16 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_7"
- "--no-tunnel"
Expand Down Expand Up @@ -126,6 +128,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r19-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_8"
- "--no-tunnel"
Expand Down Expand Up @@ -155,6 +159,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_9"
- "--no-tunnel"
Expand Down Expand Up @@ -184,6 +190,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_10"
- "--no-tunnel"
Expand Down Expand Up @@ -214,6 +222,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_11"
- "--no-tunnel"
Expand Down Expand Up @@ -249,6 +259,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^a-k].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_12"
- "--no-tunnel"
Expand Down Expand Up @@ -280,6 +292,8 @@ steps:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_12"
- "--no-tunnel"
Expand Down Expand Up @@ -309,6 +323,8 @@ steps:
command:
- "features/smoke_tests"
- "--app=@build/fixture-r21-url.txt"
- "--app-activity=com.bugsnag.android.mazerunner.MainActivity"
- "--app-package=com.bugsnag.android.mazerunner"
- "--farm=bb"
- "--device=ANDROID_13"
- "--no-tunnel"
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 6.2.0 (2024-02-08)

### Enhancements

* `processImportance` is now included in the 'app' tab on the dashboard
[#1973](https://github.com/bugsnag/bugsnag-android/pull/1973)

* `bugsnag-plugin-android-exitinfo` now includes `exitReason` and `processImportance` in the `APP` tab on the dashboard
[#1968](https://github.com/bugsnag/bugsnag-android/pull/1968)

### Bug fixes

* Avoid any possibility of multiple conflicting native crash handlers or stack-unwinders running concurrently
[#1960](https://github.com/bugsnag/bugsnag-android/pull/1960)
* Metadata that includes non-finite doubles (NaN, +Infinity, -Infinity) are omitted instead of breaking serialization
[#1958](https://github.com/bugsnag/bugsnag-android/pull/1958)

## 6.1.0 (2023-12-05)

### Enhancements
Expand All @@ -9,7 +26,7 @@

### Bug fixes

* Updating existing feature flags no longer causes them to change location.
* Updating existing feature-flags flags no longer causes them to change location.
[#1940](https://github.com/bugsnag/bugsnag-android/pull/1940)
* Fixed possible NDK crash when constructing several concurrent `Client` instances
[#1950](https://github.com/bugsnag/bugsnag-android/pull/1950)
Expand Down
1 change: 1 addition & 0 deletions bugsnag-android-core/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>CyclomaticComplexMethod:AppDataCollector.kt$AppDataCollector$@SuppressLint("SwitchIntDef") @Suppress("DEPRECATION") private fun getProcessImportance(): String?</ID>
<ID>CyclomaticComplexMethod:ConfigInternal.kt$ConfigInternal$fun getConfigDifferences(): Map&lt;String, Any></ID>
<ID>ImplicitDefaultLocale:DeliveryHeaders.kt$String.format("%02x", byte)</ID>
<ID>LongParameterList:App.kt$App$( /** * The architecture of the running application binary */ var binaryArch: String?, /** * The package name of the application */ var id: String?, /** * The release stage set in [Configuration.releaseStage] */ var releaseStage: String?, /** * The version of the application set in [Configuration.version] */ var version: String?, /** The revision ID from the manifest (React Native apps only) */ var codeBundleId: String?, /** * The unique identifier for the build of the application set in [Configuration.buildUuid] */ var buildUuid: String?, /** * The application type set in [Configuration#version] */ var type: String?, /** * The version code of the application set in [Configuration.versionCode] */ var versionCode: Number? )</ID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.ActivityManager
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.os.Process
import androidx.test.core.app.ApplicationProvider
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
Expand Down Expand Up @@ -126,4 +127,84 @@ class AppDataCollectorTest {
val result = collector.getInstallerPackageName()
assertEquals("Test Installer name", result)
}

@Test
fun testGetProcessImportanceWithVersion29() = withBuildSdkInt(Build.VERSION_CODES.Q) {
val packageManager = mock(PackageManager::class.java)
`when`(packageManager.getApplicationLabel(any())).thenReturn("Test App name")
`when`(am.runningAppProcesses).thenReturn(
listOf(
ActivityManager.RunningAppProcessInfo().apply {
importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND
}
)
)

val collector = AppDataCollector(
context,
packageManager,
client.immutableConfig,
client.sessionTracker,
am,
client.launchCrashTracker,
client.memoryTrimState
)

val result = collector.getAppDataMetadata()["processImportance"]
assertEquals("foreground service", result)
}

@Test
fun testGetProcessImportanceWithVersion14() = withBuildSdkInt(Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
val packageManager = mock(PackageManager::class.java)
`when`(packageManager.getApplicationLabel(any())).thenReturn("Test App name")
`when`(am.runningAppProcesses).thenReturn(
listOf(
ActivityManager.RunningAppProcessInfo().apply {
importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND
pid = Process.myPid()
}
)
)

val collector = AppDataCollector(
context,
packageManager,
client.immutableConfig,
client.sessionTracker,
am,
client.launchCrashTracker,
client.memoryTrimState
)

val result = collector.getAppDataMetadata()["processImportance"]
assertEquals("foreground", result)
}

@Test
fun testGetProcessImportanceWithPid0() = withBuildSdkInt(Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
val packageManager = mock(PackageManager::class.java)
`when`(packageManager.getApplicationLabel(any())).thenReturn("Test App name")
`when`(am.runningAppProcesses).thenReturn(
listOf(
ActivityManager.RunningAppProcessInfo().apply {
importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND
pid = 0
}
)
)

val collector = AppDataCollector(
context,
packageManager,
client.immutableConfig,
client.sessionTracker,
am,
client.launchCrashTracker,
client.memoryTrimState
)

val result = collector.getAppDataMetadata()["processImportance"]
assertEquals(null, result)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void testAppDataCollection() {
public void testAppDataMetadata() {
client = generateClient();
Map<String, Object> app = client.getAppDataCollector().getAppDataMetadata();
assertEquals(10, app.size());
assertEquals(11, app.size());
assertEquals("Bugsnag Android Tests", app.get("name"));
assertEquals("com.bugsnag.android.core.test", app.get("processName"));
assertNotNull(app.get("memoryUsage"));
Expand Down
Loading

0 comments on commit 96c1d40

Please sign in to comment.