diff options
| author | David Göransson <david.goransson90@gmail.com> | 2023-09-11 15:59:09 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson90@gmail.com> | 2023-09-12 11:22:16 +0200 |
| commit | d63db4ab40c71b07368f7778d8fb0f23392352e2 (patch) | |
| tree | a9392bfc7a24f5fa6f595b9d35cfd8c97951d142 /android/service/src | |
| parent | fa733200f25e9ef89f138f848af2b0be9eba2e2b (diff) | |
| download | mullvadvpn-d63db4ab40c71b07368f7778d8fb0f23392352e2.tar.xz mullvadvpn-d63db4ab40c71b07368f7778d8fb0f23392352e2.zip | |
Perform AS Code Cleanup
Diffstat (limited to 'android/service/src')
3 files changed, 5 insertions, 6 deletions
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 9024eaad18..6f148beea0 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 @@ -4,7 +4,6 @@ import android.annotation.SuppressLint import android.app.KeyguardManager import android.content.Context import android.content.Intent -import android.net.VpnService import android.os.IBinder import android.os.Looper import android.util.Log @@ -138,7 +137,7 @@ class MullvadVpnService : TalpidVpnService() { if (!keyguardManager.isDeviceLocked) { val action = intent?.action - if (action == VpnService.SERVICE_INTERFACE || action == KEY_CONNECT_ACTION) { + if (action == SERVICE_INTERFACE || action == KEY_CONNECT_ACTION) { pendingAction = PendingAction.Connect } else if (action == KEY_DISCONNECT_ACTION) { pendingAction = PendingAction.Disconnect diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt index dcc97e8b11..e07f1725d7 100644 --- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt +++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt @@ -108,8 +108,8 @@ class AccountExpiryNotification( if (BuildTypes.RELEASE == BuildConfig.BUILD_TYPE) { Intent().apply { setClassName(MULLVAD_PACKAGE_NAME, MAIN_ACTIVITY_CLASS) - setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) - setAction(Intent.ACTION_MAIN) + flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP + action = Intent.ACTION_MAIN } } else { Intent(Intent.ACTION_VIEW, url) diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt index b9691b6fa9..f79d55a1d0 100644 --- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt +++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt @@ -116,8 +116,8 @@ class TunnelStateNotification(val context: Context) { val intent = Intent().apply { setClassName(MULLVAD_PACKAGE_NAME, MAIN_ACTIVITY_CLASS) - setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) - setAction(Intent.ACTION_MAIN) + flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP + action = Intent.ACTION_MAIN } val pendingIntent = PendingIntent.getActivity(context, 1, intent, SdkUtils.getSupportedPendingIntentFlags()) |
