Check schemas using getSchema in VisibilityStore.

This switches away from the package-private hasSchemaTypeLocked method
that is only package-private because VisibilityStore uses it. Instead,
use the publicly-supported getSchema API. Using getSchema will be less
efficient than hasSchemaTypeLocked, but it should only be called once
during initialization so it won't be reoccuring.

The change to remove hasSchemaTypeLocked from AppSearchImpl will be
made upstream in go/ag/13556686

Bug: 180058203
Test: presubmit
Change-Id: I2bafb8243bb15f321633eae5ed37676201e98c84
1 file changed