Fix up protected apps filter.

Move filtering to correct place (when querying providers,
ResolveInfo.activityInfo is null), and port over commit
4dad4a4e84ec385a80ebfae91c4dcd03ec30c9d0 from cm-11.0.

Change-Id: I355642d3c1c45be39148d913ab03651aebb5a4e8