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

Commit 10377240 authored by Alex Johnston's avatar Alex Johnston
Browse files

Update QS network logging string

If network logging is enabled on the work profile
by a profile owner, use the string 'Work profile
network activity is visible to your IT admin'

Bug: 183606908
Test: atest com.android.systemui.qs.QSSecurityFooterTest
      manual testing - enable network logging as a
      profile owner on a BYOD device and a corp-owned
      device. Verify correct string.
Change-Id: I7b6537ea5e7b906f49f353a92a8911df1fbae631
parent 385414ee
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1282,6 +1282,9 @@
    <!-- Disclosure at the bottom of Quick Settings that indicates that the device has a managed profile which can be monitored by the profile owner [CHAR LIMIT=100] -->
    <string name="quick_settings_disclosure_named_managed_profile_monitoring"><xliff:g id="organization_name" example="Foo, Inc.">%1$s</xliff:g> may monitor network traffic in your work profile</string>

    <!-- Disclosure at the bottom of Quick Settings that indicates that the user's device has a managed profile where network activity is visible to their IT admin [CHAR LIMIT=100] -->
    <string name="quick_settings_disclosure_managed_profile_network_activity">Work profile network activity is visible to your IT admin</string>

    <!-- Disclosure at the bottom of Quick Settings that indicates that a certificate authorithy is installed on this device and the traffic might be monitored [CHAR LIMIT=100] -->
    <string name="quick_settings_disclosure_monitoring">Network may be monitored</string>

+4 −18
Original line number Diff line number Diff line
@@ -283,31 +283,17 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen
            return mContext.getString(R.string.quick_settings_disclosure_named_vpn,
                    vpnName);
        }
        if (isProfileOwnerOfOrganizationOwnedDevice) {
            if (isNetworkLoggingEnabled) {
                if (organizationName == null) {
                    return mContext.getString(
                            R.string.quick_settings_disclosure_management_monitoring);
                }
        if (hasWorkProfile && isNetworkLoggingEnabled) {
            return mContext.getString(
                        R.string.quick_settings_disclosure_named_management_monitoring,
                        organizationName);
                    R.string.quick_settings_disclosure_managed_profile_network_activity);
        }
        if (isProfileOwnerOfOrganizationOwnedDevice) {
            if (workProfileOrganizationName == null) {
                return mContext.getString(R.string.quick_settings_disclosure_management);
            }
            return mContext.getString(R.string.quick_settings_disclosure_named_management,
                    workProfileOrganizationName);
        }
        if (hasWorkProfile && isNetworkLoggingEnabled) {
            if (workProfileOrganizationName == null) {
                return mContext.getString(
                        R.string.quick_settings_disclosure_managed_profile_monitoring);
            }
            return mContext.getString(
                    R.string.quick_settings_disclosure_named_managed_profile_monitoring,
                    workProfileOrganizationName);
        }
        return null;
    }