The police had warned Xie Yang, a human rights lawyer, not to go to Shanghai to visit the mother of a dissident. He went to the airport anyway.
His phone’s health code app — a digital pass indicating possible exposure to the coronavirus — was green, which meant he could travel. His home city, Changsha, had no Covid-19 cases, and he had not left in weeks.
Then his app turned red, flagging him as high risk. Airport security tried to put him in quarantine, but he resisted. Mr. Xie accused the authorities of meddling with his health code to bar him from traveling.