236262744: Don't compute platform annotations from merge context

The parsing environment is not available when lint is only filtering and
merging module analysis results. The permission error detector was
looking up the platform annotations when analyzing the merged manifest,
which would throw exceptions (flakily, because it can normally access
the cached platform annotations from the module analysis phase, but this
won't run if the module analysis results have been cached).

However, it didn't actually *need* to compute the platform annotations,
because while it does look them up, it doesn't actually use them when
running on the merged manifest (it computes the nearest match, but then
discards the result if it's looking at a merged manifest).

This is deliberate; when we're analyzing the merged manifest, we can
(and usually do) come across permission declarations from libraries, and
we don't want to flag issues in these; there's nothing a developer can
do here.

We actually only use the merged manifest to check the
CustomPermissionTypo issue type. Therefore, the fix here is to use lint's built in `visitElement` method for all other checks, and use `checkMergedProject` ONLY for CustomPermissionTypo.

Test: Existing (though the unit test now nulls out the cached
permissions between phases, which means the test would crash as it
did flakily earlier if we were trying to compute platform
annotations from the merge phase.)

Fixes: 236262744
Change-Id: I505dffc7aee1d267362fdf72a70f5bf2217f9006
2 files changed