summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-12-09 23:33:15 +0100
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-12-09 23:33:15 +0100
commitfff38d9446d8642f6c868b76aef30eeff2a847fb (patch)
tree19fe3572bd2f59e65cb8ca8d04693c5ba12229cd
parentMerge "Add mechanism for device-specific loop images" (diff)
parentRevert "Add mechanism for device-specific loop images" (diff)
downloadandroid_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar.gz
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar.bz2
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar.lz
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar.xz
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.tar.zst
android_bootable_recovery-fff38d9446d8642f6c868b76aef30eeff2a847fb.zip
Diffstat (limited to '')
-rw-r--r--recovery_ui/screen_ui.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp
index b3ef113a7..087fc0e84 100644
--- a/recovery_ui/screen_ui.cpp
+++ b/recovery_ui/screen_ui.cpp
@@ -941,27 +941,17 @@ void ScreenRecoveryUI::LoadAnimation() {
closedir);
dirent* de;
std::vector<std::string> intro_frame_names;
- std::vector<std::string> default_loop_frame_names;
- std::vector<std::string> device_loop_frame_names;
- // Create string format for device-specific loop animations.
- std::string deviceformat = android::base::GetProperty("ro.product.product.name", "");
- deviceformat += "%d%n.png";
+ std::vector<std::string> loop_frame_names;
while ((de = readdir(dir.get())) != nullptr) {
int value, num_chars;
if (sscanf(de->d_name, "intro%d%n.png", &value, &num_chars) == 1) {
intro_frame_names.emplace_back(de->d_name, num_chars);
} else if (sscanf(de->d_name, "loop%d%n.png", &value, &num_chars) == 1) {
- default_loop_frame_names.emplace_back(de->d_name, num_chars);
- } else if (sscanf(de->d_name, deviceformat.c_str(), &value, &num_chars) == 1) {
- device_loop_frame_names.emplace_back(de->d_name, num_chars);
+ loop_frame_names.emplace_back(de->d_name, num_chars);
}
}
- // Favor device-specific loop frames, if they exist.
- auto& loop_frame_names =
- device_loop_frame_names.empty() ? default_loop_frame_names : device_loop_frame_names;
-
size_t intro_frames = intro_frame_names.size();
size_t loop_frames = loop_frame_names.size();