Prevent apps from accessing protected content providers without query
permission

- If a package tried to access a protected content provider (i.e. a
content provider with grantUriPermission=false), without having adequate
visibility, calling package would force close due to a SecurityException.
- InstallStart now checks if the calling package has visibility of the package
defining the content provider and also handles the SecurityException if
raised.

Bug: 195963690
Test: atest CtsContentProviderTestsWithVisibility CtsContentProviderTestsWithoutVisibility

Change-Id: I8dd1b1a18a9ca07a4a8184f9aacddfed9d171f19
9 files changed