Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Commit

Permalink
Remove bugsnag, don't need it for this project anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Oct 4, 2021
1 parent ef19d59 commit 58aa669
Show file tree
Hide file tree
Showing 42 changed files with 19 additions and 309 deletions.
7 changes: 0 additions & 7 deletions PRIVACY_POLICY_GPLAY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,4 @@ The app neither collects nor shares any data.
If the user wants it, the app can acquire a wakelock for the duration of a phone call.
To know when a phone call begins and when it ends it requires the permission `READ_PHONE_STATE`.

I make use of "Bugsnag" to track app crashes: https://www.bugsnag.com/

Bugsnag's privacy policy can be found here: https://docs.bugsnag.com/legal/privacy-policy/

Automatic crash tracking requires the `INTERNET` permission.
Crash tracking can be disabled via settings.

If you have further questions, just send me a mail.
22 changes: 0 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
apply plugin: 'com.android.application'
apply plugin: "com.bugsnag.android.gradle"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "kotlin-kapt"

def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("GMT+1"))

bugsnag {
overwrite = true
}

android {
def packageName = "eu.thedarken.wldonate"

Expand All @@ -30,13 +25,6 @@ android {

compileSdkVersion buildConfig.compileSdk

Properties bugsnagProps = new Properties()
def bugsnagPropsFile = new File(System.properties['user.home'], ".appconfig/${packageName}/bugsnag.properties")
if (bugsnagPropsFile.canRead()) {
println("Reading $bugsnagPropsFile")
bugsnagProps.load(new FileInputStream(bugsnagPropsFile))
}

defaultConfig {
applicationId "${packageName}"

Expand All @@ -51,18 +39,13 @@ android {

testInstrumentationRunner "${packageName}.ExampleTestRunner"

manifestPlaceholders = [apikey_bugsnag: bugsnagProps.getProperty("bugsnag.apikey", "")]

vectorDrawables.useSupportLibrary = true
}
lintOptions {
abortOnError false
ignore 'CheckResult'
}
buildTypes {
debug {
ext.enableBugsnag = false
}
release {
if (signingConfigs.hasProperty('release')) signingConfig signingConfigs.release
minifyEnabled false
Expand Down Expand Up @@ -99,11 +82,6 @@ dependencies {
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'

// Crashtracking
implementation ('com.bugsnag:bugsnag-android:5.2.1') {
exclude group: 'com.bugsnag', module: 'bugsnag-plugin-android-ndk'
}

// MVP lib
implementation 'eu.darken.mvpbakery:library:0.7.1'

Expand Down
4 changes: 0 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,5 @@
android:name="android.appwidget.provider"
android:resource="@xml/widget_toggle_info" />
</receiver>

<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="${apikey_bugsnag}" />
</application>
</manifest>
43 changes: 18 additions & 25 deletions app/src/main/java/eu/thedarken/wldonate/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ import android.app.Service
import android.content.BroadcastReceiver
import android.content.Intent
import androidx.appcompat.app.AppCompatDelegate
import com.bugsnag.android.Bugsnag
import com.bugsnag.android.Configuration
import eu.darken.mvpbakery.injection.ComponentSource
import eu.darken.mvpbakery.injection.ManualInjector
import eu.darken.mvpbakery.injection.activity.HasManualActivityInjector
import eu.darken.mvpbakery.injection.broadcastreceiver.HasManualBroadcastReceiverInjector
import eu.darken.mvpbakery.injection.service.HasManualServiceInjector
import eu.thedarken.wldonate.common.UUIDToken
import eu.thedarken.wldonate.common.timber.BugsnagErrorHandler
import eu.thedarken.wldonate.common.timber.BugsnagTree
import eu.thedarken.wldonate.main.core.GeneralSettings
import eu.thedarken.wldonate.main.core.receiver.LockCommandReceiver
import eu.thedarken.wldonate.main.core.service.ServiceController
Expand All @@ -27,44 +23,41 @@ import javax.inject.Inject
open class App : Application(), HasManualActivityInjector, HasManualBroadcastReceiverInjector, HasManualServiceInjector {

lateinit var activityInjector: ManualInjector<Activity>
@Inject lateinit var appComponent: AppComponent
@Inject lateinit var receiverInjector: ComponentSource<BroadcastReceiver>
@Inject lateinit var serviceInjector: ComponentSource<Service>

@Inject
lateinit var appComponent: AppComponent

@Inject
lateinit var receiverInjector: ComponentSource<BroadcastReceiver>

@Inject
lateinit var serviceInjector: ComponentSource<Service>

// No touchy! Needs to be initialized such that they sub to the lock-controller.
@Suppress("unused")
@Inject lateinit var serviceController: ServiceController
@Inject
lateinit var serviceController: ServiceController

@Suppress("unused")
@Inject lateinit var widgetController: WidgetController
@Inject
lateinit var widgetController: WidgetController

@Inject lateinit var settings: GeneralSettings
@Inject lateinit var uuidToken: UUIDToken
@Inject
lateinit var settings: GeneralSettings

@Inject
lateinit var uuidToken: UUIDToken

override fun onCreate() {
super.onCreate()

if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())

val bugsnagTree = BugsnagTree()
Timber.plant(bugsnagTree)

DaggerAppComponent.builder()
.androidModule(AndroidModule(this))
.build()
.injectMembers(this)

Configuration.load(this)
.apply {
setUser(uuidToken.id(), null, null)
autoTrackSessions = true
addOnError(BugsnagErrorHandler(settings, bugsnagTree))
}
.also {
Bugsnag.start(this, it)
Timber.i("Bugsnag setup done!")
}

val originalHandler = Thread.getDefaultUncaughtExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler { thread, error ->
Timber.e(error, "$thread threw and uncaught exception")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import javax.inject.Inject
class GeneralSettings @Inject constructor(@ApplicationContext val context: Context) {
companion object {
const val PREF_NAME = "settings_core"
const val PREF_KEY_BUGTRACKING_ENABLED = "core.bugtracking.enabled"
const val PREF_KEY_SHOW_ONBOARDING = "core.onboarding.show"
const val PREF_KEY_LEGACYUSER = "core.legacyuser"
const val PREF_KEY_SAVED_LOCKS = "core.locks.saved"
Expand Down Expand Up @@ -74,8 +73,4 @@ class GeneralSettings @Inject constructor(@ApplicationContext val context: Conte
fun isAutostartCallEnabled(): Boolean {
return preferences.getBoolean(PREF_KEY_AUTOSTART_CALL, false)
}

fun isBugTrackingEnabled(): Boolean {
return preferences.getBoolean(PREF_KEY_BUGTRACKING_ENABLED, true)
}
}
10 changes: 0 additions & 10 deletions app/src/main/res/drawable/ic_bug_report_white_24dp.xml

This file was deleted.

2 changes: 0 additions & 2 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
<string name="label_privacy_policy">سياسة الخصوصية</string>
<string name="description_darken">الرجل الذي كتب هذا التطبيق.</string>
<string name="description_privacy_policy">ماذا يحدث مع البيانات الخاصة بك (تلميح: لا شيء).</string>
<string name="label_bugreporting">التبليغ عن أخطاء</string>
<string name="msg_thank_you">شكرا لك</string>
<string name="description_icon_thanks_max_patchs">شكرا لماكس باتشز على الأيقونات الرائعة.</string>
<string name="description_bugreporting">التبليغ التلقائي عن المشاكل للمساعدة في حلها أسرع.</string>
<string name="label_call_autostart">التشغيل التلقائي أثناء المكالمات</string>
<string name="description_call_autostart">الحصول على الأقفال المحددة فقط أثناء المكالمات.</string>
<plurals name="x_locks_acquired">
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@
<string name="label_privacy_policy">Gizlilik siyasəti</string>
<string name="description_darken">Bu tətbiqi yazan şəxs.</string>
<string name="description_privacy_policy">Verilənlərinizdə nə baş verir (məsləhət: heç nə).</string>
<string name="label_bugreporting">Xəta hesabatı</string>
<string name="msg_thank_you">Təşəkkürlər</string>
<string name="description_icon_thanks_max_patchs">Möhtəşəm nişanlar üçün \"Max Patchs\"a təşəkkürlər.</string>
<string name="description_bugreporting">Problemlərin daha tez həll olmasına kömək etmək üçün avtomatik xəta hesabatı.</string>
<string name="label_call_autostart">Zənglər əsnasında avto-başlatma</string>
<string name="description_call_autostart">Seçilmiş oyanmaları yalnız zəng əsnasında əldə edin.</string>
<plurals name="x_locks_acquired">
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
<string name="label_privacy_policy">Política de privadesa</string>
<string name="description_darken">El noi que va escriure aquesta aplicació.</string>
<string name="description_privacy_policy">Què passa amb les vostres dades (pista: res).</string>
<string name="label_bugreporting">Informes d\'error</string>
<string name="msg_thank_you">Gràcies</string>
<string name="description_icon_thanks_max_patchs">Gràcies a Max Patches per les meravelloses icones.</string>
<string name="description_bugreporting">Informe automàtic d\'errors per ajudar a corregir problemes més ràpid.</string>
<string name="label_call_autostart">Inici automàtic durant les trucades</string>
<string name="description_call_autostart">Aconsegueix els bloquejos d\'activacions seleccionats només durant les trucades.</string>
<plurals name="x_locks_acquired">
Expand Down
Loading

0 comments on commit 58aa669

Please sign in to comment.