A pilot may not use his or her phone for non-flight related tasks during takeoff, landing, or while flying under 10,000. Upon reaching cruising altitude the pilot is free to use their phone at their own discretion. This is, however, the FAA policy so for commercial pilots it may vary company to company.