From cff8d41c91a73371f7eb65b08730fa548ce510a4 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 1 Nov 2020 22:51:02 +0530 Subject: build: compile against SDK 30 and resolve deprecations Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/crypto/BasePgpActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/crypto') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/BasePgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/BasePgpActivity.kt index 6b6c2032..17c18998 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/BasePgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/BasePgpActivity.kt @@ -45,12 +45,12 @@ open class BasePgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBou /** * Full path to the repository */ - val repoPath: String by lazy(LazyThreadSafetyMode.NONE) { intent.getStringExtra("REPO_PATH") } + val repoPath by lazy(LazyThreadSafetyMode.NONE) { intent.getStringExtra("REPO_PATH")!! } /** * Full path to the password file being worked on */ - val fullPath: String by lazy(LazyThreadSafetyMode.NONE) { intent.getStringExtra("FILE_PATH") } + val fullPath by lazy(LazyThreadSafetyMode.NONE) { intent.getStringExtra("FILE_PATH")!! } /** * Name of the password file @@ -186,7 +186,7 @@ open class BasePgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBou */ fun getUserInteractionRequestIntent(result: Intent): IntentSender { i { "RESULT_CODE_USER_INTERACTION_REQUIRED" } - return (result.getParcelableExtra(OpenPgpApi.RESULT_INTENT) as PendingIntent).intentSender + return result.getParcelableExtra(OpenPgpApi.RESULT_INTENT)!!.intentSender } /** -- cgit v1.2.3