Skip to content

Commit

Permalink
remove Singleton annotation from providesSharedPreferences
Browse files Browse the repository at this point in the history
  • Loading branch information
connyduck committed May 13, 2024
1 parent 98afd26 commit a876d38
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package com.keylesspalace.tusky

import android.app.Application
import android.content.SharedPreferences
import android.os.StrictMode
import android.util.Log
import androidx.hilt.work.HiltWorkerFactory
import androidx.work.Configuration
Expand Down Expand Up @@ -56,15 +57,13 @@ class TuskyApplication : Application(), Configuration.Provider {

override fun onCreate() {
// Uncomment me to get StrictMode violation logs
// if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
// StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder()
// .detectDiskReads()
// .detectDiskWrites()
// .detectNetwork()
// .detectUnbufferedIo()
// .penaltyLog()
// .build())
// }
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
StrictMode.setThreadPolicy(
StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.build())
}
super.onCreate()

Security.insertProviderAt(Conscrypt.newProvider(), 1)
Expand Down

0 comments on commit a876d38

Please sign in to comment.