This concept, that some action the government takes is violating your constitutional rights, but that it can mitigate that by taking a third action, is the basis of how most surveillance laws work.
The govt can wiretap you speaking to your grandmother in Italy, which is illegal, but made legal by subjecting the recording to a bunch of extra rules. But then, because it eavesdropped on you legally, it can listen to that call anytime it wants using a totally different legal doctrine.