private boolean shouldPositionAvatarOnRight(){
  final boolean isRtl=Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ? getLayoutDirection() == LAYOUT_DIRECTION_RTL : false;
  final boolean assignedPosition=mAvatarPosition == AVATAR_POSITION_END;
  return isRtl ? !assignedPosition : assignedPosition;
}

private boolean shouldPositionAvatarOnRight ( ) { final boolean isRtl = Build . VERSION . SDK_INT >= Build . VERSION_CODES . JELLY_BEAN_MR1 ? getLayoutDirection ( ) == LAYOUT_DIRECTION_RTL : false ; final boolean assignedPosition = mAvatarPosition == AVATAR_POSITION_END ; return isRtl ? ! assignedPosition : assignedPosition ; }
returns true if the avatar should be positioned at the right edge of the chip . takes into account both the set avatar position ( start or end ) as well as whether the layout direction is ltr or rtl .
