summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2024-06-25 16:54:06 +0200
committerAlbin <albin@mullvad.net>2024-06-26 12:59:29 +0200
commita3fc3d40a2467c21411e6d87b301d75c2c596793 (patch)
treece7dcba43fea69bea68758ee9d0769d571e7181a /android
parent2b6c810202964bd24efd5efbc5be52be1eab87ef (diff)
downloadmullvadvpn-a3fc3d40a2467c21411e6d87b301d75c2c596793.tar.xz
mullvadvpn-a3fc3d40a2467c21411e6d87b301d75c2c596793.zip
Change app log calls to info severity
Diffstat (limited to 'android')
-rw-r--r--android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt2
-rw-r--r--android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt20
-rw-r--r--android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/ForegroundNotificationManager.kt8
-rw-r--r--android/tile/src/main/kotlin/net/mullvad/mullvadvpn/tile/MullvadTileService.kt4
4 files changed, 17 insertions, 17 deletions
diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt
index 77636e0c12..29f91b43f1 100644
--- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt
+++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt
@@ -36,7 +36,7 @@ class DeviceRepository(
managementService.getDeviceList(accountNumber)
suspend fun updateDevice() {
- Logger.d("Update device")
+ Logger.i("Update device")
managementService.updateDevice()
}
}
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt
index 38358e3d98..23451a9459 100644
--- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt
+++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt
@@ -64,7 +64,7 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
override fun onCreate() {
super.onCreate()
- Logger.d("MullvadVpnService: onCreate")
+ Logger.i("MullvadVpnService: onCreate")
loadKoinModules(listOf(vpnServiceModule, apiEndpointModule))
with(getKoin()) {
@@ -101,7 +101,7 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
- Logger.d(
+ Logger.i(
"onStartCommand (intent=$intent, action=${intent?.action}, flags=$flags, startId=$startId)"
)
@@ -111,7 +111,7 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
// where the service would potentially otherwise be too slow running `startForeground`.
when {
keyguardManager.isKeyguardLocked -> {
- Logger.d("Keyguard is locked, ignoring command")
+ Logger.i("Keyguard is locked, ignoring command")
}
intent.isFromSystem() || intent?.action == KEY_CONNECT_ACTION -> {
// Only show on foreground if we have permission
@@ -130,10 +130,10 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
override fun onBind(intent: Intent?): IBinder {
bindCount.incrementAndGet()
- Logger.d("onBind: $intent")
+ Logger.i("onBind: $intent")
if (intent.isFromSystem()) {
- Logger.d("onBind from system")
+ Logger.i("onBind from system")
_shouldBeOnForeground.update { true }
}
@@ -177,14 +177,14 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
// Foreground?
if (intent.isFromSystem()) {
- Logger.d("onUnbind from system")
+ Logger.i("onUnbind from system")
_shouldBeOnForeground.update { false }
}
if (count == 0) {
- Logger.d("No one bound to the service, stopSelf()")
+ Logger.i("No one bound to the service, stopSelf()")
lifecycleScope.launch {
- Logger.d("Waiting for disconnected state")
+ Logger.i("Waiting for disconnected state")
// TODO This needs reworking, we should not wait for the disconnected state, what we
// want is the notification of disconnected to go out before we start shutting down
connectionProxy.tunnelState
@@ -195,7 +195,7 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
.first()
if (bindCount.get() == 0) {
- Logger.d("Stopping service")
+ Logger.i("Stopping service")
stopSelf()
}
}
@@ -204,7 +204,7 @@ class MullvadVpnService : TalpidVpnService(), ShouldBeOnForegroundProvider {
}
override fun onDestroy() {
- Logger.d("MullvadVpnService: onDestroy")
+ Logger.i("MullvadVpnService: onDestroy")
managementService.stop()
// Shutting down the daemon gracefully
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/ForegroundNotificationManager.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/ForegroundNotificationManager.kt
index d140a5de61..613c6cdbef 100644
--- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/ForegroundNotificationManager.kt
+++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/ForegroundNotificationManager.kt
@@ -24,10 +24,10 @@ class ForegroundNotificationManager(
scope.launch {
foregroundProvider.shouldBeOnForeground.collect {
if (it) {
- Logger.d("Starting foreground")
+ Logger.i("Starting foreground")
notifyForeground(getTunnelStateNotificationOrDefault())
} else {
- Logger.d("Stopping foreground")
+ Logger.i("Stopping foreground")
vpnService.stopForeground(Service.STOP_FOREGROUND_DETACH)
}
}
@@ -50,12 +50,12 @@ class ForegroundNotificationManager(
if (VpnService.prepare(vpnService) != null) {
// Got connect/disconnect intent, but we don't have permission to go in foreground.
// tunnel state will return permission and we will eventually get stopped by system.
- Logger.d("Did not start foreground: VPN permission not granted")
+ Logger.i("Did not start foreground: VPN permission not granted")
return
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
- Logger.d("Starting foreground UPSIDE_DOWN_CAKE")
+ Logger.i("Starting foreground UPSIDE_DOWN_CAKE")
vpnService.startForeground(
tunnelStateNotificationProvider.notificationId.value,
androidNotification,
diff --git a/android/tile/src/main/kotlin/net/mullvad/mullvadvpn/tile/MullvadTileService.kt b/android/tile/src/main/kotlin/net/mullvad/mullvadvpn/tile/MullvadTileService.kt
index 5998d75920..aef6f3505e 100644
--- a/android/tile/src/main/kotlin/net/mullvad/mullvadvpn/tile/MullvadTileService.kt
+++ b/android/tile/src/main/kotlin/net/mullvad/mullvadvpn/tile/MullvadTileService.kt
@@ -91,7 +91,7 @@ class MullvadTileService : TileService() {
val isSetup = VpnService.prepare(applicationContext) == null
// TODO This logic should be more advanced, we should ensure user has an account setup etc.
if (!isSetup) {
- Logger.d("TileService: VPN service not setup, starting main activity")
+ Logger.i("TileService: VPN service not setup, starting main activity")
val intent =
Intent().apply {
@@ -105,7 +105,7 @@ class MullvadTileService : TileService() {
startActivityAndCollapseCompat(intent)
return
} else {
- Logger.d("TileService: VPN service is setup")
+ Logger.i("TileService: VPN service is setup")
}
val intent =
Intent().apply {