Skip to content

Commit

Permalink
packages: Use device overlay instead of GoogleWebViewOverlay on SDK<=28.
Browse files Browse the repository at this point in the history
Reports from Android 9 users indicate that `dumpsys webviewupdate` does
not contain any of the webviews listed in GoogleWebViewOverlay despite
the overlay being statically enabled according to `dumpsys overlay`, and
it containing the xml file with expected nodes when inspected with
`aapt2 dump xmltree --file res/xml/config_webview_packages.xml`.

A quick check confirms that the last Android 9 crosshatch system image
includes res/xml/config_webview_packages.xml directly in
/system/framework/framework-res.apk instead of through a separate
overlay APK.
This, together with the fact that the overlay isn't properly applied
even when residing in /system/overlay/ leads to believe that the
specific <webviewproviders> xml does not get overlaid, or at least
incorrectly.

However:
DEVICE_PACKAGE_OVERLAYS causes the overlaid files to end up in an
autogenerated RRO in device trees that declare `framework-res` (or the
wildcard `*`) in PRODUCT_ENFORCE_RRO_TARGETS. The xml from this overlay
package doesn't get overlaid accordingly either.
(sidenote: This RRO file being on /vendor, whereas opengapps supposedly
 lives completely on the system partition is the reason
 GoogleWebViewOverlay exists and is placed on /system or /product).

If anyone feels like debugging, be my guest. For now this change is
reverted to the old behaviour on SDK 24-28.

Fixes: 95a9e11
Signed-off-by: MarijnS95 <marijns95@gmail.com>
  • Loading branch information
MarijnS95 authored and acr92 committed Feb 8, 2020
1 parent fd0c140 commit 55ed81d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions opengapps-packages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ endif # end nano
PRODUCT_PACKAGES += $(filter-out $(GAPPS_EXCLUDED_PACKAGES),$(GAPPS_PRODUCT_PACKAGES))

ifeq ($(GAPPS_FORCE_WEBVIEW_OVERRIDES),true)
# starting with nougat, use a different overlay
ifneq ($(filter 26,$(call get-allowed-api-levels)),)
ifneq ($(filter 29,$(call get-allowed-api-levels)),)
# starting with Q, put the overlay in a product APK
PRODUCT_PACKAGES += GoogleWebViewOverlay
else ifneq ($(filter 24,$(call get-allowed-api-levels)),)
# starting with nougat, use a different overlay
DEVICE_PACKAGE_OVERLAYS += \
$(GAPPS_DEVICE_FILES_PATH)/overlay/webview/24
else
Expand Down

0 comments on commit 55ed81d

Please sign in to comment.