diff options
author | cyBerta <cyberta@riseup.net> | 2018-01-16 13:59:33 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2018-01-17 14:21:09 +0100 |
commit | 76884123b22dbdd7538add0d931c5f2d8e660ed2 (patch) | |
tree | ec26ec2b6dcf06bebecd4ce96dbdc252cc8a35a5 /app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java | |
parent | df1e68c672de71633e99234360ea92d77e67a86d (diff) |
#8788 implement VpnNotificationManager to handle notifications from VoidVPN and OpenVPN
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java index d7f574b2..88a01b62 100644 --- a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java +++ b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java @@ -1,16 +1,6 @@ package se.leap.bitmaskclient; -import android.annotation.TargetApi; import android.app.Application; -import android.app.NotificationChannel; -import android.app.NotificationManager; -import android.content.Context; -import android.graphics.Color; -import android.os.Build; - -import de.blinkt.openvpn.core.OpenVPNService; - -import static android.os.Build.VERSION_CODES.O; /** * Created by cyberta on 24.10.17. @@ -23,42 +13,6 @@ public class BitmaskApp extends Application { super.onCreate(); PRNGFixes.apply(); //TODO: add LeakCanary! - if (Build.VERSION.SDK_INT >= O) - createNotificationChannelsForOpenvpn(); - } - - - @TargetApi(O) - private void createNotificationChannelsForOpenvpn() { - NotificationManager mNotificationManager = - (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - - // Background message - CharSequence name = getString(R.string.channel_name_background); - NotificationChannel mChannel = new NotificationChannel(OpenVPNService.NOTIFICATION_CHANNEL_BG_ID, - name, NotificationManager.IMPORTANCE_MIN); - - mChannel.setDescription(getString(R.string.channel_description_background)); - mChannel.enableLights(false); - - mChannel.setLightColor(Color.DKGRAY); - mNotificationManager.createNotificationChannel(mChannel); - - // Connection status change messages - - name = getString(R.string.channel_name_status); - mChannel = new NotificationChannel(OpenVPNService.NOTIFICATION_CHANNEL_NEWSTATUS_ID, - name, NotificationManager.IMPORTANCE_DEFAULT); - - - mChannel.setDescription(getString(R.string.channel_description_status)); - mChannel.enableLights(true); - - mChannel.setLightColor(Color.BLUE); - mNotificationManager.createNotificationChannel(mChannel); - } - - } |