Skip to content

Commit

Permalink
Switch KCS priority to MIN on JB+. Eliminates icon in status bar!
Browse files Browse the repository at this point in the history
  • Loading branch information
moxie0 committed Feb 25, 2014
1 parent dda8a21 commit 5a525a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -185,14 +186,15 @@ private void startTimeoutIfAppropriate() {
}
}

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void foregroundServiceModern() {
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);

builder.setContentTitle(getString(R.string.KeyCachingService_passphrase_cached));
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());
Expand Down

1 comment on commit 5a525a2

@WhisperBTC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! BitHub has sent payment of $93.97USD for this commit.

Please sign in to comment.