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
This commit is contained in:
Alex Johnston
2021-03-24 16:36:48 +00:00
parent 385414ee28
commit 10377240e3
2 changed files with 7 additions and 18 deletions

View File

@@ -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>

View File

@@ -283,31 +283,17 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen
return mContext.getString(R.string.quick_settings_disclosure_named_vpn,
vpnName);
}
if (hasWorkProfile && isNetworkLoggingEnabled) {
return mContext.getString(
R.string.quick_settings_disclosure_managed_profile_network_activity);
}
if (isProfileOwnerOfOrganizationOwnedDevice) {
if (isNetworkLoggingEnabled) {
if (organizationName == null) {
return mContext.getString(
R.string.quick_settings_disclosure_management_monitoring);
}
return mContext.getString(
R.string.quick_settings_disclosure_named_management_monitoring,
organizationName);
}
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;
}