Skip to content

Commit

Permalink
Revert "Merge branch 'next' into master"
Browse files Browse the repository at this point in the history
This reverts commit 7cb69df, reversing
changes made to 0125a41.
  • Loading branch information
fractalwrench committed Oct 28, 2021
1 parent 8eaf7a7 commit 4b5d11b
Show file tree
Hide file tree
Showing 52 changed files with 198 additions and 216 deletions.
3 changes: 0 additions & 3 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ steps:
TEST_APK_LOCATION: 'bugsnag-android-core/build/outputs/apk/androidTest/debug/bugsnag-android-core-debug-androidTest.apk'
concurrency: 9
concurrency_group: 'browserstack-app'
# TODO remove when PLAT-7453 is complete
soft_fail:
- exit_status: "*"

- label: ':android: Android 5 NDK r16 end-to-end tests - batch 1'
depends_on:
Expand Down
15 changes: 3 additions & 12 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,10 @@ steps:
run: android-ci
env:
SINGLE_RUNNER: "true"
INSTRUMENTATION_DEVICES: '["Google Pixel 2-8.0"]'
INSTRUMENTATION_DEVICES: '["Google Pixel-7.1"]'
TEST_APK_LOCATION: 'bugsnag-android-core/build/outputs/apk/androidTest/debug/bugsnag-android-core-debug-androidTest.apk'
concurrency: 9
concurrency_group: 'browserstack-app'
# TODO remove when PLAT-7453 is complete
soft_fail:
- exit_status: "*"

- label: ':android: NDK Instrumentation tests'
key: 'ndk-instrumentation-tests'
Expand All @@ -184,13 +181,10 @@ steps:
run: android-ci
env:
SINGLE_RUNNER: "true"
INSTRUMENTATION_DEVICES: '["Google Pixel 2-8.0"]'
INSTRUMENTATION_DEVICES: '["Google Pixel-7.1"]'
TEST_APK_LOCATION: 'bugsnag-plugin-android-ndk/build/outputs/apk/androidTest/debug/bugsnag-plugin-android-ndk-debug-androidTest.apk'
concurrency: 9
concurrency_group: 'browserstack-app'
# TODO remove when PLAT-7453 is complete
soft_fail:
- exit_status: "*"

- label: ':android: Performance benchmarks'
key: 'perf-benchmarks'
Expand All @@ -203,13 +197,10 @@ steps:
run: android-ci
env:
SINGLE_RUNNER: "false"
INSTRUMENTATION_DEVICES: '["Google Pixel 2-8.0"]'
INSTRUMENTATION_DEVICES: '["Google Pixel-7.1"]'
TEST_APK_LOCATION: 'bugsnag-benchmarks/build/outputs/apk/androidTest/release/bugsnag-benchmarks-release-androidTest.apk'
concurrency: 9
concurrency_group: 'browserstack-app'
# TODO remove when PLAT-7453 is complete
soft_fail:
- exit_status: "*"

- label: ':android: Android 4.4 NDK r16 smoke tests'
key: 'android-4-4-smoke'
Expand Down
13 changes: 0 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# Changelog

## TBD

### Bug fixes

* Avoid reporting false-positive background ANRs with improved foreground detection
[#1429](https://github.com/bugsnag/bugsnag-android/pull/1429)

* Prevent events being attached to phantom sessions when they are blocked by an `OnSessionCallback`
[#1434](https://github.com/bugsnag/bugsnag-android/pull/1434)

* Plugins will correctly mirror metadata added using `addMetadata(String, Map)`
[#1454](https://github.com/bugsnag/bugsnag-android/pull/1454)

## 5.14.0 (2021-09-29)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"
#gem 'bugsnag-maze-runner', path: '../maze-runner'

# Or a specific release:
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v6.0.1'
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v5.0.1'


# Or follow master:
Expand Down
95 changes: 38 additions & 57 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
GIT
remote: https://github.com/bugsnag/maze-runner
revision: 2c334a7907ba78173e8436687cfb1765ad25a3c4
tag: v6.0.1
revision: 9aaf72b51c4f340f9d4901497752af70f526543f
tag: v5.0.1
specs:
bugsnag-maze-runner (6.0.1)
bugsnag-maze-runner (5.0.1)
appium_lib (~> 11.2.0)
cucumber (~> 7.1)
boring (~> 0.1.0)
cucumber (~> 3.1.2)
cucumber-expressions (~> 6.0.0)
curb (~> 0.9.6)
gherkin (~> 5.1.0)
minitest (~> 5.0)
optimist (~> 3.0.1)
os (~> 1.0.0)
rake (~> 12.3.3)
rubyzip (~> 2.3.2)
selenium-webdriver (~> 3.11)
test-unit (~> 3.3.0)
webrick (~> 1.7.0)

GEM
remote: https://rubygems.org/
Expand All @@ -24,94 +24,75 @@ GEM
appium_lib_core (~> 4.1)
nokogiri (~> 1.8, >= 1.8.1)
tomlrb (~> 1.1)
appium_lib_core (4.7.1)
appium_lib_core (4.5.0)
faye-websocket (~> 0.11.0)
selenium-webdriver (~> 3.14, >= 3.14.1)
backports (3.21.0)
boring (0.1.0)
builder (3.2.4)
childprocess (3.0.0)
cucumber (7.1.0)
builder (~> 3.2, >= 3.2.4)
cucumber-core (~> 10.1, >= 10.1.0)
cucumber-create-meta (~> 6.0, >= 6.0.1)
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
cucumber-gherkin (~> 22.0, >= 22.0.0)
cucumber-html-formatter (~> 17.0, >= 17.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-wire (~> 6.2, >= 6.2.0)
diff-lcs (~> 1.4, >= 1.4.4)
mime-types (~> 3.3, >= 3.3.1)
multi_test (~> 0.1, >= 0.1.2)
sys-uname (~> 1.2, >= 1.2.2)
cucumber-core (10.1.0)
cucumber-gherkin (~> 22.0, >= 22.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-tag-expressions (~> 4.0, >= 4.0.2)
cucumber-create-meta (6.0.2)
cucumber-messages (~> 17.1, >= 17.1.1)
sys-uname (~> 1.2, >= 1.2.2)
cucumber-cucumber-expressions (14.0.0)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.2.1)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (~> 5.0)
cucumber-expressions (6.0.1)
cucumber-gherkin (22.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-html-formatter (17.0.0)
cucumber-messages (~> 17.1, >= 17.1.0)
cucumber-messages (17.1.1)
cucumber-tag-expressions (4.1.0)
cucumber-wire (6.2.0)
cucumber-core (~> 10.1, >= 10.1.0)
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
curb (0.9.11)
diff-lcs (1.4.4)
eventmachine (1.2.7)
faye-websocket (0.11.1)
faye-websocket (0.11.0)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
ffi (1.15.4)
license_finder (6.14.1)
gherkin (5.1.0)
license_finder (6.13.0)
bundler
rubyzip (>= 1, < 3)
thor (~> 1.0.1)
tomlrb (>= 1.3, < 2.1)
with_env (= 1.1.0)
xml-simple (~> 1.1.5)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0901)
mini_portile2 (2.5.0)
minitest (5.14.4)
multi_json (1.15.0)
multi_test (0.1.2)
nokogiri (1.12.5-x86_64-darwin)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
optimist (3.0.1)
os (1.0.1)
power_assert (2.0.1)
racc (1.6.0)
power_assert (2.0.0)
racc (1.5.2)
rake (12.3.3)
rexml (3.2.5)
rubyzip (2.3.2)
rubyzip (2.3.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sys-uname (1.2.2)
ffi (~> 1.1)
test-unit (3.3.9)
power_assert
thor (1.0.1)
tomlrb (1.3.0)
webrick (1.7.0)
websocket-driver (0.7.5)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
with_env (1.1.0)
xml-simple (1.1.9)
rexml
xml-simple (1.1.8)

PLATFORMS
x86_64-darwin-19
ruby

DEPENDENCIES
bugsnag-maze-runner!
license_finder (~> 6.13)

BUNDLED WITH
2.2.20
2.2.13
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ endif
TEST_FIXTURE_NDK_VERSION ?= 16.1.4479499
test-fixtures:
# Build the notifier
@./gradlew -PVERSION_NAME=9.9.9 assembleRelease publishToMavenLocal -x check
@./gradlew -PVERSION_NAME=9.9.9 clean assembleRelease publishToMavenLocal

# Build the full test fixture
@./gradlew -PTEST_FIXTURE_NDK_VERSION=$(TEST_FIXTURE_NDK_VERSION) -p=features/fixtures/mazerunner/ assembleRelease -x check
@./gradlew -PTEST_FIXTURE_NDK_VERSION=$(TEST_FIXTURE_NDK_VERSION) -p=features/fixtures/mazerunner/ assembleRelease
@cp features/fixtures/mazerunner/app/build/outputs/apk/release/fixture.apk build/fixture.apk

# And the minimal (no NDK or ANR plugin) test fixture
@./gradlew -PMINIMAL_FIXTURE=true -PTEST_FIXTURE_NAME=fixture-minimal.apk -p=features/fixtures/mazerunner/ assembleRelease -x check
@./gradlew -PMINIMAL_FIXTURE=true -PTEST_FIXTURE_NAME=fixture-minimal.apk -p=features/fixtures/mazerunner/ assembleRelease
@cp features/fixtures/mazerunner/app/build/outputs/apk/release/fixture-minimal.apk build/fixture-minimal.apk

bump:
Expand Down
2 changes: 1 addition & 1 deletion bugsnag-android-core/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ID>LongParameterList:AppWithState.kt$AppWithState$( binaryArch: String?, id: String?, releaseStage: String?, version: String?, codeBundleId: String?, buildUuid: String?, type: String?, versionCode: Number?, /** * The number of milliseconds the application was running before the event occurred */ var duration: Number?, /** * The number of milliseconds the application was running in the foreground before the * event occurred */ var durationInForeground: Number?, /** * Whether the application was in the foreground when the event occurred */ var inForeground: Boolean?, /** * Whether the application was launching when the event occurred */ var isLaunching: Boolean? )</ID>
<ID>LongParameterList:AppWithState.kt$AppWithState$( config: ImmutableConfig, binaryArch: String?, id: String?, releaseStage: String?, version: String?, codeBundleId: String?, duration: Number?, durationInForeground: Number?, inForeground: Boolean?, isLaunching: Boolean? )</ID>
<ID>LongParameterList:DataCollectionModule.kt$DataCollectionModule$( contextModule: ContextModule, configModule: ConfigModule, systemServiceModule: SystemServiceModule, trackerModule: TrackerModule, bgTaskService: BackgroundTaskService, connectivity: Connectivity, deviceId: String?, memoryTrimState: MemoryTrimState )</ID>
<ID>LongParameterList:Device.kt$Device$( buildInfo: DeviceBuildInfo, /** * The Application Binary Interface used */ var cpuAbi: Array&lt;String>?, /** * Whether the device has been jailbroken */ var jailbroken: Boolean?, /** * A UUID generated by Bugsnag and used for the individual application on a device */ var id: String?, /** * The IETF language tag of the locale used */ var locale: String?, /** * The total number of bytes of memory on the device */ var totalMemory: Long?, /** * A collection of names and their versions of the primary languages, frameworks or * runtimes that the application is running on */ runtimeVersions: MutableMap&lt;String, Any>? )</ID>
<ID>LongParameterList:Device.kt$Device$( buildInfo: DeviceBuildInfo, /** * The Application Binary Interface used */ var cpuAbi: Array&lt;String>?, /** * Whether the device has been jailbroken */ var jailbroken: Boolean?, /** * A UUID generated by Bugsnag and used for the individual application on a device */ var id: String?, /** * The IETF language tag of the locale used */ var locale: String?, /** * The total number of bytes of memory on the device */ var totalMemory: Long?, /** * A collection of names and their versions of the primary languages, frameworks or * runtimes that the application is running on */ var runtimeVersions: MutableMap&lt;String, Any>? )</ID>
<ID>LongParameterList:DeviceBuildInfo.kt$DeviceBuildInfo$( val manufacturer: String?, val model: String?, val osVersion: String?, val apiLevel: Int?, val osBuild: String?, val fingerprint: String?, val tags: String?, val brand: String?, val cpuAbis: Array&lt;String>? )</ID>
<ID>LongParameterList:DeviceDataCollector.kt$DeviceDataCollector$( private val connectivity: Connectivity, private val appContext: Context, resources: Resources, private val deviceId: String?, private val buildInfo: DeviceBuildInfo, private val dataDirectory: File, rootDetector: RootDetector, private val bgTaskService: BackgroundTaskService, private val logger: Logger )</ID>
<ID>LongParameterList:DeviceWithState.kt$DeviceWithState$( buildInfo: DeviceBuildInfo, jailbroken: Boolean?, id: String?, locale: String?, totalMemory: Long?, runtimeVersions: MutableMap&lt;String, Any>, /** * The number of free bytes of storage available on the device */ var freeDisk: Long?, /** * The number of free bytes of memory available on the device */ var freeMemory: Long?, /** * The orientation of the device when the event occurred: either portrait or landscape */ var orientation: String?, /** * The timestamp on the device when the event occurred */ var time: Date? )</ID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ open class Device internal constructor(
* A collection of names and their versions of the primary languages, frameworks or
* runtimes that the application is running on
*/
runtimeVersions: MutableMap<String, Any>?
var runtimeVersions: MutableMap<String, Any>?
) : JsonStream.Streamable {

/**
Expand All @@ -59,11 +59,6 @@ open class Device internal constructor(
*/
var osVersion: String? = buildInfo.osVersion

var runtimeVersions: MutableMap<String, Any>? = sanitizeRuntimeVersions(runtimeVersions)
set(value) {
field = sanitizeRuntimeVersions(value)
}

internal open fun serializeFields(writer: JsonStream) {
writer.name("cpuAbi").value(cpuAbi)
writer.name("jailbroken").value(jailbroken)
Expand All @@ -82,7 +77,4 @@ open class Device internal constructor(
serializeFields(writer)
writer.endObject()
}

private fun sanitizeRuntimeVersions(value: MutableMap<String, Any>?): MutableMap<String, Any>? =
value?.mapValuesTo(mutableMapOf()) { (_, value) -> value.toString() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

class ForegroundDetector {

private static final int IMPORTANCE_FOREGROUND_SERVICE = 125;

@Nullable
private final ActivityManager activityManager;

Expand All @@ -38,7 +36,8 @@ Boolean isInForeground() {
ActivityManager.RunningAppProcessInfo info = getProcessInfo();

if (info != null) {
return info.importance <= IMPORTANCE_FOREGROUND_SERVICE;
return info.importance
<= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
} else {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ internal data class MetadataState(val metadata: Metadata = Metadata()) :

private fun notifyMetadataAdded(section: String, value: Map<String, Any?>) {
value.entries.forEach {
updateState { AddMetadata(section, it.key, metadata.getMetadata(section, it.key)) }
updateState { AddMetadata(section, it.key, metadata.getMetadata(it.key)) }
}
}
}
Loading

0 comments on commit 4b5d11b

Please sign in to comment.