summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2021-10-07 00:51:43 +0200
committerXin Li <delphij@google.com>2021-10-07 00:51:43 +0200
commitd913b9d918f7ff9dc6591d509040ee31b97dad2c (patch)
treeff4d3a6db5d68081cee847c9854678757532548a
parentMerge "Warn on `repo upload` if you're not uploading to AOSP master." (diff)
parentMerge "Warn on `repo upload` if you're not uploading to AOSP master." am: 026eb31f80 (diff)
downloadandroid_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar.gz
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar.bz2
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar.lz
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar.xz
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.tar.zst
android_bootable_recovery-d913b9d918f7ff9dc6591d509040ee31b97dad2c.zip
-rw-r--r--recovery_ui/ui.cpp17
-rw-r--r--tools/image_generator/ImageGenerator.java26
-rw-r--r--tools/recovery_l10n/res/values-kn/strings.xml2
-rw-r--r--tools/recovery_l10n/res/values-sv/strings.xml2
4 files changed, 30 insertions, 17 deletions
diff --git a/recovery_ui/ui.cpp b/recovery_ui/ui.cpp
index 330721773..6e67b1d4e 100644
--- a/recovery_ui/ui.cpp
+++ b/recovery_ui/ui.cpp
@@ -48,6 +48,10 @@ constexpr const char* MAX_BRIGHTNESS_FILE = "/sys/class/leds/lcd-backlight/max_b
constexpr const char* BRIGHTNESS_FILE_SDM = "/sys/class/backlight/panel0-backlight/brightness";
constexpr const char* MAX_BRIGHTNESS_FILE_SDM =
"/sys/class/backlight/panel0-backlight/max_brightness";
+constexpr const char* BRIGHTNESS_FILE_PWM =
+ "/sys/class/backlight/pwm-backlight.0/brightness";
+constexpr const char* MAX_BRIGHTNESS_FILE_PWM =
+ "/sys/class/backlight/pwm-backlight.0/max_brightness";
constexpr int kDefaultTouchLowThreshold = 50;
constexpr int kDefaultTouchHighThreshold = 90;
@@ -106,10 +110,19 @@ bool RecoveryUI::InitScreensaver() {
return false;
}
if (access(brightness_file_.c_str(), R_OK | W_OK)) {
- brightness_file_ = BRIGHTNESS_FILE_SDM;
+ if (!access(BRIGHTNESS_FILE_SDM, R_OK | W_OK)) {
+ brightness_file_ = BRIGHTNESS_FILE_SDM;
+ } else {
+ brightness_file_ = BRIGHTNESS_FILE_PWM;
+ }
}
+
if (access(max_brightness_file_.c_str(), R_OK)) {
- max_brightness_file_ = MAX_BRIGHTNESS_FILE_SDM;
+ if (!access(MAX_BRIGHTNESS_FILE_SDM, R_OK)) {
+ max_brightness_file_ = MAX_BRIGHTNESS_FILE_SDM;
+ } else {
+ max_brightness_file_ = MAX_BRIGHTNESS_FILE_PWM;
+ }
}
// Set the initial brightness level based on the max brightness. Note that reading the initial
// value from BRIGHTNESS_FILE doesn't give the actual brightness value (bullhead, sailfish), so
diff --git a/tools/image_generator/ImageGenerator.java b/tools/image_generator/ImageGenerator.java
index 1da43e5c6..6c5ea4b5f 100644
--- a/tools/image_generator/ImageGenerator.java
+++ b/tools/image_generator/ImageGenerator.java
@@ -113,30 +113,30 @@ public class ImageGenerator {
private static final Map<String, String> LANGUAGE_TO_FONT_MAP =
new TreeMap<String, String>() {
{
- put("am", "NotoSansEthiopic-Regular");
+ put("am", "NotoSansEthiopic-VF");
put("ar", "NotoNaskhArabicUI-Regular");
- put("as", "NotoSansBengaliUI-Regular");
- put("bn", "NotoSansBengaliUI-Regular");
+ put("as", "NotoSansBengaliUI-VF");
+ put("bn", "NotoSansBengaliUI-VF");
put("fa", "NotoNaskhArabicUI-Regular");
put("gu", "NotoSansGujaratiUI-Regular");
- put("hi", "NotoSansDevanagariUI-Regular");
- put("hy", "NotoSansArmenian-Regular");
+ put("hi", "NotoSansDevanagariUI-VF");
+ put("hy", "NotoSansArmenian-VF");
put("iw", "NotoSansHebrew-Regular");
put("ja", "NotoSansCJK-Regular");
put("ka", "NotoSansGeorgian-VF");
put("ko", "NotoSansCJK-Regular");
put("km", "NotoSansKhmerUI-Regular");
- put("kn", "NotoSansKannadaUI-Regular");
+ put("kn", "NotoSansKannadaUI-VF");
put("lo", "NotoSansLaoUI-Regular");
- put("ml", "NotoSansMalayalamUI-Regular");
- put("mr", "NotoSansDevanagariUI-Regular");
+ put("ml", "NotoSansMalayalamUI-VF");
+ put("mr", "NotoSansDevanagariUI-VF");
put("my", "NotoSansMyanmarUI-Regular");
- put("ne", "NotoSansDevanagariUI-Regular");
+ put("ne", "NotoSansDevanagariUI-VF");
put("or", "NotoSansOriya-Regular");
- put("pa", "NotoSansGurmukhiUI-Regular");
- put("si", "NotoSansSinhala-Regular");
- put("ta", "NotoSansTamilUI-Regular");
- put("te", "NotoSansTeluguUI-Regular");
+ put("pa", "NotoSansGurmukhiUI-VF");
+ put("si", "NotoSansSinhalaUI-VF");
+ put("ta", "NotoSansTamilUI-VF");
+ put("te", "NotoSansTeluguUI-VF");
put("th", "NotoSansThaiUI-Regular");
put("ur", "NotoNaskhArabicUI-Regular");
put("zh", "NotoSansCJK-Regular");
diff --git a/tools/recovery_l10n/res/values-kn/strings.xml b/tools/recovery_l10n/res/values-kn/strings.xml
index eafd831e7..a98f4692a 100644
--- a/tools/recovery_l10n/res/values-kn/strings.xml
+++ b/tools/recovery_l10n/res/values-kn/strings.xml
@@ -8,7 +8,7 @@
<string name="recovery_installing_security" msgid="9184031299717114342">"ಭದ್ರತೆಯ ಅಪ್‌ಡೇಟ್‌ ಸ್ಥಾಪಿಸಲಾಗುತ್ತಿದೆ"</string>
<string name="recovery_wipe_data_menu_header" msgid="550255032058254478">"Android ಸಿಸ್ಟಂ ಅನ್ನು ಲೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ. ನಿಮ್ಮ ಡೇಟಾ ದೋಷಪೂರಿತವಾಗಿರಬಹುದು. ನೀವು ಈ ಸಂದೇಶ ಪಡೆಯುವುದು ಮುಂದುವರಿದರೆ, ನೀವು ಫ್ಯಾಕ್ಟರಿ ಡೇಟಾ ರಿಸೆಟ್ ಮಾಡುವ ಅಗತ್ಯವಿದೆ ಮತ್ತು ಈ ಸಾಧನದಲ್ಲಿ ಸಂಗ್ರಹಿಸಲಾದ ಎಲ್ಲಾ ಬಳಕೆದಾರರ ಡೇಟಾವನ್ನು ಅಳಿಸಬೇಕಾಗುತ್ತದೆ."</string>
<string name="recovery_try_again" msgid="7168248750158873496">"ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ"</string>
- <string name="recovery_factory_data_reset" msgid="7321351565602894783">"ಫ್ಯಾಕ್ಟರಿ ಡೇಟಾ ರೀಸೆಟ್"</string>
+ <string name="recovery_factory_data_reset" msgid="7321351565602894783">"ಫ್ಯಾಕ್ಟರಿ ಡೇಟಾ ರಿಸೆಟ್‌"</string>
<string name="recovery_wipe_data_confirmation" msgid="5439823343348043954">"ಎಲ್ಲಾ ಬಳಕೆದಾರರ ಡೇಟಾವನ್ನು ಅಳಿಸುವುದೇ?\n\n ಇದನ್ನು ರದ್ದುಗೊಳಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ!"</string>
<string name="recovery_cancel_wipe_data" msgid="66987687653647384">"ರದ್ದುಮಾಡಿ"</string>
</resources>
diff --git a/tools/recovery_l10n/res/values-sv/strings.xml b/tools/recovery_l10n/res/values-sv/strings.xml
index baf8e1830..cf43b2511 100644
--- a/tools/recovery_l10n/res/values-sv/strings.xml
+++ b/tools/recovery_l10n/res/values-sv/strings.xml
@@ -2,7 +2,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="recovery_installing" msgid="2013591905463558223">"Systemuppdatering installeras"</string>
- <string name="recovery_erasing" msgid="7334826894904037088">"Raderar"</string>
+ <string name="recovery_erasing" msgid="7334826894904037088">"Rensar"</string>
<string name="recovery_no_command" msgid="4465476568623024327">"Inget kommando"</string>
<string name="recovery_error" msgid="5748178989622716736">"Fel!"</string>
<string name="recovery_installing_security" msgid="9184031299717114342">"Säkerhetsuppdatering installeras"</string>