mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-14 05:22:56 +00:00
A slight foray into the modern era
// FREEBIE
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user