Refactoring.
Remove redundant condition.
Environment.DIRECTORY_NOTIFICATIONS introduced in api v8.
Refactoring.