fix CC for work profiles
Bug: 22257554 Change-Id: I09f62956d01f91d3014d9fa250aaff68ab5e1a9b
This commit is contained in:
@@ -1235,4 +1235,15 @@ public final class Utils {
|
||||
Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user