diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2024-08-08 02:46:08 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2024-08-08 03:34:14 +0530 |
commit | e8cdc2077f295cf61ed7157f8ae2cdbb53c39054 (patch) | |
tree | efc3d7b56d13c9962d4b32bba5375b1d00cc87e5 /autofill-parser/src/main | |
parent | 4eb8f497d598c731a3628c7ae71a398ac462cfc0 (diff) |
fix(build): compile against SDK 35
Diffstat (limited to 'autofill-parser/src/main')
-rw-r--r-- | autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt index f08f3172..3514e8f1 100644 --- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt +++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt @@ -50,7 +50,10 @@ public fun computeCertificatesHash(context: Context, appPackage: String): String @SuppressLint("PackageManagerGetSignatures") @Suppress("DEPRECATION") val signaturesOld = - context.packageManager.getPackageInfo(appPackage, PackageManager.GET_SIGNATURES).signatures + context.packageManager + .getPackageInfo(appPackage, PackageManager.GET_SIGNATURES) + .signatures + .orEmpty() val stableHashOld = stableHash(signaturesOld.map { it.toByteArray() }) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { val info = @@ -63,7 +66,7 @@ public fun computeCertificatesHash(context: Context, appPackage: String): String context.packageManager.getPackageInfo(appPackage, PackageManager.GET_SIGNING_CERTIFICATES) } val signaturesNew = - info.signingInfo.signingCertificateHistory ?: info.signingInfo.apkContentsSigners + info.signingInfo?.signingCertificateHistory ?: info.signingInfo?.apkContentsSigners.orEmpty() val stableHashNew = stableHash(signaturesNew.map { it.toByteArray() }) if (stableHashNew != stableHashOld) logcat("CertificatesHash", ERROR) { |