Man detained for hoisting Pakistani flag