Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshpaliyal committed Aug 13, 2023
1 parent 3e70bdd commit 8babe42
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 253 deletions.

This file was deleted.

This file was deleted.

162 changes: 0 additions & 162 deletions common/src/androidTest/java/com/yogeshpaliyal/keypass/FakeKeyStore.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package com.yogeshpaliyal.keypass

import android.content.Context
import androidx.datastore.preferences.core.edit
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.yogeshpaliyal.common.data.DEFAULT_PASSWORD_LENGTH
import com.yogeshpaliyal.common.data.UserSettings
import com.yogeshpaliyal.common.utils.clearBackupKey
import com.yogeshpaliyal.common.utils.dataStore
import com.yogeshpaliyal.common.utils.getUserSettings
import com.yogeshpaliyal.common.utils.setDefaultPasswordLength
import com.yogeshpaliyal.common.utils.setKeyPassPassword
import com.yogeshpaliyal.common.utils.setUserSettings
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.junit.After
import org.junit.Assert.assertEquals
Expand All @@ -28,10 +24,6 @@ class SharedPreferenceUtilsTest {
@Before
fun setup() {
context = ApplicationProvider.getApplicationContext()
FakeAndroidKeyStoreProvider.setup()
runBlocking {
context.setUserSettings(UserSettings())
}
}

@Test
Expand All @@ -48,7 +40,6 @@ class SharedPreferenceUtilsTest {
assertEquals(expectedLength, result)
}


@Test
fun getKeyPassPassword() = runBlocking {
val result = context.getUserSettings().keyPassPassword
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class CommonMyApplication : Application(), Configuration.Provider {
val previewExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
val intent = getCrashActivityIntent(throwable)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
startActivity(intent)
previewExceptionHandler?.uncaughtException(thread, throwable)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.yogeshpaliyal.common.utils

import android.os.Build
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import androidx.annotation.RequiresApi
import java.io.InputStream
import java.io.OutputStream
import java.security.KeyStore
Expand Down

0 comments on commit 8babe42

Please sign in to comment.