mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
fix build
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:name=".Nostrsigner"
|
||||
android:name=".nostrsigner"
|
||||
android:allowBackup="false"
|
||||
android:configChanges="orientation|screenSize|screenLayout"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
||||
@@ -11,7 +11,7 @@ object EncryptedStorage {
|
||||
}
|
||||
|
||||
fun preferences(npub: String? = null): EncryptedSharedPreferences {
|
||||
val context = Nostrsigner.instance
|
||||
val context = nostrsigner.instance
|
||||
val masterKey: MasterKey = MasterKey.Builder(context, MasterKey.DEFAULT_MASTER_KEY_ALIAS)
|
||||
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
|
||||
.build()
|
||||
|
||||
@@ -86,7 +86,7 @@ object LocalPreferences {
|
||||
}
|
||||
|
||||
private val prefsDirPath: String
|
||||
get() = "${Nostrsigner.instance.filesDir.parent}/shared_prefs/"
|
||||
get() = "${nostrsigner.instance.filesDir.parent}/shared_prefs/"
|
||||
|
||||
private fun addAccount(npub: String) {
|
||||
val accounts = savedAccounts().toMutableList()
|
||||
@@ -135,7 +135,7 @@ object LocalPreferences {
|
||||
private fun encryptedPreferences(npub: String? = null): SharedPreferences {
|
||||
return if (BuildConfig.DEBUG && DEBUG_PLAINTEXT_PREFERENCES) {
|
||||
val preferenceFile = if (npub == null) DEBUG_PREFERENCES_NAME else "${DEBUG_PREFERENCES_NAME}_$npub"
|
||||
Nostrsigner.instance.getSharedPreferences(preferenceFile, Context.MODE_PRIVATE)
|
||||
nostrsigner.instance.getSharedPreferences(preferenceFile, Context.MODE_PRIVATE)
|
||||
} else {
|
||||
return EncryptedStorage.preferences(npub)
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@ package com.greenart7c3.nostrsigner
|
||||
|
||||
import android.app.Application
|
||||
|
||||
class Nostrsigner : Application() {
|
||||
class nostrsigner : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
instance = this
|
||||
}
|
||||
|
||||
companion object {
|
||||
lateinit var instance: Nostrsigner
|
||||
lateinit var instance: nostrsigner
|
||||
private set
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user