Improves ActivityFilter to use static method so that can avoid keep old state problem.