|
@@ -28,24 +28,17 @@ import java.security.Security
|
|
|
excludeMatchingSharedPreferencesKeys = [".*username.*", ".*password.*", ".*token.*"]
|
|
|
)
|
|
|
@AcraHttpSender(
|
|
|
- uri = "https://tachiyomi.kanade.eu/crash_report",
|
|
|
+ uri = BuildConfig.ACRA_URI,
|
|
|
httpMethod = HttpSender.Method.PUT
|
|
|
)
|
|
|
open class App : Application(), LifecycleObserver {
|
|
|
|
|
|
+ private val preferences: PreferencesHelper by injectLazy()
|
|
|
+
|
|
|
override fun onCreate() {
|
|
|
super.onCreate()
|
|
|
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
|
|
|
|
|
|
- // Debug tool; see https://fbflipper.com/
|
|
|
- // SoLoader.init(this, false)
|
|
|
- // if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
|
|
|
- // val client = AndroidFlipperClient.getInstance(this)
|
|
|
- // client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()))
|
|
|
- // client.addPlugin(DatabasesFlipperPlugin(this))
|
|
|
- // client.start()
|
|
|
- // }
|
|
|
-
|
|
|
// TLS 1.3 support for Android < 10
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
|
Security.insertProviderAt(Conscrypt.newProvider(), 1)
|
|
@@ -74,7 +67,6 @@ open class App : Application(), LifecycleObserver {
|
|
|
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
|
|
|
@Suppress("unused")
|
|
|
fun onAppBackgrounded() {
|
|
|
- val preferences: PreferencesHelper by injectLazy()
|
|
|
if (preferences.lockAppAfter().get() >= 0) {
|
|
|
SecureActivityDelegate.locked = true
|
|
|
}
|