am e24637e6: am 7f7ea82c: Profile owner hint in warning for extra CAs automerge: 34f3ade

* commit 'e24637e641ec1f39455f270a4d6050c4d0383515':
  Profile owner hint in warning for extra CAs
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 2ce2e05..f51e82c9 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -333,11 +333,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 9963594..77d9345 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1044,6 +1044,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 2f0525a..54454c7 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -1695,7 +1695,10 @@
             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 {