Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1e0784e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7054508 from 08b3146a to sc-release

Change-Id: I74dcfb2b7286d1988ae1bc04b07d817da6aad284
parents 1a04630e 08b3146a
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -143,3 +143,17 @@ Note that this mechanism applies to both of normal boot and recovery modes.
Both of the two conditions need to be satisfied. Although `ro.adb.secure` is a runtime property, its
value is set at build time (written into `/prop.default`). It defaults to `1` on `-user` builds, and
`0` for other build variants. The value is overridable via `PRODUCT_DEFAULT_PROPERTY_OVERRIDES`.

Localization of the background texts
------------------------------------

The recovery image supports localization of several background texts, e.g. installing, error,
factory reset warnings, etc. For devices using `xxhdpi` and `xxxhdpi`, the build system generates
these localization images dynamically since android-10 when building the recovery image. While
the static images under res-*dpi/images/ is used for other display resolutions and as a
backup.

Check the invocation of the image_generator tool in the [makefile]. And the detailed usage of the
image_generator is documented [here](./tools/image_generator/README.md).

[makefile]: https://android.googlesource.com/platform/build/+/refs/heads/master/core/Makefile#1800
+1 −1
Original line number Diff line number Diff line
@@ -450,5 +450,5 @@ int res_create_localized_alpha_surface(const char* name,
}

void res_free_surface(GRSurface* surface) {
  free(surface);
  delete(surface);
}
+10 −0
Original line number Diff line number Diff line
@@ -19,3 +19,13 @@ emulators with different dpi.
4. `resourceDirectory`: The resource directory that contains all the translated
   strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/
5. `outputFilename`: Path to the generated image.

# Locales
Supported locales and background texts are located in
[tools/recovery_l10n/res/](../recovery_l10n/res/values). For each background text, the tool renders
a localized image for every supported locale.

Each individual localized image contains an encoded locale header string, and the rendered
background text. The locale header string is generated by `Locale.forLanguageTag`. And sample
result include `en-US`, `zh-CN`, etc. These individual images are then concatenated together to
form the final resource image that locates in res/images, e.g. `install_text.png`