Merge "Update QS network logging string" into sc-dev

This commit is contained in:
Alex Johnston
2021-03-24 20:54:13 +00:00
committed by Android (Google) Code Review
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;
}