private String[] selectOptionStringArray(String user1Id,String user2Id,String user1Name,String user2Name,boolean isOwner,boolean isPresent,String type){
  String[] options;
  if (type.equals(AppConstants.CommentType.COMMENTS)) {
    options=new String[]{"View " + user1Name + "'s profile"};
  }
 else   if (user1Id.equals(user2Id)) {
    if (isOwner) {
      options=new String[]{"View " + user1Name + "'s profile","Call " + user1Name,"Message " + user1Name};
    }
 else {
      options=new String[]{"View " + user1Name + "'s profile"};
    }
    if (!isPresent && isOwner) {
      options=new String[]{"Call " + user1Name,"View " + user1Name + "'s profile"};
    }
 else     if (!isPresent && !isOwner) {
      options=new String[]{"View " + user2Name + "'s profile"};
    }
    if (type.equals(AppConstants.CommentType.CHAT)) {
      options=new String[]{"View " + user1Name + "'s profile","Message " + user1Name};
    }
  }
 else {
    if (isOwner) {
      options=new String[]{"View " + user1Name + "'s profile","View " + user2Name + "'s profile","Call " + user1Name,"Message " + user1Name};
    }
 else {
      options=new String[]{"View " + user1Name + "'s profile","View " + user2Name + "'s profile"};
    }
    if (!isPresent && isOwner) {
      options=new String[]{"Call " + user1Name,"View " + user2Name + "'s profile"};
    }
 else     if (!isPresent && !isOwner) {
      options=new String[]{"View " + user2Name + "'s profile"};
    }
    if (type.equals(AppConstants.CommentType.CHAT) && isOwner) {
      options=new String[]{"View " + user1Name + "'s profile","View " + user2Name + "'s profile","Message " + user1Name};
    }
 else     if (type.equals(AppConstants.CommentType.CHAT) && !isOwner) {
      options=new String[]{"View " + user1Name + "'s profile","View " + user2Name + "'s profile"};
    }
  }
  return options;
}

private String [ ] selectOptionStringArray ( String user1Id , String user2Id , String user1Name , String user2Name , boolean isOwner , boolean isPresent , String type ) { String [ ] options ; if ( type . equals ( AppConstants . CommentType . COMMENTS ) ) { options = new String [ ] { "View " + user1Name + "'s profile" } ; } else if ( user1Id . equals ( user2Id ) ) { if ( isOwner ) { options = new String [ ] { "View " + user1Name + "'s profile" , "Call " + user1Name , "Message " + user1Name } ; } else { options = new String [ ] { "View " + user1Name + "'s profile" } ; } if ( ! isPresent && isOwner ) { options = new String [ ] { "Call " + user1Name , "View " + user1Name + "'s profile" } ; } else if ( ! isPresent && ! isOwner ) { options = new String [ ] { "View " + user2Name + "'s profile" } ; } if ( type . equals ( AppConstants . CommentType . CHAT ) ) { options = new String [ ] { "View " + user1Name + "'s profile" , "Message " + user1Name } ; } } else { if ( isOwner ) { options = new String [ ] { "View " + user1Name + "'s profile" , "View " + user2Name + "'s profile" , "Call " + user1Name , "Message " + user1Name } ; } else { options = new String [ ] { "View " + user1Name + "'s profile" , "View " + user2Name + "'s profile" } ; } if ( ! isPresent && isOwner ) { options = new String [ ] { "Call " + user1Name , "View " + user2Name + "'s profile" } ; } else if ( ! isPresent && ! isOwner ) { options = new String [ ] { "View " + user2Name + "'s profile" } ; } if ( type . equals ( AppConstants . CommentType . CHAT ) && isOwner ) { options = new String [ ] { "View " + user1Name + "'s profile" , "View " + user2Name + "'s profile" , "Message " + user1Name } ; } else if ( type . equals ( AppConstants . CommentType . CHAT ) && ! isOwner ) { options = new String [ ] { "View " + user1Name + "'s profile" , "View " + user2Name + "'s profile" } ; } } return options ; }
selects the list of options to be shown to the user in the dialog
