RIVERSIDE, Calif. — The Justice Department moved to cancel a Tuesday hearing over whether Apple should be forced to help investigators break into an iPhone used by a gunman in last year’s San Bernardino, Calif., mass shooting, saying it might no longer need Apple’s assistance to extract data from the device. In a new court filing on Monday, Justice Department lawyers wrote that as of Sunday, an outside party had demonstrated a way for the F.B.I. to possibly unlock the phone used by Syed Rizwan Farook, one of the San Bernardino gunmen. “Testing is required to determine whether it is...