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:
@@ -19,6 +19,7 @@ package com.android.settings.enterprise;
|
||||
import android.content.ComponentName;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.net.ProxyInfo;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
|
||||
@@ -146,4 +147,14 @@ public final class EnterprisePrivacyFeatureProviderImplTest {
|
||||
.thenReturn(VPN_PACKAGE_ID);
|
||||
assertThat(mProvider.isAlwaysOnVpnSetInManagedProfile()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsGlobalHttpProxySet() {
|
||||
when(mConnectivityManger.getGlobalProxy()).thenReturn(null);
|
||||
assertThat(mProvider.isGlobalHttpProxySet()).isFalse();
|
||||
|
||||
when(mConnectivityManger.getGlobalProxy()).thenReturn(
|
||||
ProxyInfo.buildDirectProxy("localhost", 123));
|
||||
assertThat(mProvider.isGlobalHttpProxySet()).isTrue();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user