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

Commit e1dd64ef authored by Pavel Grafov's avatar Pavel Grafov Committed by android-build-merger
Browse files

Merge "Update to use new ConnectivityManager API." am: 70b1830e am: 7c477438

am: 3184142c

Change-Id: I6bc7277d0f1db1576b369443719c449fc8eeed75
parents 82b15f4e 3184142c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -164,7 +164,8 @@ 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);
                mService.setAlwaysOnVpnPackage(userId, null, /* lockdownEnabled */ false,
                        /* lockdownWhitelist */ null);
                mService.prepareVpn(mPackageInfo.packageName, VpnConfig.LEGACY_VPN, userId);
            }
        } catch (RemoteException e) {
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ public class AppManagementFragment extends SettingsPreferenceFragment

    private boolean setAlwaysOnVpn(boolean isEnabled, boolean isLockdown) {
        return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
                isEnabled ? mPackageName : null, isLockdown);
                isEnabled ? mPackageName : null, isLockdown, /* lockdownWhitelist */ null);
    }

    private void updateUI() {
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ public class ConfigDialogFragment extends InstrumentedDialogFragment implements

            final ConnectivityManager conn = ConnectivityManager.from(mContext);
            conn.setAlwaysOnVpnPackageForUser(UserHandle.myUserId(), null,
                    /* lockdownEnabled */ false);
                    /* lockdownEnabled */ false, /* lockdownWhitelist */ null);
            VpnUtils.setLockdownVpn(mContext, profile.key);
        } else {
            // update only if lockdown vpn has been changed