summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-11 23:12:06 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-17 13:40:57 +0000
commitdbd9e4fa06cc6110ad4e4b76ed113f2c7655f931 (patch)
tree00005d918d7eacff14f6f6337d4b4e8fa6cdfe8a /android/src
parent23d9025532c8efc423e0095f5c4d3ebeed1e5973 (diff)
downloadmullvadvpn-dbd9e4fa06cc6110ad4e4b76ed113f2c7655f931.tar.xz
mullvadvpn-dbd9e4fa06cc6110ad4e4b76ed113f2c7655f931.zip
Add logs for UI connection events to the service
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
index c946b47e83..b55df1f19c 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
@@ -34,11 +34,13 @@ class MainActivity : FragmentActivity() {
private val serviceConnectionManager = object : android.content.ServiceConnection {
override fun onServiceConnected(className: ComponentName, binder: IBinder) {
+ android.util.Log.d("mullvad", "UI successfully connected to the service")
val localBinder = binder as MullvadVpnService.LocalBinder
service = localBinder
localBinder.serviceNotifier.subscribe(this@MainActivity) { service ->
+ android.util.Log.d("mullvad", "UI connection to the service changed: $service")
serviceConnection?.onDestroy()
val newConnection = service?.let { safeService ->
@@ -55,6 +57,7 @@ class MainActivity : FragmentActivity() {
}
override fun onServiceDisconnected(className: ComponentName) {
+ android.util.Log.d("mullvad", "UI lost the connection to the service")
service?.serviceNotifier?.unsubscribe(this@MainActivity)
serviceConnection = null
serviceNotifier.notify(null)
@@ -79,6 +82,7 @@ class MainActivity : FragmentActivity() {
}
override fun onStart() {
+ android.util.Log.d("mullvad", "Starting main activity")
super.onStart()
val intent = Intent(this, MullvadVpnService::class.java)
@@ -97,6 +101,7 @@ class MainActivity : FragmentActivity() {
}
override fun onStop() {
+ android.util.Log.d("mullvad", "Stoping main activity")
unbindService(serviceConnectionManager)
super.onStop()