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

Commit 84a803f7 authored by Paul Hu's avatar Paul Hu Committed by Android (Google) Code Review
Browse files

Merge "Add check to prevent resetting VPN always-on setting in safe mode" into udc-qpr-dev

parents 55ddd26d 60ddb878
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1258,7 +1258,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