diff options
-rw-r--r-- | recovery_ui/ui.cpp | 17 | ||||
-rw-r--r-- | tools/image_generator/ImageGenerator.java | 26 | ||||
-rw-r--r-- | tools/recovery_l10n/res/values-fa/strings.xml | 2 |
3 files changed, 29 insertions, 16 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-fa/strings.xml b/tools/recovery_l10n/res/values-fa/strings.xml index 1c1be9ae3..7e1dbe7b1 100644 --- a/tools/recovery_l10n/res/values-fa/strings.xml +++ b/tools/recovery_l10n/res/values-fa/strings.xml @@ -9,6 +9,6 @@ <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_wipe_data_confirmation" msgid="5439823343348043954">"همه دادههای کاربر پاک شود؟\n\n این کار قابلواگرد نیست!"</string> + <string name="recovery_wipe_data_confirmation" msgid="5439823343348043954">"همه دادههای کاربر محو شود؟\n\n این کار واگردشدنی نیست!"</string> <string name="recovery_cancel_wipe_data" msgid="66987687653647384">"لغو"</string> </resources> |