From fa08dc5cfb1e1d26ffcbfe2688f8a60dde0dfaf1 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Tue, 8 Dec 2020 11:17:39 +0100 Subject: [PATCH] Change notification icon --- .../AdvancedUnlockNotificationService.kt | 4 +- .../notification_ic_device_unlock_24dp.xml | 14 +++ ...otification_ic_fingerprint_unlock_24dp.xml | 14 +++ art/ic_device_unlock_notification.svg | 100 ++++++++++++++++ art/ic_fingerprint_notification.svg | 109 ++++++++++++++++++ 5 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/notification_ic_device_unlock_24dp.xml create mode 100644 app/src/main/res/drawable/notification_ic_fingerprint_unlock_24dp.xml create mode 100644 art/ic_device_unlock_notification.svg create mode 100644 art/ic_fingerprint_notification.svg diff --git a/app/src/main/java/com/kunzisoft/keepass/notifications/AdvancedUnlockNotificationService.kt b/app/src/main/java/com/kunzisoft/keepass/notifications/AdvancedUnlockNotificationService.kt index 544fb2ce7..3bcbd1d56 100644 --- a/app/src/main/java/com/kunzisoft/keepass/notifications/AdvancedUnlockNotificationService.kt +++ b/app/src/main/java/com/kunzisoft/keepass/notifications/AdvancedUnlockNotificationService.kt @@ -65,9 +65,9 @@ class AdvancedUnlockNotificationService : NotificationService() { val deviceCredential = PreferencesUtil.isDeviceCredentialUnlockEnable(this) val notificationBuilder = buildNewNotification().apply { setSmallIcon(if (deviceCredential) { - R.drawable.bolt + R.drawable.notification_ic_device_unlock_24dp } else { - R.drawable.fingerprint + R.drawable.notification_ic_fingerprint_unlock_24dp }) intent?.let { setContentTitle(getString(R.string.advanced_unlock)) diff --git a/app/src/main/res/drawable/notification_ic_device_unlock_24dp.xml b/app/src/main/res/drawable/notification_ic_device_unlock_24dp.xml new file mode 100644 index 000000000..238cce5b4 --- /dev/null +++ b/app/src/main/res/drawable/notification_ic_device_unlock_24dp.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/notification_ic_fingerprint_unlock_24dp.xml b/app/src/main/res/drawable/notification_ic_fingerprint_unlock_24dp.xml new file mode 100644 index 000000000..a03cce62b --- /dev/null +++ b/app/src/main/res/drawable/notification_ic_fingerprint_unlock_24dp.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/art/ic_device_unlock_notification.svg b/art/ic_device_unlock_notification.svg new file mode 100644 index 000000000..c6acd6f93 --- /dev/null +++ b/art/ic_device_unlock_notification.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/art/ic_fingerprint_notification.svg b/art/ic_fingerprint_notification.svg new file mode 100644 index 000000000..aaa185bc0 --- /dev/null +++ b/art/ic_fingerprint_notification.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + +