Allow per-app opt in to use system ANGLE.
Previously the per-app opt in only works for ANGLE apk, this patch refactors the logic to allow per-app opt in to work for system ANGLE. This patch checks whether system ANGLE is supported and if it presents, uses it if the ANGLE apk setup fails. With this patch, the per-app opt in will function this way: 1) When full ANGLE apk is installed Regardless of whether system ANGLE is present, the "angle" option will use ANGLE apk, the "native" option will switch to native GLES drivers specified by ro.hardware.egl, the "default" option will use whatever the default graphics driver is loaded. 2) When full ANGLE apk is not installed and system ANGLE is present The "angle" option will use system ANGLE, the "native" option will switch to native GLES drivers specified by ro.hardware.egl, the "default" option will use whatever the default graphics driver is loaded. 3) When full ANGLE apk is not installed and system ANGLE doesn't exist The per-app option will not function at all. Minor: clean up unused and unnecessary variables. Minor: Avoid sending toast when ANGLE apk doesn't present Bug: b/283858001 Test: test with camera Test: atest CtsAngleIntegrationHostTestCases Change-Id: I83b3c2ccbe7cb38f71418afde4254f48153ab6b3 Merged-In: I83b3c2ccbe7cb38f71418afde4254f48153ab6b3
Loading
Please register or sign in to comment