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

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

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

Merge "Add check to prevent resetting VPN always-on setting in safe mode" into udc-dev am: 9e42082a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/34824456



Change-Id: Ib5793b48d33efa36460ce437daf1876ca4284589
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b879afb9 9e42082a
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