Tighten flags enforcement, API to test Uris.

Check and throw if callers request invalid grant flags.  Add API to
test if a Uri is backend by a DocumentsProvider.

Bug: 10919391, 10935608
Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
6 files changed