diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-06-06 02:09:51 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-06-17 14:12:43 +0000 |
| commit | 41e36b132358b3acf501c931bc18a04438f003a2 (patch) | |
| tree | 9b28a0ae6f370b91bb41b401eb495e78d633f71b /android/src/main | |
| parent | 93ee50e1e5c0b2ba4692cc8edfc2656dc353b63d (diff) | |
| download | mullvadvpn-41e36b132358b3acf501c931bc18a04438f003a2.tar.xz mullvadvpn-41e36b132358b3acf501c931bc18a04438f003a2.zip | |
Remove unused intent listener
Broadcasted intents have been replaced with service start commands.
Diffstat (limited to 'android/src/main')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt index 28d32c1c89..621463286f 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt @@ -183,18 +183,6 @@ class ForegroundNotificationManager( } } - private val connectReceiver = object : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - connectionProxy?.connect() - } - } - - private val disconnectReceiver = object : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - connectionProxy?.disconnect() - } - } - var lockedToForeground = false set(value) { field = value @@ -212,8 +200,6 @@ class ForegroundNotificationManager( } service.apply { - registerReceiver(connectReceiver, IntentFilter(KEY_CONNECT_ACTION)) - registerReceiver(disconnectReceiver, IntentFilter(KEY_DISCONNECT_ACTION)) registerReceiver(deviceLockListener, IntentFilter().apply { addAction(Intent.ACTION_USER_PRESENT) addAction(Intent.ACTION_SCREEN_OFF) @@ -228,11 +214,6 @@ class ForegroundNotificationManager( connectionProxy = null settingsListener = null - service.apply { - unregisterReceiver(connectReceiver) - unregisterReceiver(disconnectReceiver) - } - notificationManager.cancel(FOREGROUND_NOTIFICATION_ID) } |
