A slight foray into the modern era

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2016-12-11 13:37:22 -08:00
parent f7474362ff
commit 6308e6491a
3 changed files with 29 additions and 23 deletions

View File

@@ -2,11 +2,9 @@ package org.thoughtcrime.redphone.ui;
import android.content.Context;
import android.graphics.drawable.LayerDrawable;
import android.support.v7.internal.view.menu.MenuBuilder;
import android.support.v7.widget.PopupMenu;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.CompoundButton;
import org.thoughtcrime.redphone.util.AudioUtils;

View File

@@ -265,17 +265,16 @@ public class KeyCachingService extends Service {
}
private void foregroundServiceLegacy() {
Notification notification = new Notification(R.drawable.icon_cached,
getString(R.string.KeyCachingService_signal_passphrase_cached),
System.currentTimeMillis());
notification.setLatestEventInfo(getApplicationContext(),
getString(R.string.KeyCachingService_passphrase_cached),
getString(R.string.KeyCachingService_signal_passphrase_cached),
buildLaunchIntent());
notification.tickerText = null;
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setSmallIcon(R.drawable.icon_cached);
builder.setWhen(System.currentTimeMillis());
builder.setContentTitle(getString(R.string.KeyCachingService_passphrase_cached));
builder.setContentText(getString(R.string.KeyCachingService_signal_passphrase_cached));
builder.setContentIntent(buildLaunchIntent());
stopForeground(true);
startForeground(SERVICE_RUNNING_ID, notification);
startForeground(SERVICE_RUNNING_ID, builder.build());
}
private void foregroundService() {