Notify all VMs when proxy changes.
bug:2700664 Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87
This commit is contained in:
@@ -1757,10 +1757,19 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
}
|
||||
// Remove white spaces
|
||||
proxySpec = proxySpec.trim();
|
||||
String data[] = proxySpec.split(":");
|
||||
int proxyPort = 8080;
|
||||
if (data.length > 1) {
|
||||
try {
|
||||
proxyPort = Integer.parseInt(data[1]);
|
||||
} catch (NumberFormatException e) {}
|
||||
}
|
||||
exclusionList = exclusionList.trim();
|
||||
ContentResolver res = mContext.getContentResolver();
|
||||
Settings.Secure.putString(res, Settings.Secure.HTTP_PROXY, proxySpec);
|
||||
Settings.Secure.putString(res, Settings.Secure.HTTP_PROXY_EXCLUSION_LIST, exclusionList);
|
||||
Settings.Secure.putString(res, Settings.Secure.GLOBAL_HTTP_PROXY_HOST, data[0]);
|
||||
Settings.Secure.putInt(res, Settings.Secure.GLOBAL_HTTP_PROXY_PORT, proxyPort);
|
||||
Settings.Secure.putString(res, Settings.Secure.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
|
||||
exclusionList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user