I'm not sure if it's what you need, but in includes/functions_album.php there are functions can_view_private_albums($userid) and can_view_profile_albums($userid). They tell whether the current viewing user is allowed to view private or profile albums of the given $userid. You could then read the state column of the albums table and if it's 'private' or 'profile', call the corresponding function to determine whether or not to display it. BTW, I got this from looking at album.php around line 1872, the section that starts with this code:
Code:
if ($_REQUEST['do'] == 'user')
{
so I haven't actually tried it out at all.