summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robin Lee <rgl@google.com> 2015-01-08 22:46:44 +0000
committer Robin Lee <rgl@google.com> 2015-01-09 11:25:04 +0000
commit7f7ea82c28f01798b15686aa45733885beebcc6e (patch)
treea623a83f584636de7adcdfccb283291a1c1ee2f2
parentbde7bc45af2bb7f9bee8096d45973f25cc00c5db (diff)
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
-rw-r--r--core/res/res/values/strings.xml8
-rwxr-xr-xcore/res/res/values/symbols.xml1
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java5
3 files changed, 11 insertions, 3 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 910b031aefb8..0d76c25bd94d 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] -->
<string name="ssl_ca_cert_warning">Network may be monitored</string>
<!-- Content text for a notification. The Title of the notification is "ssl_ca_cert_warning",
- i.e. "Network may be monitored". This says that an unknown party is doing the monitoring.
+ i.e. "Network may be monitored". This says that an unknown party is doing the monitoring.
[CHAR LIMIT=100]-->
<string name="ssl_ca_cert_noti_by_unknown">By an unknown third party</string>
<!-- Content text for a notification. The Title of the notification is "ssl_ca_cert_warning",
- i.e. "Network may be monitored". This indicates who is doing the monitoring.
+ i.e. "Network may be monitored". This indicates that an unspecified administrator is doing
+ the monitoring. [CHAR LIMIT=100]-->
+ <string name="ssl_ca_cert_noti_by_administrator">By your work profile administrator</string>
+ <!-- Content text for a notification. The Title of the notification is "ssl_ca_cert_warning",
+ i.e. "Network may be monitored". This indicates who is doing the monitoring.
[CHAR LIMIT=100]-->
<string name="ssl_ca_cert_noti_managed">By <xliff:g id="managing_domain">%s</xliff:g></string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 5fc0ce5d72e8..4a1ed5546ed7 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1041,6 +1041,7 @@
<java-symbol type="string" name="write_fail_reason_cancelled" />
<java-symbol type="string" name="write_fail_reason_cannot_write" />
<java-symbol type="string" name="ssl_ca_cert_noti_by_unknown" />
+ <java-symbol type="string" name="ssl_ca_cert_noti_by_administrator" />
<java-symbol type="string" name="ssl_ca_cert_noti_managed" />
<java-symbol type="string" name="ssl_ca_cert_warning" />
<java-symbol type="string" name="work_profile_deleted" />
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 5e405ceb83d0..579fae4e2ccb 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 {