Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82d0c27d authored by Paul Hu's avatar Paul Hu Committed by Automerger Merge Worker
Browse files

Add check to prevent resetting VPN always-on setting in safe mode am: 46014fcd am: e36d8a16

parents 53fc5b1d e36d8a16
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,11 @@ public class Vpn {
            }
            // Remove always-on VPN if it's not supported.
            if (!isAlwaysOnPackageSupported(alwaysOnPackage)) {
                // Do not remove the always-on setting due to the restricted ability in safe mode.
                // The always-on VPN can then start after the device reboots to normal mode.
                if (!mContext.getPackageManager().isSafeMode()) {
                    setAlwaysOnPackage(null, false, null);
                }
                return false;
            }
            // Skip if the service is already established. This isn't bulletproof: it's not bound