mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-07 01:27:18 +02:00
openpgp-ktx: fix compilation warnings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
a740cb570a
commit
52ea59275e
|
@ -25,6 +25,7 @@ public class AutocryptPeerUpdate() : Parcelable {
|
||||||
this.preferEncrypt = preferEncrypt
|
this.preferEncrypt = preferEncrypt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
private constructor(source: Parcel, version: Int) : this() {
|
private constructor(source: Parcel, version: Int) : this() {
|
||||||
keyData = source.createByteArray()
|
keyData = source.createByteArray()
|
||||||
effectiveDate = if (source.readInt() != 0) Date(source.readLong()) else null
|
effectiveDate = if (source.readInt() != 0) Date(source.readLong()) else null
|
||||||
|
@ -85,7 +86,8 @@ public class AutocryptPeerUpdate() : Parcelable {
|
||||||
public companion object CREATOR : Creator<AutocryptPeerUpdate> {
|
public companion object CREATOR : Creator<AutocryptPeerUpdate> {
|
||||||
|
|
||||||
private const val PARCELABLE_VERSION = 1
|
private const val PARCELABLE_VERSION = 1
|
||||||
override fun createFromParcel(source: Parcel): AutocryptPeerUpdate? {
|
|
||||||
|
override fun createFromParcel(source: Parcel): AutocryptPeerUpdate {
|
||||||
val version = source.readInt() // parcelableVersion
|
val version = source.readInt() // parcelableVersion
|
||||||
val parcelableSize = source.readInt()
|
val parcelableSize = source.readInt()
|
||||||
val startPosition = source.dataPosition()
|
val startPosition = source.dataPosition()
|
||||||
|
@ -95,7 +97,7 @@ public class AutocryptPeerUpdate() : Parcelable {
|
||||||
return vr
|
return vr
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun newArray(size: Int): Array<AutocryptPeerUpdate?>? {
|
override fun newArray(size: Int): Array<AutocryptPeerUpdate?> {
|
||||||
return arrayOfNulls(size)
|
return arrayOfNulls(size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public object OpenPgpUtils {
|
||||||
if (userId.isNotEmpty()) {
|
if (userId.isNotEmpty()) {
|
||||||
val matcher = USER_ID_PATTERN.matcher(userId)
|
val matcher = USER_ID_PATTERN.matcher(userId)
|
||||||
if (matcher.matches()) {
|
if (matcher.matches()) {
|
||||||
var name = if (matcher.group(1).isEmpty()) null else matcher.group(1)
|
var name = if (matcher.group(1)?.isEmpty() == true) null else matcher.group(1)
|
||||||
val comment = matcher.group(2)
|
val comment = matcher.group(2)
|
||||||
var email = matcher.group(3)
|
var email = matcher.group(3)
|
||||||
if (email != null && name != null) {
|
if (email != null && name != null) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class OpenPgpSignatureResult : Parcelable {
|
||||||
private val signatureTimestamp: Date?
|
private val signatureTimestamp: Date?
|
||||||
private val autocryptPeerentityResult: AutocryptPeerResult?
|
private val autocryptPeerentityResult: AutocryptPeerResult?
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
private constructor(
|
private constructor(
|
||||||
signatureStatus: Int,
|
signatureStatus: Int,
|
||||||
signatureUserId: String?,
|
signatureUserId: String?,
|
||||||
|
|
Loading…
Reference in a new issue