From a22c0454e444d1a9cba9fff7ba6fdbfd0ec54486 Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Mon, 10 Apr 2017 15:42:32 +0800 Subject: [PATCH] Fixed notification time --- .../org/itxtech/daedalus/service/DaedalusVpnService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java b/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java index cb5a55a..1d30e3f 100644 --- a/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java +++ b/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java @@ -96,10 +96,11 @@ public class DaedalusVpnService extends VpnService implements Runnable { Intent nIntent = new Intent(this, MainActivity.class); PendingIntent pIntent = PendingIntent.getActivity(this, 0, nIntent, PendingIntent.FLAG_UPDATE_CURRENT); - builder.setContentTitle(getResources().getString(R.string.notification_activated)) + builder.setWhen(0) + .setContentTitle(getResources().getString(R.string.notification_activated)) .setDefaults(NotificationCompat.DEFAULT_LIGHTS) .setSmallIcon(R.mipmap.ic_security_black_18dp) - .setAutoCancel(true) + .setAutoCancel(false) .setOngoing(true) .setTicker(getResources().getString(R.string.notification_activated)) .setContentIntent(pIntent)