It depends on how you use it. If an individual is using a cellphone for his/her entertainment even though the professor/teacher is having a lecture, then it is unethical. But if the individual is using his/her own phone for an emergency matter then it should be considered.