fix CC for work profiles

Bug: 22257554
Change-Id: I09f62956d01f91d3014d9fa250aaff68ab5e1a9b
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index a18d860..d25d8c3 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -1235,4 +1235,15 @@
                 Spannable.SPAN_INCLUSIVE_INCLUSIVE);
         return str;
     }
-}
\ No newline at end of file
+
+    public static int getEffectiveUserId(Context context) {
+        UserManager um = UserManager.get(context);
+        if (um != null) {
+            return um.getCredentialOwnerProfile(UserHandle.myUserId());
+        } else {
+            Log.e(TAG, "Unable to acquire UserManager");
+            return UserHandle.myUserId();
+        }
+    }
+}
+