diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-12-22 01:46:11 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-12-22 01:46:11 +0100 |
commit | 35e16b75b243fd301642bbf1572f85ebbef1c161 (patch) | |
tree | 48b57091a666775e3f37f4ec9dca65013260866d /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java | |
parent | 6c25cb19270b70eb8dd20f9731b3b65cbc198f11 (diff) | |
download | open-keychain-35e16b75b243fd301642bbf1572f85ebbef1c161.tar.gz open-keychain-35e16b75b243fd301642bbf1572f85ebbef1c161.tar.bz2 open-keychain-35e16b75b243fd301642bbf1572f85ebbef1c161.zip |
Follow notification style guidelines, dismiss permission notification on click
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java index 67c295b6d..73da3aff9 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java @@ -18,8 +18,6 @@ package org.sufficientlysecure.keychain.service; -import java.util.Date; - import android.app.AlarmManager; import android.app.Notification; import android.app.PendingIntent; @@ -44,11 +42,12 @@ import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKey.SecretKeyType; import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing; import org.sufficientlysecure.keychain.provider.ProviderHelper; -import org.sufficientlysecure.keychain.ui.util.NotificationUtils; import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Passphrase; import org.sufficientlysecure.keychain.util.Preferences; +import java.util.Date; + /** * This service runs in its own process, but is available to all other processes as the main * passphrase cache. Use the static methods addCachedPassphrase and getCachedPassphrase for @@ -473,7 +472,7 @@ public class PassphraseCacheService extends Service { private Notification getNotification() { NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.setSmallIcon(R.drawable.ic_stat_notify_24dp) - .setLargeIcon(NotificationUtils.getBitmap(R.mipmap.ic_launcher, getBaseContext())) + .setColor(getResources().getColor(R.color.primary)) .setContentTitle(getResources().getQuantityString(R.plurals.passp_cache_notif_n_keys, mPassphraseCache.size(), mPassphraseCache.size())) .setContentText(getString(R.string.passp_cache_notif_touch_to_clear)); @@ -504,7 +503,7 @@ public class PassphraseCacheService extends Service { // Add clear PI action below text builder.addAction( - R.drawable.abc_ic_clear_mtrl_alpha, + R.drawable.ic_close_white_24dp, getString(R.string.passp_cache_notif_clear), clearCachePi ); |