Ensures that vendor apps are not targeting pre-P SDK

Add a new test to ensure that vendor apps are not targeting pre-P SDK on
a device launching with P (or later). This will effectively prevent the
vendor apps from using private APIs in the dark grey list in P-launching
devices, but not in upgrading devices.

This change also includes a small refactoring that moves the apk
analyzing code from the setup phase to the testNonApiReferences test.
This is because the apk analyzing isn't required for the newly added
test.

Bug: 74726142
Test: atest CtsUnofficialApisUsageTestCases shows that testTargetSdk
test has run

Change-Id: I2dfabc84872f8c563c9a15246bc2ccf9db8ebc6e
1 file changed