I saw the expression 'are you decent?' in the film 'About a boy' in the situation where a house is locked then a friend who has a key and don't know well there is anybody in the house enter there. But I heard that it's sort of outdated expression. Is it still used these days in the daily life?
I hear and use it from time to time and wouldn’t consider it outdated. It is a way for a person to ensure someone else (out of view) is clothed or presentable before entering the room. This reference dubs it a “pause-at-the-door formality,” and it does have older origins: http://www.word-detective.com/2013/02/are-you-decent/?wpmp_tp=1
It's a still appropriate subtle way of asking if it's ok to enter a room without asking "what are you doing". It's equivalent to "may I enter" without necessarily requiring permission but absolutely stating they may have the right to do so while giving the occupant permission to decline based on that person's current state.
In other words, what the occupant is doing isn't relevant to the asker, the asker may have the right, and the occupant is given the opportunity to decline based on state. Of course this depends upon the honesty of the occupant.
My father used to ask if I was decent while knocking on my bedroom door. I considered it charming and intended only to inquire whether I was dressed.