OpenDelta: Always display the error description in the extra text view

Also:
Don't limit extra text view to a single line
Add auto text sizing & scrolling where relevant
Improve some state string fetching and remove some useless strings
Make the version info text to always show at the same height relative to top
* So it doesn't dance around when we move through states
This commit is contained in:
Ido Ben-Hur 2023-02-02 02:13:04 +02:00
parent a5a5c30235
commit a3e9fb3e4a
No known key found for this signature in database
GPG Key ID: 0B827201D8C20BFE
15 changed files with 60 additions and 63 deletions

View File

@ -18,7 +18,7 @@
<TextView
android:id="@+id/text_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="30sp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:ellipsize="end"
@ -29,24 +29,27 @@
<TextView
android:id="@+id/extra_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="40sp"
android:layout_marginTop="2dp"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="9sp"
android:autoSizeMaxTextSize="14sp"
android:ellipsize="marquee"
android:singleLine="true"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:textAppearance="@style/ValueText" />
<Space
android:layout_width="match_parent"
android:layout_height="20dp" />
<TextView
android:id="@+id/progress_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:layout_height="20sp"
android:ellipsize="start"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:textAppearance="@style/ValueText" />
android:textAppearance="@style/OtherText" />
<LinearLayout
android:id="@+id/progress_container"
@ -76,20 +79,20 @@
<TextView
android:id="@+id/progress_percent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="15sp"
android:gravity="start"
android:singleLine="true"
android:textAppearance="@style/OtherText" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="15sp"
android:layout_weight="1" />
<TextView
android:id="@+id/progress_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="15sp"
android:ellipsize="marquee"
android:gravity="end"
android:singleLine="true"
@ -97,6 +100,8 @@
</LinearLayout>
<!-- Everything ABOVE this space should have a constant sp height
and never be set to GONE (only INVISIBLE) -->
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />

View File

@ -81,7 +81,6 @@
<string name="clean_files_feedback" formatted="false">Odstraněno %d souborů. Nyní stiskněte tlačítko \"Vyhledat aktualizace\"</string>
<string name="state_error_permissions">Není oprávnění k přístupu na úložiště.</string>
<string name="state_error_flash">Nepodařilo se nastavení flash. Vymažte /cache a akci opakujte.</string>
<string name="state_error_ab_flash">Nepodařilo se nastavení instalace. Restartujte a zkuste to znovu.</string>
<string name="progress_status_0">Čekání &#8230;</string>
<string name="progress_status_1">Kontroluji aktualizace &#8230;</string>
<string name="progress_status_2">Aktualizace k dispozici &#8230;</string>
@ -97,8 +96,8 @@
<string name="state_error_flash_file_title">Tento soubor nelze nainstalovat</string>
<string name="select_file_activity_title">Vyberte soubor ZIP</string>
<string name="button_select_file">Soubor</string>
<string name="state_error_ab_flash_title">Nelze nainstalovat aktualizaci AB</string>
<string name="state_error_flash_title">Nelze nainstalovat aktualizaci</string>
<string name="state_error_ab_flash">Nelze nainstalovat aktualizaci AB</string>
<string name="state_error_flash_file">Nelze nainstalovat aktualizaci</string>
<string name="channel_name">Postup aktualizace</string>
<string name="text_update_file_flash_title">Aktualizovat soubor</string>
<string name="text_info_section">Zkontrolujte, zda je k dispozici aktualizace. Po instalaci budete požádáni o restartování zařízení. Zařízení s tradiční aktualizací založenou na recovery vstoupí do recovery při restartu a spustí se instalační proces. Pokud vaše zařízení podporuje bezproblémové aktualizace (A/B), restartováním se aktualizace aktivuje.</string>

View File

@ -81,7 +81,6 @@
<string name="clean_files_feedback" formatted="false">%d Dateien gelöscht. Jetzt \"Nach Aktualisierungen suchen\" drücken</string>
<string name="state_error_permissions">Keine Berechtigung zum speichern.</string>
<string name="state_error_flash">Fehler beim Vorbereiten zum Einspielen. Bitte \"/cache \" bereinigen und wiederholen.</string>
<string name="state_error_ab_flash">Fehler beim Flashen. Bitte nach Neustart erneut versuchen.</string>
<string name="progress_status_0">Idle &#8230;</string>
<string name="progress_status_1">Suche nach Aktualisierungen &#8230;</string>
<string name="progress_status_2">Update verfügbar &#8230;</string>
@ -97,8 +96,8 @@
<string name="state_error_flash_file_title">Kann diese Datei nicht flashen</string>
<string name="select_file_activity_title">ZIP-Datei auswählen</string>
<string name="button_select_file">Datei</string>
<string name="state_error_ab_flash_title">Kann AB Update nicht flashen</string>
<string name="state_error_flash_title">Kann Update nicht flashen</string>
<string name="state_error_ab_flash">Kann AB Update nicht flashen</string>
<string name="state_error_flash_file">Kann Update nicht flashen</string>
<string name="channel_name">Aktualisierungsfortschritt</string>
<string name="text_update_file_flash_title">Aktualisierungsdatei</string>
<string name="text_info_section">Drücken Sie die auf prüfen, um zu sehen, ob ein Update verfügbar ist. Nach einem Update werden Sie zum Neustart aufgefordert. Geräte mit einem traditionellen Recovery-basierten Update werden beim Neustart in die Recovery gewechselt, um den Flash-Prozess auszuführen. Wenn Ihr Gerät nahtlose Updates (A/B) unterstützt, wird das Update durch den Neustart aktiviert.</string>

View File

@ -79,7 +79,6 @@
<string name="show_info_summary">Εμφάνιση επεξήγησης/κειμένου στην κεντρική σελίδα</string>
<string name="state_error_permissions">Δεν έχουν δωθεί τα δικαιώματα εγγραφής/ανάγνωσης αποθηκευτ. χώρου.</string>
<string name="state_error_flash">Αποτυχία ρύθμισης εγκατάστασης. Καθαρίστε /την cache και προσπαθήστε ξανά.</string>
<string name="state_error_ab_flash">Αποτυχία ρύθμισης εγκατάστασης. Επανεκκινήστε και προσπαθήστε ξανά.</string>
<string name="progress_status_0">Ύπνος &#8230;</string>
<string name="progress_status_1">Έλεγχος ενημερώσεων &#8230;</string>
<string name="progress_status_2">Διαθέσιμη ενημέρωση &#8230;</string>
@ -97,8 +96,8 @@
<string name="ab_perf_mode_summary_new">Αύξηση προταιρεότητας διαδικασίας ενημερώσεων. Μπορεί να επηρεάσει τη χρήση της συσκευής κατά την ενεημέρωση.</string>
<string name="state_error_flash_file_title">Δεν μπορεί να γίνει εγκατάσταση αυτού του αρχείου</string>
<string name="select_file_activity_title">Επιλογή αρχείου ZIP</string>
<string name="state_error_ab_flash_title">Δεν μπορεί να γίνει εγκατάσταση AB ενημέρωσης</string>
<string name="state_error_flash_title">Δεν μπορεί να γίνει εγκατάσταση της ενημέρωσης</string>
<string name="state_error_ab_flash">Δεν μπορεί να γίνει εγκατάσταση AB ενημέρωσης</string>
<string name="state_error_flash_file">Δεν μπορεί να γίνει εγκατάσταση της ενημέρωσης</string>
<string name="channel_name">Διαδικασία ενημέρωσης</string>
<string name="channel_description"></string>
<string name="text_update_file_flash_title">Αρχείο ενημέρωσης</string>

View File

@ -78,7 +78,6 @@
<string name="clean_files_feedback" formatted="false">%d faili kustutatud. Nüüd vajuta \"Kontrolli uuendusi\"</string>
<string name="state_error_permissions">Mäluruumi luba puudub.</string>
<string name="state_error_flash">Välgutamise seadistamine ebaõnnestus. Tühjenda /cache ja proovi uuesti.</string>
<string name="state_error_ab_flash">Välgutamise seadistamine ebaõnnestus. Palun taaskäivita ja proovi uuesti.</string>
<string name="progress_status_0">Ootel&#8230;</string>
<string name="progress_status_1">Uuenduste kontrollimine&#8230;</string>
<string name="progress_status_2">Uuendus saadaval&#8230;</string>

View File

@ -78,7 +78,6 @@
<string name="clean_files_feedback" formatted="false">%d fichiers supprimés. Appuyer maintenant sur \'Vérifier les mises à jour disponibles\'</string>
<string name="state_error_permissions">Aucune autorisation de stockage.</string>
<string name="state_error_flash">Échec de la préparation de mise à jour. Supprimer le contenu du /cache et réessayer.</string>
<string name="state_error_ab_flash">Échec de la préparation de la mise à jour. Veuillez redémarrer et réessayer.</string>
<string name="progress_status_0">Au repos &#8230;</string>
<string name="progress_status_1">Vérification des mises à jour disponibles &#8230;</string>
<string name="progress_status_2">Mise à jour disponible &#8230;</string>

View File

@ -79,7 +79,6 @@
<string name="clean_files_feedback" formatted="false">%d個のファイルを削除しました。「更新を確認」をチェックして下さい。</string>
<string name="state_error_permissions">ストレージの許可がありません</string>
<string name="state_error_flash">書き込みの開始に失敗しました。キャッシュを削除して再試行して下さい。</string>
<string name="state_error_ab_flash">書き込みの開始に失敗しました。再起動して再試行して下さい。</string>
<string name="progress_status_0">一時停止中&#8230;</string>
<string name="progress_status_1">更新の確認中&#8230;</string>
<string name="progress_status_2">更新が利用可能です&#8230;</string>
@ -95,8 +94,8 @@
<string name="state_error_flash_file_title">そのファイルをフラッシュできません</string>
<string name="select_file_activity_title">ZIP ファイルの選択</string>
<string name="button_select_file">ファイル</string>
<string name="state_error_ab_flash_title">AB アップデートをフラッシュできません</string>
<string name="state_error_flash_title">更新をフラッシュができません</string>
<string name="state_error_ab_flash">AB アップデートをフラッシュできません</string>
<string name="state_error_flash_file">更新をフラッシュができません</string>
<string name="channel_name">更新の進捗状況</string>
<string name="text_update_file_flash_title">更新ファイル</string>
</resources>

View File

@ -79,7 +79,6 @@
<string name="clean_files_feedback" formatted="false">Usunięto %d plików. Naciśnij teraz \"Sprawdź dostępność aktualizacji\"</string>
<string name="state_error_permissions">Brak uprawnień pamięci.</string>
<string name="state_error_flash">Nie udało się przygotować instalacji. Wyczyść /cache i ponów próbę.</string>
<string name="state_error_ab_flash">Błąd podczas instalacji. Uruchom ponownie i ponów próbę.</string>
<string name="progress_status_0">Bezczynny &#8230;</string>
<string name="progress_status_1">Sprawdzanie aktualizacji &#8230;</string>
<string name="progress_status_2">Dostępna aktualizacja &#8230;</string>
@ -95,8 +94,8 @@
<string name="state_error_flash_file_title">Nie można wgrać tego pliku</string>
<string name="select_file_activity_title">Wybierz plik ZIP</string>
<string name="button_select_file">Plik</string>
<string name="state_error_ab_flash_title">Nie można wgrać aktualizacji AB</string>
<string name="state_error_flash_title">Nie można wgrać aktualizacji</string>
<string name="state_error_ab_flash">Nie można wgrać aktualizacji AB</string>
<string name="state_error_flash_file">Nie można wgrać aktualizacji</string>
<string name="channel_name">Postęp aktualizacji</string>
<string name="text_update_file_flash_title">Plik aktualizacji</string>
</resources>

View File

@ -81,7 +81,6 @@
<string name="clean_files_feedback" formatted="false">%d arquivos apagados. Pressione \'Verificar atualizações\'</string>
<string name="state_error_permissions">Nenhuma permissão de armazenamento.</string>
<string name="state_error_flash">Falha de instalação do flash. Limpar /cache e tente novamente.</string>
<string name="state_error_ab_flash">Falha de instalação do flash. Por favor reinicie e tente novamente.</string>
<string name="progress_status_0">Inativo &#8230;</string>
<string name="progress_status_1">Verificando atualizações &#8230;</string>
<string name="progress_status_2">Atualização disponível &#8230;</string>
@ -97,8 +96,8 @@
<string name="state_error_flash_file_title">Não é possível instalar este arquivo</string>
<string name="select_file_activity_title">Selecione o arquivo ZIP</string>
<string name="button_select_file">Arquivo</string>
<string name="state_error_ab_flash_title">Não foi possível instalar a atualização AB</string>
<string name="state_error_flash_title">Não foi possível instalar a atualização</string>
<string name="state_error_ab_flash">Não foi possível instalar a atualização AB</string>
<string name="state_error_flash_file">Não foi possível instalar a atualização</string>
<string name="channel_name">Atualização em andamento</string>
<string name="text_update_file_flash_title">Atualizar arquivo</string>
<string name="text_info_section">Pressione verificar para ver se uma atualização está disponível. Após a atualização de uma atualização, você será solicitado a reiniciar. Os dispositivos com uma atualização tradicional baseada em recuperação entrarão em recuperação na reinicialização para executar o processo flash. Se o seu dispositivo suportar atualizações contínuas (A / B), a reinicialização ativará a atualização.</string>

View File

@ -55,8 +55,8 @@
<string name="state_action_build_delta">Возможно обновление дельта-файлом.</string>
<string name="state_action_build_full">Возможно обновление полным файлом ПО.</string>
<string name="state_error_download">Проблема при загрузке.</string>
<string name="state_error_download_sha">Проблема при загрузке (файл повреждён)</string>
<string name="state_error_download_resume">Проблема при загрузке (можно возобновить)</string>
<string name="state_error_download_extra_sha">файл повреждён</string>
<string name="state_error_download_extra_resume">можно возобновить</string>
<string name="state_error_download_extra_1">Невозможно найти последнее обновление\nПроверьте настройки сети и DNS</string>
<string name="state_error_download_extra_2">Не найдена файл контрольной суммы на сервере\nСообщите своему мейнтейнеру</string>
<string name="state_error_download_extra_3">@string/state_error_connection</string>
@ -103,7 +103,6 @@
<string name="clean_files_feedback" formatted="false">Удалено %d файлов. Теперь нажмите «Проверить»</string>
<string name="state_error_permissions">Нет разрешения для хранения.</string>
<string name="state_error_flash">Ошибка установки. Сделайте очистку /cache и попробуйте еще раз.</string>
<string name="state_error_ab_flash">Ошибка установки. Перезагрузите устройство и попробуйте еще раз.</string>
<string name="progress_status_0">Бездействую &#8230;</string>
<string name="progress_status_1">Поиск обновлений &#8230;</string>
<string name="progress_status_2">Доступно обновление &#8230;</string>
@ -121,8 +120,8 @@
<string name="state_error_flash_file_title">Не могу установить этот файл</string>
<string name="select_file_activity_title">Выберите ZIP файл</string>
<string name="button_select_file">Файл</string>
<string name="state_error_ab_flash_title">Не удается установить A/B обновление</string>
<string name="state_error_flash_title">Не удается установить обновление</string>
<string name="state_error_ab_flash">Не удается установить A/B обновление</string>
<string name="state_error_flash_file">Не удается установить обновление</string>
<string name="no_sum_dialog_msg">Не найден файл контрольной суммы (.sha256sum).\nПоместите файл контрольной суммы вместе с файлом прошивки\nНажимте "игнорировать" чтобы продолжить без проверки (опасно!)</string>
<string name="invalid_sum_dialog_msg">Контрольная сумма не совпадает.\nСкорее всего файл обновления поврежден, перекачайте заново.\nНажмите "игнорировать" чтобы продолжить.\nИмейте ввиду что это вам аукнется</string>
<string name="channel_name">Процесс обновления</string>

View File

@ -82,7 +82,6 @@
<string name="clean_files_feedback" formatted="false">%d adet dosya silindi. Şimdi \'Güncellemeleri yokla\' düğmesine dokunun</string>
<string name="state_error_permissions">Depolama izinleri yok.</string>
<string name="state_error_flash">Kurulamadı. Ön belleği temizleyin ve tekrar deneyin.</string>
<string name="state_error_ab_flash">Kurulum tamamlanamadı. Lütfen cihazı tekrar başlatın ve tekrar deneyin.</string>
<string name="progress_status_0">Boşta &#8230;</string>
<string name="progress_status_1">Güncellemeler yoklanıyor &#8230;</string>
<string name="progress_status_2">Güncelleme mevcut &#8230;</string>
@ -98,8 +97,8 @@
<string name="state_error_flash_file_title">Bu dosya kurulamıyor</string>
<string name="select_file_activity_title">ZIP dosyasını seçin</string>
<string name="button_select_file">Dosya</string>
<string name="state_error_ab_flash_title">AB güncellemesi kurulamıyor</string>
<string name="state_error_flash_title">Güncelleme kurulamıyor</string>
<string name="state_error_ab_flash">AB güncellemesi kurulamıyor</string>
<string name="state_error_flash_file">Güncelleme kurulamıyor</string>
<string name="channel_name">Güncelleme ilerlemesi</string>
<string name="text_update_file_flash_title">Güncelleme dosyası</string>
<string name="text_info_section">Bir güncellemenin mevcut olup olmadığına bakmak için yokla düğmesine dokununuz. Bir güncelleme kurulduktan sonra sizden yeniden başlatmanız rica edilir. Geleneksel recovery yazılımı temeline sahip cihazlar kurulum işleminin yerine getirilmesi için yeniden başlatılma esnasında recovery moduna girer. Cihazınız A/B tipi güncellemeleri destekliyorsa yeniden başlatma güncellemeyi devreye sokar.</string>

View File

@ -52,8 +52,8 @@
<string name="state_action_build_delta">可以进行增量更新</string>
<string name="state_action_build_full">可以进行完整更新</string>
<string name="state_error_download">下载错误</string>
<string name="state_error_download_sha">下载错误 (文件损坏)</string>
<string name="state_error_download_resume">下载错误 (可恢复)</string>
<string name="state_error_download_extra_sha">文件损坏</string>
<string name="state_error_download_extra_resume">可恢复</string>
<string name="state_error_download_extra_1">无法检测版本更新\n检查你的网络和 DNS 设置</string>
<string name="state_error_download_extra_2">在服务器上未找到校验文件\n请询问您的设备维护者</string>
<string name="text_current_version_header_title">当前版本</string>
@ -99,7 +99,6 @@
<string name="clean_files_feedback" formatted="false">删除了 %d 文件. 现在点击 “检查”</string>
<string name="state_error_permissions">没有储存权限</string>
<string name="state_error_flash">刷入失败. 清理 /cache 后重试.</string>
<string name="state_error_ab_flash">刷入失败. 请重启后再次尝试.</string>
<string name="progress_status_0">空闲 &#8230;</string>
<string name="progress_status_1">正在检查更新 &#8230;</string>
<string name="progress_status_2">更新可用 &#8230;</string>
@ -115,8 +114,8 @@
<string name="state_error_flash_file_title">无法刷入该文件</string>
<string name="select_file_activity_title">选择 ZIP 文件</string>
<string name="button_select_file">文件</string>
<string name="state_error_ab_flash_title">无法刷入 AB 更新</string>
<string name="state_error_flash_title">无法刷入更新</string>
<string name="state_error_ab_flash">无法刷入 AB 更新</string>
<string name="state_error_flash_file">无法刷入更新</string>
<string name="no_sum_dialog_msg">未找到本地校验文件 (.sha256sum)\n请将文件放在与要刷入的文件相同路径中\n按下忽略继续安装而不校验文件危险</string>
<string name="invalid_sum_dialog_msg">校验文件与本地文件不匹配\n此文件可能已损坏请重新下载\n按下忽略继续安装\n请注意可能会安装失败</string>
<string name="channel_name">更新进度</string>

View File

@ -68,11 +68,11 @@
<string name="state_action_build_delta">Delta update is possible</string>
<string name="state_action_build_full">Full update is possible</string>
<string name="state_error_download">Download problem</string>
<string name="state_error_download_sha">Download problem (corrupted file)</string>
<string name="state_error_download_resume">Download problem (resume-able)</string>
<string name="state_error_download_extra_1">Can\'t fetch the newest build\nCheck your network connection and DNS settings</string>
<string name="state_error_download_extra_2">No sum file was found on the server\nTalk with your maintainer</string>
<string name="state_error_download_extra_3">@string/state_error_connection</string>
<string name="state_error_download_extra_sha">corrupted file</string>
<string name="state_error_download_extra_resume">resume-able</string>
<string name="text_current_version_header_title">Current version:</string>
<string name="text_last_checked_header_title">Last checked:</string>
<string name="text_update_version_title">Update version:</string>
@ -119,7 +119,6 @@
<string name="clean_files_feedback" formatted="false">Deleted %d files. Now press \'Check for updates\'</string>
<string name="state_error_permissions">No storage permissions</string>
<string name="state_error_flash">Failed to setup flash. Clean /cache and try again.</string>
<string name="state_error_ab_flash">Failed to setup flash. Please reboot and try again.</string>
<string name="progress_status_0">Idle &#8230;</string>
<string name="progress_status_1">Checking for Updates &#8230;</string>
<string name="progress_status_2">Update available &#8230;</string>
@ -137,8 +136,8 @@
<string name="state_error_flash_file_title">Couldn\'t flash that file</string>
<string name="select_file_activity_title">Select ZIP file</string>
<string name="button_select_file">File</string>
<string name="state_error_ab_flash_title">Couldn\'t flash AB update</string>
<string name="state_error_flash_title">Couldn\'t flash update</string>
<string name="state_error_ab_flash">Couldn\'t flash AB update</string>
<string name="state_error_flash_file">Couldn\'t flash update</string>
<string name="no_sum_dialog_msg">No local sum file (.sha256sum) was found.\nPlease place the file at the same path of the file to flash.\nPress ignore to proceed without sum check (dangerous!)</string>
<string name="invalid_sum_dialog_msg">File sum mismatched with local sum file.\nThis file is probably corrupted, please download it again.\nPress ignore to proceed.\nDo note this will probably fail later on anyways</string>
<string name="channel_name">Update progress</string>

View File

@ -335,6 +335,7 @@ public class MainActivity extends Activity {
filename
);
mSub.setText(pgen.sub);
mSub.setSelected(true); // allow scrolling
mSub2.setText(pgen.sub2);
mProgressPercent.setText(pgen.progressPercent);
mProgressCurrent = Math.round(pgen.localCurrent);
@ -352,11 +353,14 @@ public class MainActivity extends Activity {
long downloadSize = 0L;
switch (state) {
case State.ERROR_UNKNOWN:
case State.ERROR_DOWNLOAD_SHA:
case State.ERROR_CONNECTION:
case State.ERROR_PERMISSIONS:
case State.ACTION_NONE:
break;
case State.ERROR_FLASH:
case State.ERROR_FLASH_FILE:
enableFlash = true;
break;
case State.ERROR_DISK_SPACE:
localCurrent /= 1024L * 1024L;
localTotal /= 1024L * 1024L;
@ -370,18 +374,13 @@ public class MainActivity extends Activity {
case State.ERROR_DOWNLOAD:
extraText = tryGetResourceString("state_error_download_extra_" + errorCode);
break;
case State.ERROR_FLASH:
enableFlash = true;
title = getString(R.string.state_error_flash_title);
case State.ERROR_DOWNLOAD_SHA:
title = getString(R.string.state_error_download);
extraText = getString(R.string.state_error_download_extra_sha);
break;
case State.ERROR_AB_FLASH:
title = getString(R.string.state_error_ab_flash_title);
extraText = tryGetResourceString("error_ab_" + errorCode);
break;
case State.ERROR_FLASH_FILE:
enableFlash = true;
title = getString(R.string.state_error_flash_title);
break;
case State.ACTION_READY:
enableFlash = true;
enableChangelog = true;
@ -471,6 +470,8 @@ public class MainActivity extends Activity {
enableDownload = true;
break;
case State.ERROR_DOWNLOAD_RESUME:
title = getString(R.string.state_error_download);
extraText = getString(R.string.state_error_download_extra_resume);
case State.ACTION_DOWNLOADING_PAUSED:
hideCheck = true;
enableDownload = true;
@ -513,6 +514,7 @@ public class MainActivity extends Activity {
}
mTitle.setText(title);
mSub.setText(sub);
mSub.setSelected(true); // allow scrolling
mSub2.setText(sub2);
mProgressPercent.setText(progressPercent);
final boolean hideVersion = TextUtils.isEmpty(updateVersion);

View File

@ -889,9 +889,11 @@ public class UpdateService extends Service implements OnNetworkStateListener,
Logger.d("download " + (isPause ? "paused" : "error"));
mState.update(newState, progress, current, total, imageName, lastTime);
// display paused notification with the proper title
String title = getString(isPause
? R.string.state_action_downloading_paused
: R.string.state_error_download_resume);
String title = getString(R.string.state_action_downloading_paused);
if (!isPause) {
title = getString(R.string.state_error_download) + "(" +
getString(R.string.state_error_download_extra_resume) + ")";
}
mNotificationManager.cancel(NOTIFICATION_BUSY);
newDownloadNotification(true, title);
mDownloadNotificationBuilder.setProgress(100, Math.round(progress), false);