Skip to content

Commit

Permalink
Merge branch 'release/2.10.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed May 10, 2021
2 parents 780875d + 4f8e8e6 commit d560c3e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
KeePassDX(2.10.1)
* Fix parcelable with custom data #986

KeePassDX(2.10.0)
* Manage new database format 4.1 #956
* Fix show button consistency #980
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.kunzisoft.keepass"
minSdkVersion 15
targetSdkVersion 30
versionCode = 76
versionName = "2.10.0"
versionCode = 78
versionName = "2.10.1"
multiDexEnabled true

testApplicationId = "com.kunzisoft.keepass.tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CustomData : Parcelable {
}

constructor(parcel: Parcel) {
ParcelableUtil.readStringParcelableMap(parcel, CustomData::class.java)
ParcelableUtil.readStringParcelableMap(parcel, CustomDataItem::class.java)
}

fun get(key: String): CustomDataItem? {
Expand Down
12 changes: 9 additions & 3 deletions app/src/main/java/com/kunzisoft/keepass/utils/ParcelableUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ object ParcelableUtil {
val size = parcel.readInt()
val map = HashMap<K, V>(size)
for (i in 0 until size) {
val key: K? = kClass.cast(parcel.readParcelable(kClass.classLoader))
val value: V? = vClass.cast(parcel.readParcelable(vClass.classLoader))
val key: K? = try {
parcel.readParcelable(kClass.classLoader)
} catch (e: Exception) { null }
val value: V? = try {
parcel.readParcelable(vClass.classLoader)
} catch (e: Exception) { null }
if (key != null && value != null)
map[key] = value
}
Expand Down Expand Up @@ -76,7 +80,9 @@ object ParcelableUtil {
val map = LinkedHashMap<String, V>(size)
for (i in 0 until size) {
val key: String? = parcel.readString()
val value: V? = vClass.cast(parcel.readParcelable(vClass.classLoader))
val value: V? = try {
parcel.readParcelable(vClass.classLoader)
} catch (e: Exception) { null }
if (key != null && value != null)
map[key] = value
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/77.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions fastlane/metadata/android/fr-FR/changelogs/77.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*

0 comments on commit d560c3e

Please sign in to comment.