Add global HTTP proxy to Privacy Settings page
This CL allows the user to see on the Enterprise Privacy Settings page whether the admin set a global HTTP proxy. Test: make RunSettingsRoboTests Bug: 32692748 Change-Id: I3c7c46f806f39c90425fd8e098a749f3cc1e9278
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.vpn2;
|
||||
|
||||
import android.net.ProxyInfo;
|
||||
|
||||
/**
|
||||
* This interface replicates a subset of the android.net.ConnectivityManager (CM). The interface
|
||||
* exists so that we can use a thin wrapper around the CM in production code and a mock in tests.
|
||||
@@ -30,4 +32,11 @@ public interface ConnectivityManagerWrapper {
|
||||
* @see android.net.ConnectivityManager#getAlwaysOnVpnPackageForUser
|
||||
*/
|
||||
String getAlwaysOnVpnPackageForUser(int userId);
|
||||
|
||||
/**
|
||||
* Calls {@code ConnectivityManager.getGlobalProxy()}.
|
||||
*
|
||||
* @see android.net.ConnectivityManager#getGlobalProxy
|
||||
*/
|
||||
ProxyInfo getGlobalProxy();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.vpn2;
|
||||
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.ProxyInfo;
|
||||
|
||||
public class ConnectivityManagerWrapperImpl implements ConnectivityManagerWrapper {
|
||||
|
||||
@@ -30,4 +31,9 @@ public class ConnectivityManagerWrapperImpl implements ConnectivityManagerWrappe
|
||||
public String getAlwaysOnVpnPackageForUser(int userId) {
|
||||
return mCm.getAlwaysOnVpnPackageForUser(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProxyInfo getGlobalProxy() {
|
||||
return mCm.getGlobalProxy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user