Skip to content

Commit

Permalink
Remove bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Sep 11, 2023
1 parent 3920489 commit d8fb9cd
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 238 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}

- name: Assemble production APK
if: "!contains(steps.tagger.outputs.tag, '-beta')"
Expand All @@ -58,7 +57,6 @@ jobs:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}

- name: Create pre-release
if: contains(steps.tagger.outputs.tag, '-beta')
Expand Down Expand Up @@ -145,7 +143,6 @@ jobs:
# STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
# KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
# KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
# BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}

- name: Assemble beta and upload to Google Play
if: contains(steps.tagger.outputs.tag, '-beta')
Expand All @@ -154,7 +151,6 @@ jobs:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}

# - name: Assemble WearOS production and upload to Google Play
# if: "!contains(steps.tagger.outputs.tag, '-beta')"
Expand All @@ -163,13 +159,11 @@ jobs:
# STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
# KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
# KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
# BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}

- name: Assemble production and upload to Google Play
if: "!contains(steps.tagger.outputs.tag, '-beta')"
run: bundle exec fastlane production
env:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
12 changes: 9 additions & 3 deletions PRIVACY_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ On Android 12+ the newer and more fine grained `BLUETOOTH_SCAN` permission is us

Bluetooth Low Energy is a technology that devices like AirPods use to communicate their status to nearby devices.
CAPod requests location permissions because these permissions are required to work with Bluetooth Low Energy data.
This is a privacy measure on Android's side because you could determine someones location by scanning for Bluetooth devices:
If you know the physical location of a Bluetooth device (e.g. AirTags) you could use Bluetooth data to calculate your position.
This is a privacy measure on Android's side because you could determine someones location by scanning for Bluetooth
devices:
If you know the physical location of a Bluetooth device (e.g. AirTags) you could use Bluetooth data to calculate your
position.

### Location access in the background

CAPod uses the "location access in the background" permission (`ACCESS_BACKGROUND_LOCATION`) on Android 11 and older to receive Bluetooth Low Energy data while the app is in the background. This permission enables the "Show popup" and "Autoconnect" features and allows CAPod to react to nearby devices whil the app is closed.
CAPod uses the "location access in the background" permission (`ACCESS_BACKGROUND_LOCATION`) on Android 11 and older to
receive Bluetooth Low Energy data while the app is in the background. This permission enables the "Show popup" and "
Autoconnect" features and allows CAPod to react to nearby devices whil the app is closed.

## Automatic error reports

*This was removed in v2.11.0+*

If an error occurs, an automated report may be sent to help me fix the issue.

This is optional and you can opt out of this in the settings.
Expand Down
7 changes: 0 additions & 7 deletions app-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ android {
buildConfigField("String", "APPLICATION_ID", "\"${ProjectConfig.packageName}\"")
buildConfigField("String", "GITSHA", "\"${lastCommitHash()}\"")
buildConfigField("String", "BUILDTIME", "\"${buildTime()}\"")

manifestPlaceholders["bugsnagApiKey"] = getBugSnagApiKey(
File(System.getProperty("user.home"), ".appconfig/${ProjectConfig.packageName}/bugsnag.properties")
) ?: "bugsnag_apikey_placeholder"
}

buildFeatures {
Expand Down Expand Up @@ -100,7 +96,4 @@ dependencies {

addTesting()

"gplayImplementation"("com.bugsnag:bugsnag-android:5.9.2")
"gplayImplementation"("com.getkeepsafe.relinker:relinker:1.4.3")

}
6 changes: 2 additions & 4 deletions app-common/src/gplay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>

<application>
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="${bugsnagApiKey}" />

</application>

</manifest>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,22 @@ package eu.darken.capod.debug.autoreport

import android.app.Application
import android.content.Context
import com.bugsnag.android.Bugsnag
import com.bugsnag.android.Configuration
import com.getkeepsafe.relinker.ReLinker
import dagger.hilt.android.qualifiers.ApplicationContext
import eu.darken.capod.common.BuildConfigWrap
import eu.darken.capod.common.InstallId
import eu.darken.capod.common.debug.Bugs
import eu.darken.capod.common.debug.DebugSettings
import eu.darken.capod.common.debug.autoreport.AutomaticBugReporter
import eu.darken.capod.common.debug.logging.Logging
import eu.darken.capod.common.debug.logging.Logging.Priority.WARN
import eu.darken.capod.common.debug.logging.log
import eu.darken.capod.common.debug.logging.logTag
import javax.inject.Inject
import javax.inject.Provider
import javax.inject.Singleton

@Singleton
class GplayAutoReporting @Inject constructor(
@ApplicationContext private val context: Context,
private val debugSettings: DebugSettings,
private val installId: InstallId,
private val bugsnagLogger: Provider<BugsnagLogger>,
private val bugsnagErrorHandler: Provider<BugsnagErrorHandler>,
private val nopBugsnagErrorHandler: Provider<NOPBugsnagErrorHandler>,
) : AutomaticBugReporter {

override fun setup(application: Application) {
Expand All @@ -34,35 +26,13 @@ class GplayAutoReporting @Inject constructor(

if (!isEnabled) return

ReLinker
.log { message -> log(TAG) { "ReLinker: $message" } }
.loadLibrary(application, "bugsnag-plugin-android-anr")
// Currently no 3rd party bug tracking

try {
val bugsnagConfig = Configuration.load(context).apply {
if (debugSettings.isAutoReportingEnabled.value) {
Logging.install(bugsnagLogger.get())
setUser(installId.id, null, null)
autoTrackSessions = true
addOnError(bugsnagErrorHandler.get())
addMetadata("App", "buildFlavor", BuildConfigWrap.FLAVOR)
log(TAG) { "Bugsnag setup done!" }
} else {
autoTrackSessions = false
addOnError(nopBugsnagErrorHandler.get())
log(TAG) { "Installing Bugsnag NOP error handler due to user opt-out!" }
}
}

Bugsnag.start(context, bugsnagConfig)
Bugs.reporter = this
} catch (e: IllegalStateException) {
log(TAG) { "Bugsnag API Key not configured." }
}
Bugs.reporter = this
}

override fun notify(throwable: Throwable) {
Bugsnag.notify(throwable)
log(TAG, WARN) { "notify($throwable)" }
}

companion object {
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions app-wear/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ android {
create("gplay") {
dimension = "version"
signingConfig = signingConfigs["releaseGplay"]
extra["useBugsnag"] = true
}
}

setupBugsnagPlugin()

buildTypes {
val customProguardRules = fileTree(File("../proguard")) {
include("*.pro")
Expand Down Expand Up @@ -141,7 +138,4 @@ dependencies {

implementation("androidx.wear:wear:1.2.0")
implementation("androidx.wear.tiles:tiles-material:1.1.0")

"gplayImplementation"("com.bugsnag:bugsnag-android:5.9.2")
"gplayImplementation"("com.getkeepsafe.relinker:relinker:1.4.3")
}
6 changes: 0 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ android {
create("gplay") {
dimension = "version"
signingConfig = signingConfigs["releaseGplay"]
extra["useBugsnag"] = true
}
}

setupBugsnagPlugin()

buildTypes {
val customProguardRules = fileTree(File(projectDir, "proguard")) {
include("*.pro")
Expand Down Expand Up @@ -150,7 +147,4 @@ dependencies {

"gplayImplementation"("com.android.billingclient:billing:5.1.0")
"gplayImplementation"("com.android.billingclient:billing-ktx:5.1.0")

"gplayImplementation"("com.bugsnag:bugsnag-android:5.9.2")
"gplayImplementation"("com.getkeepsafe.relinker:relinker:1.4.3")
}
9 changes: 0 additions & 9 deletions app/src/main/res/xml/preferences_acknowledgements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
<PreferenceCategory
android:title="@string/settings_licenses_label"
app:iconSpaceReserved="false">
<Preference
android:key="license.bugsnag"
android:summary="Client side library for crash monitoring via bugsnag.com. (MIT)"
android:title="Bugsnag"
app:iconSpaceReserved="false">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/bugsnag/bugsnag-android" />
</Preference>
<Preference
android:key="license.glide"
android:summary="An image loading and caching library for Android focused on smooth scrolling. (Multiple licenses)"
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ buildscript {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin.core}")
classpath("com.google.dagger:hilt-android-gradle-plugin:${Versions.Dagger.core}")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.AndroidX.Navigation.core}")
classpath("com.bugsnag:bugsnag-android-gradle-plugin:7.2.1")
}
}

Expand Down
Loading

0 comments on commit d8fb9cd

Please sign in to comment.