Skip to content

Commit

Permalink
Fix notification in older android versions
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Dec 7, 2021
1 parent ee109b4 commit 7f01619
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
private var kdfListV3: MutableList<KdfEngine> = ArrayList()

override val version: String
get() = "KeePass 1"
get() = "V1"

init {
kdfListV3.add(KdfFactory.aesKdf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class DatabaseKDBX : DatabaseVersioned<UUID, UUID, GroupKDBX, EntryKDBX> {
FILE_VERSION_41 -> "4.1"
else -> "UNKNOWN"
}
return "KeePass 2 - KDBX$kdbxStringVersion"
return "V2 - KDBX$kdbxStringVersion"
}

override val kdfEngine: KdfEngine?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,13 @@ open class DatabaseTaskNotificationService : LockNotificationService(), Progress
R.drawable.ic_lock_database_white_32dp, getString(R.string.lock),
pendingDeleteIntent
)
setStyle(
NotificationCompat.MediaStyle()
.setShowActionsInCompactView(0)
)
// Won't work with Xiaomi and Kitkat
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
setStyle(
NotificationCompat.MediaStyle()
.setShowActionsInCompactView(0)
)
}
}
}
}
Expand Down

0 comments on commit 7f01619

Please sign in to comment.