Revert "Update to use new ConnectivityManager API."
This reverts commit 9a9f6f313b
.
Reason for revert: broke pi-dev-plus-aosp
Change-Id: Ia0ff7cdf77b4edf3bdf5e4c54376b730df48373e
This commit is contained in:
@@ -163,8 +163,7 @@ public class AppDialogFragment extends InstrumentedDialogFragment implements App
|
||||
final int userId = getUserId();
|
||||
try {
|
||||
if (mPackageInfo.packageName.equals(VpnUtils.getConnectedPackage(mService, userId))) {
|
||||
mService.setAlwaysOnVpnPackage(userId, null, /* lockdownEnabled */ false,
|
||||
/* lockdownWhitelist */ null);
|
||||
mService.setAlwaysOnVpnPackage(userId, null, /* lockdownEnabled */ false);
|
||||
mService.prepareVpn(mPackageInfo.packageName, VpnConfig.LEGACY_VPN, userId);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
@@ -224,7 +224,7 @@ public class AppManagementFragment extends SettingsPreferenceFragment
|
||||
|
||||
private boolean setAlwaysOnVpn(boolean isEnabled, boolean isLockdown) {
|
||||
return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
|
||||
isEnabled ? mPackageName : null, isLockdown, /* lockdownWhitelist */ null);
|
||||
isEnabled ? mPackageName : null, isLockdown);
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
|
@@ -200,7 +200,7 @@ public class ConfigDialogFragment extends InstrumentedDialogFragment implements
|
||||
|
||||
final ConnectivityManager conn = ConnectivityManager.from(mContext);
|
||||
conn.setAlwaysOnVpnPackageForUser(UserHandle.myUserId(), null,
|
||||
/* lockdownEnabled */ false, /* lockdownWhitelist */ null);
|
||||
/* lockdownEnabled */ false);
|
||||
VpnUtils.setLockdownVpn(mContext, profile.key);
|
||||
} else {
|
||||
// update only if lockdown vpn has been changed
|
||||
|
Reference in New Issue
Block a user