From 5a525a2e58dcfe17d026a4c066ae1c4b9bcf77f2 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 25 Feb 2014 10:32:42 -0800 Subject: [PATCH] Switch KCS priority to MIN on JB+. Eliminates icon in status bar! --- src/org/thoughtcrime/securesms/service/KeyCachingService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/service/KeyCachingService.java b/src/org/thoughtcrime/securesms/service/KeyCachingService.java index 4baf2fb99..58e2ffdea 100644 --- a/src/org/thoughtcrime/securesms/service/KeyCachingService.java +++ b/src/org/thoughtcrime/securesms/service/KeyCachingService.java @@ -16,6 +16,7 @@ */ package org.thoughtcrime.securesms.service; +import android.annotation.TargetApi; import android.app.AlarmManager; import android.app.Notification; import android.app.PendingIntent; @@ -185,6 +186,7 @@ public class KeyCachingService extends Service { } } + @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void foregroundServiceModern() { NotificationCompat.Builder builder = new NotificationCompat.Builder(this); @@ -192,7 +194,7 @@ public class KeyCachingService extends Service { builder.setContentText(getString(R.string.KeyCachingService_textsecure_passphrase_cached)); builder.setSmallIcon(R.drawable.icon_cached); builder.setWhen(0); - builder.setPriority(Notification.PRIORITY_LOW); + builder.setPriority(Notification.PRIORITY_MIN); builder.addAction(R.drawable.ic_menu_lock_holo_dark, getString(R.string.KeyCachingService_lock), buildLockIntent()); builder.setContentIntent(buildLaunchIntent());