Check if ANGLE is installed before running tests

Normally, a device indicates that ANGLE is present with the RO property
ro.gfx.angle.supported. However, GSI overwrites the system.img that
contains the ANGLE libraries, without also overwriting the RO property.
This leads the CTS tests CtsAngleIntegrationHostTestCases to believe
ANGLE is installed, and then the tests fail since ANGLE is not actually
on the device and can't be loaded.

We had a few goals when writing the CTS tests to validate ANGLE on
devices with the libraries versus being skipped on devices without
ANGLE:
1. We didn't want to enforce the APK package name, in case other
   vendors wanted to include their own builds of ANGLE.
2. We aren't sure the ANGLE libraries will always be packaged in an
APK/APEX.

Neither of these are technical requirements. For the Android S QPR1,
ANGLE is only being shipped with P21 devices, not with any other
vendors, so restricting the package name is fine. Additionally, the
libraries will be packaged in an APK for the forseeable future.

To solve the GSI issue, the tests will be updated to check if the ANGLE
package com.android.angle is installed on the device before running.

If checking the package name in the future is too restrictive, we can
improve the checking once we have more concrete requirements.

Bug: b/198390495
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I5e2e10fcf7a1f3b2f4e2a7f957f1527fba956175
(cherry picked from commit f858b6eb5e00f683018e0da6d45443e8dd5a9fcd)
2 files changed