[1] has no mention of Xi. [2] is in 2021, way after the protests/riots.
I have reliable sources (not mass media, especially not western mass media) telling me that the security law was championed by the Hong Kong government (Carrie Lam in particular). The Chinese Central People's Government was not actively involved until the whole thing spiraled out of control.
I won't/can't tell you how involved I was in the events, but Trust Me Bro ™ I'm not just reading the news and coming to the conclusions that I wrote.