Skip to content

Commit

Permalink
fix: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
iykazrji committed Jan 8, 2025
1 parent 6a7a097 commit 877342b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class TEKStamper(context: Context) {
try {
// Attempt to create or load the EncryptedSharedPreferences file
val masterKey = createMasterKey(context)

return createSharedPreferences(masterKey, context)
} catch(e: Exception) {
// Log the Exception
Expand All @@ -248,6 +249,7 @@ class TEKStamper(context: Context) {
val newMasterKey = createMasterKey(context)
context.getSharedPreferences(ENCRYPTED_SHARED_PREFERENCES_FILENAME, Context.MODE_PRIVATE).edit().clear().apply()
context.deleteSharedPreferences(ENCRYPTED_SHARED_PREFERENCES_FILENAME)

return createSharedPreferences(newMasterKey, context)
} catch(retryException: Exception) {
throw RuntimeException("Couldn't create the required shared preferences file. Ensure you are properly authentcated on this device.", retryException)
Expand Down

0 comments on commit 877342b

Please sign in to comment.