From 65a09aa799e525d3bc60f5f4f489a3d70c6a8554 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 6 Jul 2019 17:37:48 +0200 Subject: get rid of ics-openvpn's ProfileManager, reduces boilerplate and dead code --- .../blinkt/openvpn/core/ICSOpenVPNApplication.java | 68 ---------------------- 1 file changed, 68 deletions(-) delete mode 100644 app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java (limited to 'app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java') diff --git a/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java b/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java deleted file mode 100644 index 5b1307b7..00000000 --- a/app/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2016 Arne Schwabe - * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt - */ - -package de.blinkt.openvpn.core; - -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 org.acra.ACRA; -import org.acra.ReportingInteractionMode; -import org.acra.annotation.ReportsCrashes; -*/ - -import se.leap.bitmaskclient.R; - -public class ICSOpenVPNApplication extends Application { - private StatusListener mStatus; - - @Override - public void onCreate() { - super.onCreate(); - PRNGFixes.apply(); - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) - - createNotificationChannels(); - mStatus = new StatusListener(); - mStatus.init(getApplicationContext()); - - } - - @TargetApi(Build.VERSION_CODES.O) - private void createNotificationChannels() { - 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_LOW); - - mChannel.setDescription(getString(R.string.channel_description_status)); - mChannel.enableLights(true); - - mChannel.setLightColor(Color.BLUE); - mNotificationManager.createNotificationChannel(mChannel); - } -} \ No newline at end of file -- cgit v1.2.3