Merge branch 'android-always-on-managed'
Fixes an issue with initiating managed profiles as Always-on VPN. Closes strongswan/strongswan#2756
This commit is contained in:
@@ -9,8 +9,8 @@ android {
|
|||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 34
|
targetSdkVersion 34
|
||||||
|
|
||||||
versionCode 88
|
versionCode 89
|
||||||
versionName "2.5.4"
|
versionName "2.5.5"
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
ndkBuild {
|
ndkBuild {
|
||||||
|
|||||||
+3
-18
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Relution GmbH
|
* Copyright (C) 2023 Relution GmbH
|
||||||
* Copyright (C) 2014-2024 Tobias Brunner
|
* Copyright (C) 2014-2025 Tobias Brunner
|
||||||
*
|
*
|
||||||
* Copyright (C) secunet Security Networks AG
|
* Copyright (C) secunet Security Networks AG
|
||||||
*
|
*
|
||||||
@@ -38,14 +38,10 @@ import java.util.concurrent.Executor;
|
|||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.core.os.HandlerCompat;
|
import androidx.core.os.HandlerCompat;
|
||||||
import androidx.lifecycle.DefaultLifecycleObserver;
|
|
||||||
import androidx.lifecycle.LifecycleOwner;
|
|
||||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
|
|
||||||
public class StrongSwanApplication extends Application implements DefaultLifecycleObserver
|
public class StrongSwanApplication extends Application
|
||||||
{
|
{
|
||||||
private static final String TAG = StrongSwanApplication.class.getSimpleName();
|
private static final String TAG = StrongSwanApplication.class.getSimpleName();
|
||||||
|
|
||||||
@@ -80,6 +76,7 @@ public class StrongSwanApplication extends Application implements DefaultLifecyc
|
|||||||
public void onCreate()
|
public void onCreate()
|
||||||
{
|
{
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
StrongSwanApplication.mContext = getApplicationContext();
|
StrongSwanApplication.mContext = getApplicationContext();
|
||||||
StrongSwanApplication.mInstance = this;
|
StrongSwanApplication.mInstance = this;
|
||||||
|
|
||||||
@@ -92,24 +89,12 @@ public class StrongSwanApplication extends Application implements DefaultLifecyc
|
|||||||
|
|
||||||
mUserCertificateManager = new ManagedUserCertificateManager(mContext, mManagedConfigurationService, mDatabaseHelper);
|
mUserCertificateManager = new ManagedUserCertificateManager(mContext, mManagedConfigurationService, mDatabaseHelper);
|
||||||
|
|
||||||
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume(@NonNull LifecycleOwner owner)
|
|
||||||
{
|
|
||||||
reloadManagedConfigurationAndNotifyListeners();
|
reloadManagedConfigurationAndNotifyListeners();
|
||||||
|
|
||||||
final IntentFilter restrictionsFilter = new IntentFilter(Intent.ACTION_APPLICATION_RESTRICTIONS_CHANGED);
|
final IntentFilter restrictionsFilter = new IntentFilter(Intent.ACTION_APPLICATION_RESTRICTIONS_CHANGED);
|
||||||
registerReceiver(mRestrictionsReceiver, restrictionsFilter);
|
registerReceiver(mRestrictionsReceiver, restrictionsFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause(@NonNull LifecycleOwner owner)
|
|
||||||
{
|
|
||||||
unregisterReceiver(mRestrictionsReceiver);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void reloadManagedConfigurationAndNotifyListeners()
|
private void reloadManagedConfigurationAndNotifyListeners()
|
||||||
{
|
{
|
||||||
final Set<String> uuids = new HashSet<>(mManagedConfigurationService.getManagedProfiles().keySet());
|
final Set<String> uuids = new HashSet<>(mManagedConfigurationService.getManagedProfiles().keySet());
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# 2.5.5 #
|
||||||
|
|
||||||
|
- Fixt den Start von verwalteten Profilen als Always-on VPN
|
||||||
|
|
||||||
# 2.5.4 #
|
# 2.5.4 #
|
||||||
|
|
||||||
- Fixt Probleme beim Wiederherstellen der Verbindung
|
- Fixt Probleme beim Wiederherstellen der Verbindung
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# 2.5.5 #
|
||||||
|
|
||||||
|
- Fix initiating managed profiles as Always-on VPN
|
||||||
|
|
||||||
# 2.5.4 #
|
# 2.5.4 #
|
||||||
|
|
||||||
- Fix issues when reestablishing the connection
|
- Fix issues when reestablishing the connection
|
||||||
|
|||||||
Reference in New Issue
Block a user