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

Commit 0d226808 authored by Bartosz Fabianowski's avatar Bartosz Fabianowski
Browse files

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
parent fc018e46
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8009,6 +8009,8 @@
    <string name="enterprise_privacy_always_on_vpn_personal">Always-on VPN turned on in your personal profile</string>
    <!-- Label explaining that an always-on VPN was set by the admin in the work profile. [CHAR LIMIT=NONE] -->
    <string name="enterprise_privacy_always_on_vpn_work">Always-on VPN turned on in your work profile</string>
    <!-- Label explaining that a global HTTP proxy was set by the admin. [CHAR LIMIT=NONE] -->
    <string name="enterprise_privacy_global_http_proxy">Global HTTP proxy set</string>
    <!-- Preference label for the Photos & Videos storage section. [CHAR LIMIT=50] -->
    <string name="storage_photos_videos">Photos &amp; Videos</string>
+5 −0
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@
                android:title="@string/enterprise_privacy_always_on_vpn_work"
                settings:allowDividerBelow="true"
                settings:multiLine="true"/>
        <com.android.settings.DividerPreference
                android:key="global_http_proxy"
                android:title="@string/enterprise_privacy_global_http_proxy"
                settings:allowDividerBelow="true"
                settings:multiLine="true"/>
    </PreferenceCategory>

    <PreferenceCategory android:title="@string/enterprise_privacy_device_access_category">
+5 −0
Original line number Diff line number Diff line
@@ -58,4 +58,9 @@ public interface EnterprisePrivacyFeatureProvider {
     * Returns whether the Profile Owner in the managed profile (if any) set an always-on VPN.
     */
    boolean isAlwaysOnVpnSetInManagedProfile();

    /**
     * Returns whether the Device Owner set a recommended global HTTP proxy.
     */
    boolean isGlobalHttpProxySet();
}
+5 −0
Original line number Diff line number Diff line
@@ -96,4 +96,9 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
        return managedProfileUserId != -1 &&
                VpnUtils.isAlwaysOnVpnSet(mCm, managedProfileUserId);
    }

    @Override
    public boolean isGlobalHttpProxySet() {
        return mCm.getGlobalProxy() != null;
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class EnterprisePrivacySettings extends DashboardFragment {
        controllers.add(new SecurityLogsPreferenceController(context));
        controllers.add(new AlwaysOnVpnPrimaryUserPreferenceController(context));
        controllers.add(new AlwaysOnVpnManagedProfilePreferenceController(context));
        controllers.add(new GlobalHttpProxyPreferenceController(context));
        return controllers;
    }

Loading