Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions services/core/java/com/android/server/connectivity/Vpn.java
Original file line number Diff line number Diff line change
Expand Up @@ -1153,13 +1153,8 @@ public boolean startAlwaysOnVpn() {
if (alwaysOnPackage == null) {
return true;
}
// 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);
}
Log.i(TAG, "startAlwaysOnVpn: isAlwaysOnPackageSupported returned false for " + alwaysOnPackage, new Throwable());
return false;
}
// Skip if the service is already established. This isn't bulletproof: it's not bound
Expand Down