From 790decd25d13c766e40069f049f12dfa12105b79 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 9 Dec 2015 19:25:40 +0100 Subject: [PATCH] Small improvements --- app/src/main/java/eu/faircode/netguard/SinkholeService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java index 26268068..eeef6c41 100644 --- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java +++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java @@ -313,7 +313,7 @@ public class SinkholeService extends VpnService { // Create bitmap int height = Util.dips2pixels(96, SinkholeService.this); - int width = getResources().getDisplayMetrics().widthPixels; + int width = Util.dips2pixels(96 * 5, SinkholeService.this); Log.i(TAG, "h=" + height + " w=" + width); Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); @@ -391,10 +391,10 @@ public class SinkholeService extends VpnService { .setContent(remoteViews) .setContentIntent(pi) .setCategory(Notification.CATEGORY_STATUS) - .setVisibility(Notification.VISIBILITY_SECRET) + .setVisibility(Notification.VISIBILITY_PUBLIC) .setPriority(Notification.PRIORITY_DEFAULT) .setColor(ContextCompat.getColor(SinkholeService.this, R.color.colorPrimary)) - .setAutoCancel(true); + .setOngoing(true); NotificationManagerCompat.from(SinkholeService.this).notify(NOTIFY_TRAFFIC, builder.build()); } }