Added permissionsProvider and changed activityProvider to use it.