This specific issue was addressed in People v. Nelson when the court determined that being stopped at a red light using his cell phone is a violation of vc 23123. The court determined that being stopped at a red light is still considered "driving" for the purpose of vc 23123. Prior to Jan. 1 2017 you were permitted to hold and operate your cell phone for limited reasons. However the law changed in Jan. 2017 to where you can no longer, for any reason, "hold and operate" you cell phone while driving.
23123.5. (a) A person shall not drive a motor vehicle while holding and operating a handheld wireless telephone or an electronic wireless communications device unless the wireless telephone or electronic wireless communications device is specifically designed and configured to allow voice-operated and hands-free operation, and it is used in that manner while driving.
You have no legal defense.

