hiding faces in texture paint

I click on the face selection masking thing next to the layers, select faces and hide them because I want to paint on the faces behind them. I cant paint in the face selection mode and when i go back the faces are not hidden. How is this supposed to work?

select the faces in edit mode!