From 35e16b75b243fd301642bbf1572f85ebbef1c161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Tue, 22 Dec 2015 01:46:11 +0100 Subject: Follow notification style guidelines, dismiss permission notification on click --- .../keychain/service/PassphraseCacheService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java') 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 ); -- cgit v1.2.3