Fixed probable nullpointerexception

This commit is contained in:
PeratX 2017-05-21 10:12:10 +08:00
parent d4a5edac16
commit 988c49a99f

View File

@ -257,10 +257,9 @@ public class DaedalusVpnService extends VpnService implements Runnable {
lastUpdate = time;
if (notification != null) {
notification.setContentTitle(getResources().getString(R.string.notification_queries) + " " + String.valueOf(provider.getDnsQueryTimes()));
NotificationManager manager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
manager.notify(NOTIFICATION_ACTIVATED, notification.build());
}
NotificationManager manager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
manager.notify(NOTIFICATION_ACTIVATED, notification.build());
}
}