private static Pair<Uri,Review> review(Context context,ContentResolver cr,long id,Set<CharSequence> lines,Bitmap icon){
  Uri photo=null;
  Review review=null;
  String[] proj={Reviews.RESTAURANT_ID,Reviews.TYPE_ID,Reviews.COMMENTS,alias(ReviewsJoinAll.REVIEW_RATING),alias_(ReviewsJoinAll.RESTAURANT_NAME),alias_(ReviewsJoinAll.CONTACT_NAME)};
  String sel=ReviewsJoinAll.REVIEW_STATUS_ID + " = ? AND " + ReviewsJoinAll.RESTAURANT_STATUS_ID+ " = ?";
  String[] args=Elements.toStrings(ACTIVE.id,ACTIVE.id);
  EasyCursor c=new EasyCursor(cr.query(ContentUris.withAppendedId(ReviewsJoinAll.CONTENT_URI,id),proj,sel,args,null));
  if (c.moveToFirst()) {
    review=Reviews.first(c,false);
    String restaurant=c.getString(aliased_(ReviewsJoinAll.RESTAURANT_NAME));
switch (review.type) {
case PRIVATE:
      String contact=c.getString(aliased_(ReviewsJoinAll.CONTACT_NAME));
    if (contact == null) {
      contact=context.getString(R.string.non_contact);
    }
  lines.add(context.getString(R.string.new_friend_review,contact,restaurant));
break;
case GOOGLE:
lines.add(context.getString(R.string.new_public_review,restaurant));
break;
}
photo=icon == null ? RestaurantPhotos.uriForRestaurant(review.restaurantId) : EMPTY;
}
c.close();
return Pair.create(photo,review);
}

private static Pair < Uri , Review > review ( Context context , ContentResolver cr , long id , Set < CharSequence > lines , Bitmap icon ) { Uri photo = null ; Review review = null ; String [ ] proj = { Reviews . RESTAURANT_ID , Reviews . TYPE_ID , Reviews . COMMENTS , alias ( ReviewsJoinAll . REVIEW_RATING ) , alias_ ( ReviewsJoinAll . RESTAURANT_NAME ) , alias_ ( ReviewsJoinAll . CONTACT_NAME ) } ; String sel = ReviewsJoinAll . REVIEW_STATUS_ID + " = ? AND " + ReviewsJoinAll . RESTAURANT_STATUS_ID + " = ?" ; String [ ] args = Elements . toStrings ( ACTIVE . id , ACTIVE . id ) ; EasyCursor c = new EasyCursor ( cr . query ( ContentUris . withAppendedId ( ReviewsJoinAll . CONTENT_URI , id ) , proj , sel , args , null ) ) ; if ( c . moveToFirst ( ) ) { review = Reviews . first ( c , false ) ; String restaurant = c . getString ( aliased_ ( ReviewsJoinAll . RESTAURANT_NAME ) ) ; switch ( review . type ) { case PRIVATE : String contact = c . getString ( aliased_ ( ReviewsJoinAll . CONTACT_NAME ) ) ; if ( contact == null ) { contact = context . getString ( R . string . non_contact ) ; } lines . add ( context . getString ( R . string . new_friend_review , contact , restaurant ) ) ; break ; case GOOGLE : lines . add ( context . getString ( R . string . new_public_review , restaurant ) ) ; break ; } photo = icon == null ? RestaurantPhotos . uriForRestaurant ( review . restaurantId ) : EMPTY ; } c . close ( ) ; return Pair . create ( photo , review ) ; }
add a message to the list about the review .
