; and (B) shall automatically cancel any other valid visa that is in the alien’s possession. (3) Judicial review Notwithstanding any other provision of law, including section 2241 of title 28, United States Code, or any other habeas corpus provision, and sections 1361 and 1651 of such title, no court shall have jurisdiction to review a decision by the Secretary of Homeland Security to refuse or revoke a visa, and no court shall have jurisdiction to hear any claim arising from, or any challenge to, such a refusal or revocation. (c) Authority of the Secretary of State (1) In general The Secretary of State may direct a consular officer to refuse a visa requested by an alien if the Secretary of State determines such refusal to be necessary or advisable in the security or foreign policy interests of the United States. (2) Limitation No decision by the Secretary of State to approve a visa may override a decision by the Secretary of Homeland Security under subsection (b). . (2) Authority of the Secretary of State Section 221(i) of the Immigration and Nationality Act ( 8 U.S.C. 1201(i) ) is amended by striking section, except in the context of a removal proceeding if such revocation provides the sole ground for removal under section 1227(a)(1)(B). and inserting section. . (3) Conforming Amendment Section 237(a)(1)(B) of the Immigration and Nationality Act ( 8 U.S.C. 1227(a)(1)(B) ) is amended by striking under section 221(i) . (4) Effective date The amendment made by paragraph (1) shall take effect on the date of the enactment of this Act and shall apply to visa refusals and revocations occurring before, on, or after such date. (b) Technical corrections to the Homeland Security Act Section 428(a) of the Homeland Security Act of 2002 ( 6 U.S.C. 236(a) ) is amended— (1) by striking subsection and inserting section