I would like to find a way to know, from the user profile, if a work profile (profile owner) has been set up for the user.
I'm currently using this method:
public boolean isWorkProfileEnabled() {
UserManager um = (UserManager) getSystemService(USER_SERVICE);
return um.getUserProfiles().size() >= 2;
}
But this is not reliable. When it's equal 2, it can also mean a restricted profile is installed.
Someone has an idea?