Switch KCS priority to MIN on JB+. Eliminates icon in status bar!

master
Moxie Marlinspike 2014-02-25 10:32:42 -08:00
parent dda8a214a4
commit 5a525a2e58
1 changed files with 3 additions and 1 deletions

View File

@ -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());