From 7f7ea82c28f01798b15686aa45733885beebcc6e Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Thu, 8 Jan 2015 22:46:44 +0000 Subject: [PATCH] Profile owner hint in warning for extra CAs The version of the warning with a named installer should be shown in the case of a managed profile, not only a managed device. Bug: 18224038 Change-Id: I27865f77e963b9b15416f2e4a4ffc38fed8f5532 --- core/res/res/values/strings.xml | 8 ++++++-- core/res/res/values/symbols.xml | 1 + .../server/devicepolicy/DevicePolicyManagerService.java | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 910b031aefb8b..0d76c25bd94df 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -341,11 +341,15 @@ device. Indicates to the user that SSL traffic can be intercepted. [CHAR LIMIT=NONE] --> Network may be monitored By an unknown third party + By your work profile administrator + By %s diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 5fc0ce5d72e86..4a1ed5546ed7b 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1041,6 +1041,7 @@ + diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 5e405ceb83d09..579fae4e2ccbb 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -1694,7 +1694,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { int smallIconId; String contentText; final String ownerName = getDeviceOwnerName(); - if (ownerName != null) { + if (isManagedProfile(userHandle.getIdentifier())) { + contentText = mContext.getString(R.string.ssl_ca_cert_noti_by_administrator); + smallIconId = R.drawable.stat_sys_certificate_info; + } else if (ownerName != null) { contentText = mContext.getString(R.string.ssl_ca_cert_noti_managed, ownerName); smallIconId = R.drawable.stat_sys_certificate_info; } else {