From 026c2acffe5c6d0dacb39ab75820a3419f213130 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 06:05:50 -0600 Subject: [PATCH 1/6] ADFA-5143 fix(home): a clone in flight has a name, and neither side is offered a restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Navigate away from the Clone tab mid-transfer and Home said the system had failed to start, with a Retry that did nothing. The ticket claimed that Retry boots the server. It does not — handleServerLaunchClick refuses on EnvironmentLock.ownerHeld, and both clone sides take Owner.CLONE. Priority came down to 3 once that was verified rather than repeated. What was really there is a dead control on a lying screen. The root: canStartServer() was a partial copy of that guard, missing the module queue and the lock, so the header asked the weaker of two answers to the same question. It now checks both, which removes the dead button without knowing anything about clones. The two header states are asked BEFORE the !installed branch, and that is the point: during a receive the install marker makes isSystemInstalled() false, so the next line said "no library" while an entire system was arriving. Amber, because the server is down on purpose and the box is busy with something the user started. Neither side is offered a restart — it is not a meaningful thing to do to a transfer. The receiver gets its progress screen, the donor its QR screen. Stop is not copied onto the header: it lives in the Clone flow, and navigating to a control beats owning a second one. The receiver is the half that carries the priority, being the only side with a percentage. Not fixed here: leaving the receiver's progress screen can kill the connection, and nothing can then offer a retry. rsync could resume, but EnvironmentLock stores its owner with a session token and deletes the file when the token does not match — so a process death erases the only evidence that a clone was in flight, and what is left is the damaged-system dialog. ADFA-5106's shape, plus a missing foreground service. Their own work, not a pre-demo change. --- .../controller/redesign/LibraryActivity.java | 24 ++++++++++++ .../redesign/LibraryHomeFragment.java | 37 ++++++++++++++++++- .../src/main/res/values-ar/strings_k2go.xml | 3 ++ .../src/main/res/values-az/strings_k2go.xml | 3 ++ .../src/main/res/values-bg/strings_k2go.xml | 3 ++ .../src/main/res/values-bn/strings_k2go.xml | 3 ++ .../src/main/res/values-cs/strings_k2go.xml | 3 ++ .../src/main/res/values-de/strings_k2go.xml | 3 ++ .../src/main/res/values-el/strings_k2go.xml | 3 ++ .../src/main/res/values-es/strings_k2go.xml | 3 ++ .../src/main/res/values-fa/strings_k2go.xml | 3 ++ .../src/main/res/values-fr/strings_k2go.xml | 3 ++ .../src/main/res/values-gu/strings_k2go.xml | 3 ++ .../src/main/res/values-hi/strings_k2go.xml | 3 ++ .../src/main/res/values-hu/strings_k2go.xml | 3 ++ .../src/main/res/values-in/strings_k2go.xml | 3 ++ .../src/main/res/values-it/strings_k2go.xml | 3 ++ .../src/main/res/values-ja/strings_k2go.xml | 3 ++ .../src/main/res/values-ko/strings_k2go.xml | 3 ++ .../src/main/res/values-lt/strings_k2go.xml | 3 ++ .../src/main/res/values-nl/strings_k2go.xml | 3 ++ .../src/main/res/values-no/strings_k2go.xml | 3 ++ .../src/main/res/values-pl/strings_k2go.xml | 3 ++ .../src/main/res/values-pt/strings_k2go.xml | 3 ++ .../src/main/res/values-ro/strings_k2go.xml | 3 ++ .../main/res/values-ru-rRU/strings_k2go.xml | 3 ++ .../src/main/res/values-sk/strings_k2go.xml | 3 ++ .../src/main/res/values-sr/strings_k2go.xml | 3 ++ .../src/main/res/values-sw/strings_k2go.xml | 3 ++ .../src/main/res/values-ta/strings_k2go.xml | 3 ++ .../src/main/res/values-tr/strings_k2go.xml | 3 ++ .../src/main/res/values-uk/strings_k2go.xml | 3 ++ .../src/main/res/values-vi/strings_k2go.xml | 3 ++ .../src/main/res/values-yo/strings_k2go.xml | 3 ++ .../main/res/values-zh-rCN/strings_k2go.xml | 3 ++ .../app/src/main/res/values/strings_k2go.xml | 3 ++ 36 files changed, 161 insertions(+), 2 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java index 9e7b3f3d9..5046e78e2 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java @@ -1011,9 +1011,33 @@ public boolean canStartServer() { && (serverController == null || !serverController.isStopping()) && !InstallProgressRepository.get().isRunning() && !org.iiab.controller.InstallGuard.inProgress(this) + // ADFA-5143: the last two align this with ServerController.handleServerLaunchClick, + // which is the guard that actually decides. This method was a PARTIAL copy of it — + // missing the module queue and the environment lock — so it said yes where the real + // guard says no, and the header offered a Retry that flickered and did nothing. The + // start was never in danger; the button was a lie about it. Two places answering "can + // I start the server?" and answering differently is the defect, not the clone. + // + // ownerHeld covers a clone on either side without knowing anything about clones: + // Owner.CLONE is in the enum and both sides acquire it (CloneFragment:354 and :936). + && !org.iiab.controller.install.presentation.ModuleQueueRepository.get().isRunning() + && !org.iiab.controller.env.EnvironmentLock.ownerHeld(this) && org.iiab.controller.SystemStateEvaluator.isSystemInstalled(this); } + /** + * ADFA-5143: take the user to the Clone tab, where a transfer in flight actually lives. + * + *

The Home header offers this instead of a restart during a transfer. For the receiver it is + * the only place the progress exists; for the donor it is where the QR and Stop are — which is + * why Stop is not copied onto the header. Navigating to a control beats owning a second one. + */ + public void openCloneTab() { + currentTab = R.id.nav_clone; + showTab(currentTab); + syncSelection(currentTab); + } + /** ADFA-4837: header "Couldn't start — tap to retry" action. Safe no-op unless truly idle. */ public void startServer() { if (!canStartServer()) return; diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryHomeFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryHomeFragment.java index 99159a4d6..7c800b077 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryHomeFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryHomeFragment.java @@ -47,7 +47,10 @@ public class LibraryHomeFragment extends Fragment { // could only be arrived at, never opened, so a user who left a running download had no // route back to it. private static final int H_NO_LIBRARY = 0, H_STARTING = 1, H_READY = 2, H_READY_EMPTY = 3, - H_FAILED = 4, H_INSTALLING = 5; + H_FAILED = 4, H_INSTALLING = 5, + // ADFA-5143: a clone in flight, told apart by side. The receiver is the only one with a + // percentage, so it is the one whose loss matters; the donor has a QR and a Stop. + H_CLONE_RECEIVING = 6, H_CLONE_SHARING = 7; // ADFA-4837: how long a card stays amber (patient) once the box is up before it's called stuck. private static final long CARD_RED_GRACE_MS = 60000L; @@ -112,6 +115,15 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c openGetMore(); return; } + // ADFA-5143: both clone states go to the Clone tab. For the receiver that is the only + // place the percentage exists — the donor has no progress to lose, only a QR — which + // is why this is the half of the ticket that carries the priority. + if (headerState == H_CLONE_RECEIVING || headerState == H_CLONE_SHARING) { + if (getActivity() instanceof LibraryActivity) { + ((LibraryActivity) getActivity()).openCloneTab(); + } + return; + } // ADFA-4837: retry only when it is genuinely safe — canStartServer guards // against stacking a second proot over a live one. if (headerState != H_FAILED) return; @@ -539,6 +551,18 @@ private void updateHeaderFromCards() { if (homeStatus == null || !isAdded()) return; boolean installed = systemInstalled; boolean alive = ServerStateRepository.get().current().alive; + // ADFA-5143: a clone in flight outranks everything below, and has to be asked FIRST. During a + // receive the install marker makes isSystemInstalled() false, so without this the very next + // line says "no library" while a whole system is arriving — and the branch after it would call + // a deliberately stopped server a failure. Neither is true and both were on screen. + if (org.iiab.controller.sync.presentation.SyncProgressRepository.get().isActive()) { + setHeader(H_CLONE_RECEIVING); + return; + } + if (CloneSendSession.isActive()) { + setHeader(H_CLONE_SHARING); + return; + } if (!installed) { setHeader(H_NO_LIBRARY); return; } // ADFA-5074: content being added outranks everything below. It is the only state // the user can act on from here, and reporting "ready" over a running install is @@ -590,6 +614,10 @@ private void setHeader(int h) { // content arriving blocks nothing: the library works, and it is getting bigger. // The label carries the news, and the row stays tappable as the way into progress. case H_INSTALLING: text = getString(R.string.k2go_home_installing); dotColor = R.color.k2go_leaf; break; + // ADFA-5143: amber, not green and not red. The server is deliberately down and the box is + // busy with something the user started — that is "wait", which is what amber says here. + case H_CLONE_RECEIVING: text = getString(R.string.k2go_home_clone_receiving); dotColor = R.color.k2go_amber; break; + case H_CLONE_SHARING: text = getString(R.string.k2go_home_clone_sharing); dotColor = R.color.k2go_amber; break; default: text = getString(R.string.k2go_starting_library); dotColor = R.color.k2go_amber; break; } homeStatus.setText(text); @@ -611,7 +639,12 @@ private void setHeader(int h) { // exist yet. One line in a switch that already hands out two other buttons. int action = h == H_FAILED ? R.string.k2go_home_retry : h == H_INSTALLING ? R.string.k2go_home_see_progress - : h == H_NO_LIBRARY ? R.string.k2go_home_install_system : 0; + : h == H_NO_LIBRARY ? R.string.k2go_home_install_system + // ADFA-5143: a transfer is not offered a restart — restarting the server is not a + // meaningful thing to do to a transfer. Each side is offered the place that matters: + // the receiver its progress, the donor its QR. + : h == H_CLONE_RECEIVING ? R.string.k2go_home_see_progress + : h == H_CLONE_SHARING ? R.string.k2go_home_clone_view : 0; if (homeStatusAction != null) { homeStatusAction.setVisibility(action != 0 ? View.VISIBLE : View.GONE); if (action != 0) homeStatusAction.setText(action); diff --git a/controller/app/src/main/res/values-ar/strings_k2go.xml b/controller/app/src/main/res/values-ar/strings_k2go.xml index 0848a2184..c909b5fb3 100644 --- a/controller/app/src/main/res/values-ar/strings_k2go.xml +++ b/controller/app/src/main/res/values-ar/strings_k2go.xml @@ -44,6 +44,9 @@ عرض التقدم إعادة المحاولة تثبيت نظام + النسخ من هاتف آخر + المشاركة مع هاتف آخر + عرض جارٍ إضافة المحتوى diff --git a/controller/app/src/main/res/values-az/strings_k2go.xml b/controller/app/src/main/res/values-az/strings_k2go.xml index 17759a27f..310e51171 100644 --- a/controller/app/src/main/res/values-az/strings_k2go.xml +++ b/controller/app/src/main/res/values-az/strings_k2go.xml @@ -44,6 +44,9 @@ Gedişata bax Yenidən cəhd Sistem qur + Başqa telefondan klonlanır + Başqa telefonla paylaşılır + Bax Məzmun əlavə edilir diff --git a/controller/app/src/main/res/values-bg/strings_k2go.xml b/controller/app/src/main/res/values-bg/strings_k2go.xml index b176286b8..4063793b9 100644 --- a/controller/app/src/main/res/values-bg/strings_k2go.xml +++ b/controller/app/src/main/res/values-bg/strings_k2go.xml @@ -44,6 +44,9 @@ Виж напредъка Опитай пак Инсталирай система + Клониране от друг телефон + Споделяне с друг телефон + Виж Добавяне на съдържание diff --git a/controller/app/src/main/res/values-bn/strings_k2go.xml b/controller/app/src/main/res/values-bn/strings_k2go.xml index 0a1a29284..bb74876c5 100644 --- a/controller/app/src/main/res/values-bn/strings_k2go.xml +++ b/controller/app/src/main/res/values-bn/strings_k2go.xml @@ -44,6 +44,9 @@ অগ্রগতি দেখুন আবার চেষ্টা সিস্টেম ইনস্টল করুন + অন্য ফোন থেকে কপি হচ্ছে + অন্য ফোনের সাথে শেয়ার হচ্ছে + দেখুন কনটেন্ট যোগ করা হচ্ছে diff --git a/controller/app/src/main/res/values-cs/strings_k2go.xml b/controller/app/src/main/res/values-cs/strings_k2go.xml index df38398f6..fa92b9db0 100644 --- a/controller/app/src/main/res/values-cs/strings_k2go.xml +++ b/controller/app/src/main/res/values-cs/strings_k2go.xml @@ -44,6 +44,9 @@ Zobrazit průběh Zkusit znovu Nainstalovat systém + Klonování z jiného telefonu + Sdílení s jiným telefonem + Zobrazit Přidává se obsah diff --git a/controller/app/src/main/res/values-de/strings_k2go.xml b/controller/app/src/main/res/values-de/strings_k2go.xml index 20452cb0c..d4dd9c446 100644 --- a/controller/app/src/main/res/values-de/strings_k2go.xml +++ b/controller/app/src/main/res/values-de/strings_k2go.xml @@ -45,6 +45,9 @@ Fortschritt ansehen Erneut versuchen System installieren + Klonen von einem anderen Telefon + Teilen mit einem anderen Telefon + Ansehen Inhalte werden hinzugefügt diff --git a/controller/app/src/main/res/values-el/strings_k2go.xml b/controller/app/src/main/res/values-el/strings_k2go.xml index 81b49822b..f9d206e9d 100644 --- a/controller/app/src/main/res/values-el/strings_k2go.xml +++ b/controller/app/src/main/res/values-el/strings_k2go.xml @@ -45,6 +45,9 @@ Δείτε την πρόοδο Επανάληψη Εγκατάσταση συστήματος + Κλωνοποίηση από άλλο τηλέφωνο + Κοινή χρήση με άλλο τηλέφωνο + Προβολή Προσθήκη περιεχομένου diff --git a/controller/app/src/main/res/values-es/strings_k2go.xml b/controller/app/src/main/res/values-es/strings_k2go.xml index 512cad890..ca08a9ed0 100644 --- a/controller/app/src/main/res/values-es/strings_k2go.xml +++ b/controller/app/src/main/res/values-es/strings_k2go.xml @@ -44,6 +44,9 @@ Ver progreso Reintentar Instalar un sistema + Clonando desde otro teléfono + Compartiendo con otro teléfono + Ver Añadiendo contenido diff --git a/controller/app/src/main/res/values-fa/strings_k2go.xml b/controller/app/src/main/res/values-fa/strings_k2go.xml index 79904f04b..ac0b36c23 100644 --- a/controller/app/src/main/res/values-fa/strings_k2go.xml +++ b/controller/app/src/main/res/values-fa/strings_k2go.xml @@ -44,6 +44,9 @@ مشاهده پیشرفت تلاش دوباره نصب سیستم + در حال کلون از تلفن دیگر + در حال اشتراک با تلفن دیگر + نمایش در حال افزودن محتوا diff --git a/controller/app/src/main/res/values-fr/strings_k2go.xml b/controller/app/src/main/res/values-fr/strings_k2go.xml index 586875fd1..696787fa8 100644 --- a/controller/app/src/main/res/values-fr/strings_k2go.xml +++ b/controller/app/src/main/res/values-fr/strings_k2go.xml @@ -44,6 +44,9 @@ Voir la progression Réessayer Installer un système + Clonage depuis un autre téléphone + Partage avec un autre téléphone + Voir Ajout de contenu diff --git a/controller/app/src/main/res/values-gu/strings_k2go.xml b/controller/app/src/main/res/values-gu/strings_k2go.xml index 54305675a..054450a4b 100644 --- a/controller/app/src/main/res/values-gu/strings_k2go.xml +++ b/controller/app/src/main/res/values-gu/strings_k2go.xml @@ -44,6 +44,9 @@ પ્રગતિ જુઓ ફરી પ્રયાસ સિસ્ટમ ઇન્સ્ટોલ કરો + બીજા ફોનમાંથી કૉપિ થઈ રહ્યું છે + બીજા ફોન સાથે શેર થઈ રહ્યું છે + જુઓ સામગ્રી ઉમેરાઈ રહી છે diff --git a/controller/app/src/main/res/values-hi/strings_k2go.xml b/controller/app/src/main/res/values-hi/strings_k2go.xml index 07f70f928..86314b538 100644 --- a/controller/app/src/main/res/values-hi/strings_k2go.xml +++ b/controller/app/src/main/res/values-hi/strings_k2go.xml @@ -44,6 +44,9 @@ प्रगति देखें पुनः प्रयास सिस्टम इंस्टॉल करें + दूसरे फ़ोन से कॉपी हो रहा है + दूसरे फ़ोन के साथ साझा हो रहा है + देखें सामग्री जोड़ी जा रही है diff --git a/controller/app/src/main/res/values-hu/strings_k2go.xml b/controller/app/src/main/res/values-hu/strings_k2go.xml index 2453b4fcb..305543e7b 100644 --- a/controller/app/src/main/res/values-hu/strings_k2go.xml +++ b/controller/app/src/main/res/values-hu/strings_k2go.xml @@ -44,6 +44,9 @@ Folyamat Újra Rendszer telepítése + Klónozás másik telefonról + Megosztás másik telefonnal + Megtekintés Tartalom hozzáadása diff --git a/controller/app/src/main/res/values-in/strings_k2go.xml b/controller/app/src/main/res/values-in/strings_k2go.xml index 1d5a9c5f6..accbfa0ea 100644 --- a/controller/app/src/main/res/values-in/strings_k2go.xml +++ b/controller/app/src/main/res/values-in/strings_k2go.xml @@ -44,6 +44,9 @@ Lihat progres Coba lagi Pasang sistem + Menyalin dari ponsel lain + Membagikan ke ponsel lain + Lihat Menambahkan konten diff --git a/controller/app/src/main/res/values-it/strings_k2go.xml b/controller/app/src/main/res/values-it/strings_k2go.xml index cff5b591d..64605ab25 100644 --- a/controller/app/src/main/res/values-it/strings_k2go.xml +++ b/controller/app/src/main/res/values-it/strings_k2go.xml @@ -44,6 +44,9 @@ Vedi progresso Riprova Installa un sistema + Clonazione da un altro telefono + Condivisione con un altro telefono + Vedi Aggiunta di contenuti diff --git a/controller/app/src/main/res/values-ja/strings_k2go.xml b/controller/app/src/main/res/values-ja/strings_k2go.xml index 29995bd65..c0917aa0b 100644 --- a/controller/app/src/main/res/values-ja/strings_k2go.xml +++ b/controller/app/src/main/res/values-ja/strings_k2go.xml @@ -44,6 +44,9 @@ 進行状況 再試行 システムをインストール + 別の端末からコピー中 + 別の端末と共有中 + 表示 コンテンツを追加中 diff --git a/controller/app/src/main/res/values-ko/strings_k2go.xml b/controller/app/src/main/res/values-ko/strings_k2go.xml index 2544fb104..93b30f322 100644 --- a/controller/app/src/main/res/values-ko/strings_k2go.xml +++ b/controller/app/src/main/res/values-ko/strings_k2go.xml @@ -44,6 +44,9 @@ 진행 상황 다시 시도 시스템 설치 + 다른 기기에서 복사 중 + 다른 기기와 공유 중 + 보기 콘텐츠 추가 중 diff --git a/controller/app/src/main/res/values-lt/strings_k2go.xml b/controller/app/src/main/res/values-lt/strings_k2go.xml index 5ccd9e6f5..241d980ad 100644 --- a/controller/app/src/main/res/values-lt/strings_k2go.xml +++ b/controller/app/src/main/res/values-lt/strings_k2go.xml @@ -44,6 +44,9 @@ Žiūrėti eigą Bandyti dar kartą Įdiegti sistemą + Klonuojama iš kito telefono + Bendrinama su kitu telefonu + Peržiūrėti Pridedamas turinys diff --git a/controller/app/src/main/res/values-nl/strings_k2go.xml b/controller/app/src/main/res/values-nl/strings_k2go.xml index 36329ce17..b80525f3e 100644 --- a/controller/app/src/main/res/values-nl/strings_k2go.xml +++ b/controller/app/src/main/res/values-nl/strings_k2go.xml @@ -44,6 +44,9 @@ Voortgang Opnieuw Systeem installeren + Klonen van een andere telefoon + Delen met een andere telefoon + Bekijken Inhoud toevoegen diff --git a/controller/app/src/main/res/values-no/strings_k2go.xml b/controller/app/src/main/res/values-no/strings_k2go.xml index f3935a5b4..e2cb29566 100644 --- a/controller/app/src/main/res/values-no/strings_k2go.xml +++ b/controller/app/src/main/res/values-no/strings_k2go.xml @@ -44,6 +44,9 @@ Se fremdrift Prøv igjen Installer et system + Kloner fra en annen telefon + Deler med en annen telefon + Vis Legger til innhold diff --git a/controller/app/src/main/res/values-pl/strings_k2go.xml b/controller/app/src/main/res/values-pl/strings_k2go.xml index 8af358feb..1a19d6f78 100644 --- a/controller/app/src/main/res/values-pl/strings_k2go.xml +++ b/controller/app/src/main/res/values-pl/strings_k2go.xml @@ -44,6 +44,9 @@ Zobacz postęp Ponów Zainstaluj system + Klonowanie z innego telefonu + Udostępnianie innemu telefonowi + Zobacz Dodawanie treści diff --git a/controller/app/src/main/res/values-pt/strings_k2go.xml b/controller/app/src/main/res/values-pt/strings_k2go.xml index 42207dd4d..ed5cb3c80 100644 --- a/controller/app/src/main/res/values-pt/strings_k2go.xml +++ b/controller/app/src/main/res/values-pt/strings_k2go.xml @@ -44,6 +44,9 @@ Ver progresso Tentar novamente Instalar um sistema + Clonando de outro telefone + Compartilhando com outro telefone + Ver Adicionando conteúdo diff --git a/controller/app/src/main/res/values-ro/strings_k2go.xml b/controller/app/src/main/res/values-ro/strings_k2go.xml index 64b77e38c..1ef334972 100644 --- a/controller/app/src/main/res/values-ro/strings_k2go.xml +++ b/controller/app/src/main/res/values-ro/strings_k2go.xml @@ -44,6 +44,9 @@ Vezi progresul Reîncearcă Instalează un sistem + Clonare de pe alt telefon + Partajare cu alt telefon + Vezi Se adaugă conținut diff --git a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml index 28f16a213..87ed2b7f0 100644 --- a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml +++ b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml @@ -44,6 +44,9 @@ Ход выполнения Повторить Установить систему + Клонирование с другого телефона + Передача на другой телефон + Смотреть Добавление контента diff --git a/controller/app/src/main/res/values-sk/strings_k2go.xml b/controller/app/src/main/res/values-sk/strings_k2go.xml index 8049dbf3b..d057c8f36 100644 --- a/controller/app/src/main/res/values-sk/strings_k2go.xml +++ b/controller/app/src/main/res/values-sk/strings_k2go.xml @@ -44,6 +44,9 @@ Zobraziť priebeh Skúsiť znova Nainštalovať systém + Klonovanie z iného telefónu + Zdieľanie s iným telefónom + Zobraziť Pridáva sa obsah diff --git a/controller/app/src/main/res/values-sr/strings_k2go.xml b/controller/app/src/main/res/values-sr/strings_k2go.xml index 08309339d..66d363f37 100644 --- a/controller/app/src/main/res/values-sr/strings_k2go.xml +++ b/controller/app/src/main/res/values-sr/strings_k2go.xml @@ -44,6 +44,9 @@ Види напредак Покушај поново Инсталирај систем + Клонирање са другог телефона + Дељење са другим телефоном + Погледај Додавање садржаја diff --git a/controller/app/src/main/res/values-sw/strings_k2go.xml b/controller/app/src/main/res/values-sw/strings_k2go.xml index 54f9e26e2..cd60e5c3f 100644 --- a/controller/app/src/main/res/values-sw/strings_k2go.xml +++ b/controller/app/src/main/res/values-sw/strings_k2go.xml @@ -44,6 +44,9 @@ Ona maendeleo Jaribu tena Sakinisha mfumo + Inanakili kutoka simu nyingine + Inashiriki na simu nyingine + Tazama Inaongeza maudhui diff --git a/controller/app/src/main/res/values-ta/strings_k2go.xml b/controller/app/src/main/res/values-ta/strings_k2go.xml index d0c8340e9..d79f3bb4b 100644 --- a/controller/app/src/main/res/values-ta/strings_k2go.xml +++ b/controller/app/src/main/res/values-ta/strings_k2go.xml @@ -44,6 +44,9 @@ முன்னேற்றம் மீண்டும் முயற்சி கணினியை நிறுவு + மற்றொரு தொலைபேசியிலிருந்து நகலெடுக்கிறது + மற்றொரு தொலைபேசியுடன் பங்கிடுகிறது + பார் உள்ளடக்கம் சேர்க்கப்படுகிறது diff --git a/controller/app/src/main/res/values-tr/strings_k2go.xml b/controller/app/src/main/res/values-tr/strings_k2go.xml index 025c3faa1..4a607f716 100644 --- a/controller/app/src/main/res/values-tr/strings_k2go.xml +++ b/controller/app/src/main/res/values-tr/strings_k2go.xml @@ -44,6 +44,9 @@ İlerlemeyi gör Yeniden dene Sistem kur + Başka telefondan kopyalanıyor + Başka telefonla paylaşılıyor + Görüntüle İçerik ekleniyor diff --git a/controller/app/src/main/res/values-uk/strings_k2go.xml b/controller/app/src/main/res/values-uk/strings_k2go.xml index 99918eb34..f2b18b291 100644 --- a/controller/app/src/main/res/values-uk/strings_k2go.xml +++ b/controller/app/src/main/res/values-uk/strings_k2go.xml @@ -44,6 +44,9 @@ Переглянути Повторити Встановити систему + Клонування з іншого телефона + Надсилання на інший телефон + Переглянути Додавання вмісту diff --git a/controller/app/src/main/res/values-vi/strings_k2go.xml b/controller/app/src/main/res/values-vi/strings_k2go.xml index 80dbb8f32..7c90f2a1c 100644 --- a/controller/app/src/main/res/values-vi/strings_k2go.xml +++ b/controller/app/src/main/res/values-vi/strings_k2go.xml @@ -44,6 +44,9 @@ Xem tiến trình Thử lại Cài đặt hệ thống + Đang sao chép từ điện thoại khác + Đang chia sẻ với điện thoại khác + Xem Đang thêm nội dung diff --git a/controller/app/src/main/res/values-yo/strings_k2go.xml b/controller/app/src/main/res/values-yo/strings_k2go.xml index 67c13c05c..9c7e3e4df 100644 --- a/controller/app/src/main/res/values-yo/strings_k2go.xml +++ b/controller/app/src/main/res/values-yo/strings_k2go.xml @@ -44,6 +44,9 @@ Wo ìlọsíwájú Tún gbìyànjú Fi ẹ̀rọ sílẹ̀ + Ń dà kọ láti inú fóònù mìíràn + Ń pín pẹ̀lú fóònù mìíràn + Wò ó Ń fi àkóónú kún un diff --git a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml index 1e2c49b4f..fc424f0ce 100644 --- a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml +++ b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml @@ -44,6 +44,9 @@ 查看进度 重试 安装系统 + 正在从另一台手机复制 + 正在与另一台手机共享 + 查看 正在添加内容 diff --git a/controller/app/src/main/res/values/strings_k2go.xml b/controller/app/src/main/res/values/strings_k2go.xml index eaa808858..4fb2a59d5 100644 --- a/controller/app/src/main/res/values/strings_k2go.xml +++ b/controller/app/src/main/res/values/strings_k2go.xml @@ -47,6 +47,9 @@ See progress Retry Install a system + Cloning from another phone + Sharing with another phone + View Adding content From dec2cae04624272a6b6984fbc9fa889a3b78e56a Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 06:51:11 -0600 Subject: [PATCH 2/6] ADFA-5143 fix(clone): a transfer in flight has a name on Home, and a way back after it dies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes, both about a clone the app could not talk about. THE HEADER. Navigating away from the Clone tab mid-transfer left Home saying the system had failed to start, with a Retry that did nothing. The ticket claimed that Retry boots the server — it does not; handleServerLaunchClick refuses on EnvironmentLock.ownerHeld and both sides take Owner.CLONE. What was there is a dead control on a lying screen, and the root is that canStartServer() was a partial copy of that guard, missing the module queue and the lock. It checks both now, which removes the dead button without knowing anything about clones. Two header states, asked BEFORE the !installed branch — during a receive the install marker makes isSystemInstalled() false, so the next line said "no library" while a whole system was arriving. Amber: the server is down on purpose. Neither side is offered a restart, which is not a meaningful thing to do to a transfer. The receiver gets its progress screen, the donor its QR screen. Stop is not copied onto the header; it lives in the Clone flow, and navigating to a control beats owning a second. THE WAY BACK (plan B). A killed receive leaves a half-written tree that rsync can resume from, and until now the only offered exit discarded it: recovery → "Reinstall the system" → the tier chooser, which offers download and nothing else. It now lands one step earlier, at the setup choice, where "Copy from a phone" is available and the user re-scans; rsync continues from what is on disk. EXTRA_REINSTALL travels through the extra hop, because without it runPipeline's non-destructive guard sees the half-written directory, skips the extract and boots the wreck. The confirm text no longer claims an internet connection is required — it says what comes next instead. Landing directly on the scan screen was considered and rejected for now: it requires knowing the interrupted operation was a clone, and EnvironmentLock deletes its owner record when the session token does not match. That evidence needs plan A first. Six strings, translated into the 33 locales. --- .../redesign/SetupLibraryActivity.java | 12 +++++++-- .../controller/redesign/WizardActivity.java | 27 ++++++++++++++++++- .../src/main/res/values-ar/strings_k2go.xml | 2 +- .../src/main/res/values-az/strings_k2go.xml | 2 +- .../src/main/res/values-bg/strings_k2go.xml | 2 +- .../src/main/res/values-bn/strings_k2go.xml | 2 +- .../src/main/res/values-cs/strings_k2go.xml | 2 +- .../src/main/res/values-de/strings_k2go.xml | 2 +- .../src/main/res/values-el/strings_k2go.xml | 2 +- .../src/main/res/values-es/strings_k2go.xml | 2 +- .../src/main/res/values-fa/strings_k2go.xml | 2 +- .../src/main/res/values-fr/strings_k2go.xml | 2 +- .../src/main/res/values-gu/strings_k2go.xml | 2 +- .../src/main/res/values-hi/strings_k2go.xml | 2 +- .../src/main/res/values-hu/strings_k2go.xml | 2 +- .../src/main/res/values-in/strings_k2go.xml | 2 +- .../src/main/res/values-it/strings_k2go.xml | 2 +- .../src/main/res/values-ja/strings_k2go.xml | 2 +- .../src/main/res/values-ko/strings_k2go.xml | 2 +- .../src/main/res/values-lt/strings_k2go.xml | 2 +- .../src/main/res/values-nl/strings_k2go.xml | 2 +- .../src/main/res/values-no/strings_k2go.xml | 2 +- .../src/main/res/values-pl/strings_k2go.xml | 2 +- .../src/main/res/values-pt/strings_k2go.xml | 2 +- .../src/main/res/values-ro/strings_k2go.xml | 2 +- .../main/res/values-ru-rRU/strings_k2go.xml | 2 +- .../src/main/res/values-sk/strings_k2go.xml | 2 +- .../src/main/res/values-sr/strings_k2go.xml | 2 +- .../src/main/res/values-sw/strings_k2go.xml | 2 +- .../src/main/res/values-ta/strings_k2go.xml | 2 +- .../src/main/res/values-tr/strings_k2go.xml | 2 +- .../src/main/res/values-uk/strings_k2go.xml | 2 +- .../src/main/res/values-vi/strings_k2go.xml | 2 +- .../src/main/res/values-yo/strings_k2go.xml | 2 +- .../main/res/values-zh-rCN/strings_k2go.xml | 2 +- .../app/src/main/res/values/strings_k2go.xml | 2 +- 36 files changed, 70 insertions(+), 37 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/SetupLibraryActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/SetupLibraryActivity.java index 88ed51552..66f57c953 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/SetupLibraryActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/SetupLibraryActivity.java @@ -546,8 +546,16 @@ public void openModuleDetail(String yamlBaseKey) { * the Backup & restore reinstall card, after the destructive confirm. A new activity instance so * the wizard back stack is clean. */ public void openReinstallWizard() { - startActivity(new Intent(this, SetupLibraryActivity.class) - .putExtra(EXTRA_REINSTALL_SETUP, true)); + // ADFA-5143 (plan B): one step earlier than before. This used to open the tier chooser + // directly, which offers exactly one way to get a system — download — and that is a trap after + // a killed clone-receive: the half-written tree on disk is resumable by rsync, the user has no + // route back to the scan screen, and the only exit offered discards it. The setup choice puts + // "Copy from a phone" back within reach, and rsync continues from what is already there. + // + // EXTRA_REINSTALL travels so the wipe survives the extra hop: the download branch forwards it, + // and a clone-receive is destructive by its own hand and needs no flag. + startActivity(new Intent(this, WizardActivity.class) + .putExtra(WizardActivity.EXTRA_REINSTALL, true)); } /** ADFA-5011: open the dash-node REST core's detail (Play Store-style card, Rebuild-only). */ diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/WizardActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/WizardActivity.java index 2a1c408f4..f5bd0d1ff 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/WizardActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/WizardActivity.java @@ -51,9 +51,26 @@ public class WizardActivity extends AppCompatActivity { } }); + /** + * ADFA-5143 (plan B): this wizard run is a reinstall, so the install it eventually starts must wipe + * the existing rootfs first. + * + *

Recovery used to send "Reinstall the system" straight to the tier chooser, which offers one + * way to get a system: download. A killed clone-receive leaves a resumable half-written tree and a + * user with no route back to the scan screen — the only offered exit discarded the very thing rsync + * could have continued from. Landing one step earlier, at the setup choice, puts "Copy from a phone" + * back on the table. + * + *

The flag has to travel because the wipe depends on it: without it, {@code runPipeline}'s + * non-destructive guard sees the half-written directory, skips the extract and boots the wreck. + */ + public static final String EXTRA_REINSTALL = "reinstall"; + private boolean reinstallMode; + @Override protected void onCreate(Bundle b) { super.onCreate(b); + reinstallMode = getIntent() != null && getIntent().getBooleanExtra(EXTRA_REINSTALL, false); setContentView(R.layout.activity_k2go_wizard); // ADFA-4932: draggable feedback FAB on this screen (screenshot + email). org.iiab.controller.feedback.presentation.FeedbackFab.installOn(this, "wizard"); @@ -65,6 +82,10 @@ protected void onCreate(Bundle b) { // permissions and only bailed from the setup choice / edition selection — resume at the setup // choice (step 3), not welcome/language/permissions all over again. // + // ADFA-5143 added a second caller — the recovery path's "Reinstall the system" — and it wants + // step 3 for the same reason: permissions are long granted and the decision to be made is how + // to get a system, not whether to grant notifications again. + // // ADFA-5137 dropped the setup_complete half of this condition, which was always true here: // LibraryActivity is the only thing that opens this screen, and it only opens it when there // is no system and none on the way. The permissions check was doing all the work. @@ -99,7 +120,11 @@ protected void onCreate(Bundle b) { // ADFA-4982: do NOT mark setup complete here — only a real install does (startWizardInstall). // If the user bails during edition/size selection, the next launch resumes at this setup // choice (see onCreate) instead of stranding them on an empty Home. - startActivity(new Intent(this, SetupLibraryActivity.class)); + // ADFA-5143: carry the reinstall intent through. On a recovery run the rootfs on disk is + // wreckage, and only this flag makes the pipeline wipe it before extracting. + Intent i = new Intent(this, SetupLibraryActivity.class); + if (reinstallMode) i.putExtra(SetupLibraryActivity.EXTRA_REINSTALL_SETUP, true); + startActivity(i); finish(); }); findViewById(R.id.setup_copy).setOnClickListener(v -> { diff --git a/controller/app/src/main/res/values-ar/strings_k2go.xml b/controller/app/src/main/res/values-ar/strings_k2go.xml index c909b5fb3..03b7af576 100644 --- a/controller/app/src/main/res/values-ar/strings_k2go.xml +++ b/controller/app/src/main/res/values-ar/strings_k2go.xml @@ -724,7 +724,7 @@ إعادة تثبيت النظام يمحو كل شيء ويثبّت نظامًا جديدًا من الصفر إعادة التثبيت من الصفر؟ - هذا يمحو النظام الحالي وكل ما فيه — الكتب والخرائط والتنزيلات والإعدادات — ثم يثبّت نسخة نظيفة. لا يمكن التراجع عنه. أنشئ نسخة احتياطية أولاً إذا أردت الاحتفاظ بأي شيء. يتطلب اتصالاً بالإنترنت. + هذا يمحو النظام الحالي وكل ما فيه — الكتب والخرائط والتنزيلات والإعدادات — ثم يثبّت نسخة نظيفة. لا يمكن التراجع عنه. أنشئ نسخة احتياطية أولاً إذا أردت الاحتفاظ بأي شيء. ثم تختار الطريقة: التنزيل أو النسخ من هاتف آخر. محو وإعادة تثبيت من النظام diff --git a/controller/app/src/main/res/values-az/strings_k2go.xml b/controller/app/src/main/res/values-az/strings_k2go.xml index 310e51171..c9cd9779d 100644 --- a/controller/app/src/main/res/values-az/strings_k2go.xml +++ b/controller/app/src/main/res/values-az/strings_k2go.xml @@ -724,7 +724,7 @@ Sistemi yenidən quraşdır Hər şeyi silir və sıfırdan təzə sistem quraşdırır Sıfırdan yenidən quraşdırılsın? - Bu, cari sistemi və içindəki hər şeyi — kitablar, xəritələr, endirmələr və parametrlər — silir, sonra təmiz nüsxə quraşdırır. Geri qaytarıla bilməz. Nə isə saxlamaq istəyirsinizsə, əvvəlcə ehtiyat nüsxə çıxarın. İnternet bağlantısı tələb olunur. + Bu, cari sistemi və içindəki hər şeyi — kitablar, xəritələr, endirmələr və parametrlər — silir, sonra təmiz nüsxə quraşdırır. Geri qaytarıla bilməz. Nə isə saxlamaq istəyirsinizsə, əvvəlcə ehtiyat nüsxə çıxarın. Sonra necə olacağını seçirsiniz: yükləmə və ya başqa telefondan kopyalama. Sil və yenidən quraşdır Sistemdən diff --git a/controller/app/src/main/res/values-bg/strings_k2go.xml b/controller/app/src/main/res/values-bg/strings_k2go.xml index 4063793b9..96eaf2a96 100644 --- a/controller/app/src/main/res/values-bg/strings_k2go.xml +++ b/controller/app/src/main/res/values-bg/strings_k2go.xml @@ -724,7 +724,7 @@ Преинсталиране на системата Изтрива всичко и инсталира нова система от нулата Преинсталиране от нулата? - Това изтрива текущата система и всичко в нея — книги, карти, изтегляния и настройки — и инсталира чисто копие. Не може да се отмени. Първо направете резервно копие, ако искате да запазите нещо. Изисква интернет връзка. + Това изтрива текущата система и всичко в нея — книги, карти, изтегляния и настройки — и инсталира чисто копие. Не може да се отмени. Първо направете резервно копие, ако искате да запазите нещо. След това избирате как: изтегляне или копиране от друг телефон. Изтриване и преинсталиране От системата diff --git a/controller/app/src/main/res/values-bn/strings_k2go.xml b/controller/app/src/main/res/values-bn/strings_k2go.xml index bb74876c5..e349101e5 100644 --- a/controller/app/src/main/res/values-bn/strings_k2go.xml +++ b/controller/app/src/main/res/values-bn/strings_k2go.xml @@ -693,7 +693,7 @@ পুনর্নির্মাণ REST কোর পুনর্নির্মাণ করবেন? dash-node কে সর্বশেষ সংস্করণে আপডেট করে। পুনর্নির্মাণের সময় সার্ভার কিছুক্ষণের জন্য অনুপলব্ধ থাকে; শেষ না হওয়া পর্যন্ত এই স্ক্রিন ছেড়ে যাবেন না। - পুনর্নির্মাণের জন্য ইন্টারনেট সংযোগ প্রয়োজন। + পুনর্নির্মাণের জন্য তারপর আপনি উপায় বেছে নেবেন: ডাউনলোড করা বা অন্য ফোন থেকে কপি করা। ড্যাশবোর্ড আপডেট হচ্ছে স্থানেই আপডেট হচ্ছে… ড্যাশবোর্ড কিছুক্ষণের জন্য রিস্টার্ট হবে। ড্যাশবোর্ড আপডেট হয়েছে। diff --git a/controller/app/src/main/res/values-cs/strings_k2go.xml b/controller/app/src/main/res/values-cs/strings_k2go.xml index fa92b9db0..d50d0d587 100644 --- a/controller/app/src/main/res/values-cs/strings_k2go.xml +++ b/controller/app/src/main/res/values-cs/strings_k2go.xml @@ -724,7 +724,7 @@ Přeinstalovat systém Smazat vše a nainstalovat čistý systém od začátku Přeinstalovat od začátku? - Tímto se smaže aktuální systém a vše v něm — knihy, mapy, stažené soubory a nastavení — a nainstaluje se čistá kopie. Nelze vzít zpět. Pokud si chcete něco ponechat, nejprve vytvořte zálohu. Vyžaduje připojení k internetu. + Tímto se smaže aktuální systém a vše v něm — knihy, mapy, stažené soubory a nastavení — a nainstaluje se čistá kopie. Nelze vzít zpět. Pokud si chcete něco ponechat, nejprve vytvořte zálohu. Potom zvolíte jak: stáhnout, nebo zkopírovat z jiného telefonu. Smazat a přeinstalovat Ze systému diff --git a/controller/app/src/main/res/values-de/strings_k2go.xml b/controller/app/src/main/res/values-de/strings_k2go.xml index d4dd9c446..2cd1690a5 100644 --- a/controller/app/src/main/res/values-de/strings_k2go.xml +++ b/controller/app/src/main/res/values-de/strings_k2go.xml @@ -725,7 +725,7 @@ System neu installieren Alles löschen und ein frisches System von Grund auf installieren Von Grund auf neu installieren? - Dies löscht das aktuelle System und alles darin — Bücher, Karten, Downloads und Einstellungen — und installiert dann eine saubere Kopie. Das kann nicht rückgängig gemacht werden. Erstellen Sie zuerst ein Backup, wenn Sie etwas behalten möchten. Erfordert eine Internetverbindung. + Dies löscht das aktuelle System und alles darin — Bücher, Karten, Downloads und Einstellungen — und installiert dann eine saubere Kopie. Das kann nicht rückgängig gemacht werden. Erstellen Sie zuerst ein Backup, wenn Sie etwas behalten möchten. Danach wählen Sie, wie: herunterladen oder von einem anderen Telefon kopieren. Löschen und neu installieren Vom System diff --git a/controller/app/src/main/res/values-el/strings_k2go.xml b/controller/app/src/main/res/values-el/strings_k2go.xml index f9d206e9d..e242014b6 100644 --- a/controller/app/src/main/res/values-el/strings_k2go.xml +++ b/controller/app/src/main/res/values-el/strings_k2go.xml @@ -725,7 +725,7 @@ Επανεγκατάσταση συστήματος Διαγράφει τα πάντα και εγκαθιστά ένα καθαρό σύστημα από την αρχή Επανεγκατάσταση από την αρχή; - Αυτό διαγράφει το τρέχον σύστημα και ό,τι περιέχει — βιβλία, χάρτες, λήψεις και ρυθμίσεις — και έπειτα εγκαθιστά ένα καθαρό αντίγραφο. Δεν αναιρείται. Κάντε πρώτα αντίγραφο ασφαλείας αν θέλετε να κρατήσετε κάτι. Απαιτεί σύνδεση στο διαδίκτυο. + Αυτό διαγράφει το τρέχον σύστημα και ό,τι περιέχει — βιβλία, χάρτες, λήψεις και ρυθμίσεις — και έπειτα εγκαθιστά ένα καθαρό αντίγραφο. Δεν αναιρείται. Κάντε πρώτα αντίγραφο ασφαλείας αν θέλετε να κρατήσετε κάτι. Μετά επιλέγετε πώς: λήψη ή αντιγραφή από άλλο τηλέφωνο. Διαγραφή και επανεγκατάσταση Από το σύστημα diff --git a/controller/app/src/main/res/values-es/strings_k2go.xml b/controller/app/src/main/res/values-es/strings_k2go.xml index ca08a9ed0..b3d136968 100644 --- a/controller/app/src/main/res/values-es/strings_k2go.xml +++ b/controller/app/src/main/res/values-es/strings_k2go.xml @@ -724,7 +724,7 @@ Reinstalar el sistema Borra todo e instala un sistema nuevo desde cero ¿Reinstalar desde cero? - Esto borra el sistema actual y todo lo que contiene —libros, mapas, descargas y ajustes— y luego instala una copia limpia. No se puede deshacer. Haz un respaldo primero si quieres conservar algo. Necesita conexión a internet. + Esto borra el sistema actual y todo lo que contiene —libros, mapas, descargas y ajustes— y luego instala una copia limpia. No se puede deshacer. Haz un respaldo primero si quieres conservar algo. Después eliges cómo: descargarlo o copiarlo de otro teléfono. Borrar y reinstalar Del sistema diff --git a/controller/app/src/main/res/values-fa/strings_k2go.xml b/controller/app/src/main/res/values-fa/strings_k2go.xml index ac0b36c23..af2c88e4c 100644 --- a/controller/app/src/main/res/values-fa/strings_k2go.xml +++ b/controller/app/src/main/res/values-fa/strings_k2go.xml @@ -724,7 +724,7 @@ نصب مجدد سیستم همه چیز را پاک می‌کند و یک سیستم تازه از ابتدا نصب می‌کند نصب مجدد از ابتدا؟ - این کار سیستم فعلی و همه چیز داخل آن — کتاب‌ها، نقشه‌ها، دانلودها و تنظیمات — را پاک می‌کند و سپس یک نسخهٔ تمیز نصب می‌کند. قابل بازگشت نیست. اگر می‌خواهید چیزی را نگه دارید ابتدا نسخهٔ پشتیبان بگیرید. به اتصال اینترنت نیاز دارد. + این کار سیستم فعلی و همه چیز داخل آن — کتاب‌ها، نقشه‌ها، دانلودها و تنظیمات — را پاک می‌کند و سپس یک نسخهٔ تمیز نصب می‌کند. قابل بازگشت نیست. اگر می‌خواهید چیزی را نگه دارید ابتدا نسخهٔ پشتیبان بگیرید. سپس روش را انتخاب می‌کنید: دانلود یا کپی از تلفن دیگر. پاک کردن و نصب مجدد از سیستم diff --git a/controller/app/src/main/res/values-fr/strings_k2go.xml b/controller/app/src/main/res/values-fr/strings_k2go.xml index 696787fa8..20b9e86a8 100644 --- a/controller/app/src/main/res/values-fr/strings_k2go.xml +++ b/controller/app/src/main/res/values-fr/strings_k2go.xml @@ -734,7 +734,7 @@ Réinstaller le système Tout effacer et installer un système neuf à partir de zéro Réinstaller à neuf ? - Ceci efface le système actuel et tout son contenu — livres, cartes, téléchargements et réglages — puis installe une copie propre. C\'est irréversible. Sauvegardez d\'abord si vous voulez conserver quelque chose. Nécessite une connexion internet. + Ceci efface le système actuel et tout son contenu — livres, cartes, téléchargements et réglages — puis installe une copie propre. C\'est irréversible. Sauvegardez d\'abord si vous voulez conserver quelque chose. Ensuite vous choisissez comment : le télécharger ou le copier depuis un autre téléphone. Effacer et réinstaller Du système diff --git a/controller/app/src/main/res/values-gu/strings_k2go.xml b/controller/app/src/main/res/values-gu/strings_k2go.xml index 054450a4b..d9b507e03 100644 --- a/controller/app/src/main/res/values-gu/strings_k2go.xml +++ b/controller/app/src/main/res/values-gu/strings_k2go.xml @@ -724,7 +724,7 @@ સિસ્ટમ ફરીથી ઇન્સ્ટોલ કરો બધું ભૂંસી નાખો અને શરૂઆતથી નવી સિસ્ટમ ઇન્સ્ટોલ કરો શરૂઆતથી ફરીથી ઇન્સ્ટોલ કરવું? - આ વર્તમાન સિસ્ટમ અને તેમાંનું બધું — પુસ્તકો, નકશા, ડાઉનલોડ અને સેટિંગ્સ — ભૂંસી નાખે છે, પછી એક સ્વચ્છ નકલ ઇન્સ્ટોલ કરે છે. તેને પાછું લઈ શકાતું નથી. કંઈક રાખવું હોય તો પહેલાં બેકઅપ લો. ઇન્ટરનેટ કનેક્શન જરૂરી છે. + આ વર્તમાન સિસ્ટમ અને તેમાંનું બધું — પુસ્તકો, નકશા, ડાઉનલોડ અને સેટિંગ્સ — ભૂંસી નાખે છે, પછી એક સ્વચ્છ નકલ ઇન્સ્ટોલ કરે છે. તેને પાછું લઈ શકાતું નથી. કંઈક રાખવું હોય તો પહેલાં બેકઅપ લો. પછી તમે રીત પસંદ કરો: ડાઉનલોડ કરો અથવા બીજા ફોનમાંથી કૉપિ કરો. ભૂંસો અને ફરીથી ઇન્સ્ટોલ કરો સિસ્ટમમાંથી diff --git a/controller/app/src/main/res/values-hi/strings_k2go.xml b/controller/app/src/main/res/values-hi/strings_k2go.xml index 86314b538..728e47cdc 100644 --- a/controller/app/src/main/res/values-hi/strings_k2go.xml +++ b/controller/app/src/main/res/values-hi/strings_k2go.xml @@ -724,7 +724,7 @@ सिस्टम फिर से इंस्टॉल करें सब कुछ मिटाकर शुरू से एक नया सिस्टम इंस्टॉल करें शुरू से फिर से इंस्टॉल करें? - यह वर्तमान सिस्टम और उसमें मौजूद सब कुछ — किताबें, मानचित्र, डाउनलोड और सेटिंग्स — मिटा देता है, फिर एक साफ़ प्रति इंस्टॉल करता है. इसे पूर्ववत नहीं किया जा सकता. अगर आप कुछ रखना चाहते हैं तो पहले बैकअप बनाएँ. इंटरनेट कनेक्शन आवश्यक है. + यह वर्तमान सिस्टम और उसमें मौजूद सब कुछ — किताबें, मानचित्र, डाउनलोड और सेटिंग्स — मिटा देता है, फिर एक साफ़ प्रति इंस्टॉल करता है. इसे पूर्ववत नहीं किया जा सकता. अगर आप कुछ रखना चाहते हैं तो पहले बैकअप बनाएँ. फिर आप तरीका चुनते हैं: डाउनलोड करें या दूसरे फ़ोन से कॉपी करें। मिटाएँ और फिर से इंस्टॉल करें सिस्टम से diff --git a/controller/app/src/main/res/values-hu/strings_k2go.xml b/controller/app/src/main/res/values-hu/strings_k2go.xml index 305543e7b..71ef32377 100644 --- a/controller/app/src/main/res/values-hu/strings_k2go.xml +++ b/controller/app/src/main/res/values-hu/strings_k2go.xml @@ -724,7 +724,7 @@ Rendszer újratelepítése Mindent töröl, és tiszta rendszert telepít a nulláról Újratelepítés a nulláról? - Ez törli a jelenlegi rendszert és mindent benne — könyvek, térképek, letöltések és beállítások —, majd tiszta másolatot telepít. Nem vonható vissza. Előbb készíts biztonsági mentést, ha meg akarsz tartani valamit. Internetkapcsolat szükséges. + Ez törli a jelenlegi rendszert és mindent benne — könyvek, térképek, letöltések és beállítások —, majd tiszta másolatot telepít. Nem vonható vissza. Előbb készíts biztonsági mentést, ha meg akarsz tartani valamit. Utána választ: letölti, vagy másik telefonról átmásolja. Törlés és újratelepítés Rendszerből diff --git a/controller/app/src/main/res/values-in/strings_k2go.xml b/controller/app/src/main/res/values-in/strings_k2go.xml index accbfa0ea..c702a73b9 100644 --- a/controller/app/src/main/res/values-in/strings_k2go.xml +++ b/controller/app/src/main/res/values-in/strings_k2go.xml @@ -724,7 +724,7 @@ Instal ulang sistem Hapus semuanya dan instal sistem baru dari awal Instal ulang dari awal? - Ini menghapus sistem saat ini dan semua isinya — buku, peta, unduhan, dan pengaturan — lalu menginstal salinan bersih. Tidak dapat dibatalkan. Cadangkan dulu jika ingin menyimpan sesuatu. Perlu koneksi internet. + Ini menghapus sistem saat ini dan semua isinya — buku, peta, unduhan, dan pengaturan — lalu menginstal salinan bersih. Tidak dapat dibatalkan. Cadangkan dulu jika ingin menyimpan sesuatu. Lalu Anda memilih caranya: mengunduh, atau menyalin dari ponsel lain. Hapus dan instal ulang Dari sistem diff --git a/controller/app/src/main/res/values-it/strings_k2go.xml b/controller/app/src/main/res/values-it/strings_k2go.xml index 64605ab25..3d786e717 100644 --- a/controller/app/src/main/res/values-it/strings_k2go.xml +++ b/controller/app/src/main/res/values-it/strings_k2go.xml @@ -724,7 +724,7 @@ Reinstalla il sistema Cancella tutto e installa un sistema nuovo da zero Reinstallare da zero? - Questo cancella il sistema attuale e tutto il suo contenuto — libri, mappe, download e impostazioni — poi installa una copia pulita. Non è reversibile. Fai prima un backup se vuoi conservare qualcosa. Richiede una connessione a internet. + Questo cancella il sistema attuale e tutto il suo contenuto — libri, mappe, download e impostazioni — poi installa una copia pulita. Non è reversibile. Fai prima un backup se vuoi conservare qualcosa. Poi scegli come: scaricarlo o copiarlo da un altro telefono. Cancella e reinstalla Dal sistema diff --git a/controller/app/src/main/res/values-ja/strings_k2go.xml b/controller/app/src/main/res/values-ja/strings_k2go.xml index c0917aa0b..b482c5204 100644 --- a/controller/app/src/main/res/values-ja/strings_k2go.xml +++ b/controller/app/src/main/res/values-ja/strings_k2go.xml @@ -693,7 +693,7 @@ 再構築 REST コアを再構築しますか? dash-node を最新バージョンに更新します。再構築中はサーバーが一時的に利用できなくなります。完了するまでこの画面を離れないでください。 - 再構築にはインターネット接続が必要です。 + 再構築にはその後、方法を選びます:ダウンロード、または別の端末からコピー。 ダッシュボードを更新中 その場で更新中… ダッシュボードが少しの間再起動します。 ダッシュボードを更新しました。 diff --git a/controller/app/src/main/res/values-ko/strings_k2go.xml b/controller/app/src/main/res/values-ko/strings_k2go.xml index 93b30f322..83895a02e 100644 --- a/controller/app/src/main/res/values-ko/strings_k2go.xml +++ b/controller/app/src/main/res/values-ko/strings_k2go.xml @@ -724,7 +724,7 @@ 시스템 다시 설치 모두 지우고 처음부터 새 시스템을 설치합니다 처음부터 다시 설치할까요? - 현재 시스템과 그 안의 모든 것 — 도서, 지도, 다운로드, 설정 — 을 지우고 깨끗한 사본을 설치합니다. 되돌릴 수 없습니다. 무언가를 남기려면 먼저 백업하세요. 인터넷 연결이 필요합니다. + 현재 시스템과 그 안의 모든 것 — 도서, 지도, 다운로드, 설정 — 을 지우고 깨끗한 사본을 설치합니다. 되돌릴 수 없습니다. 무언가를 남기려면 먼저 백업하세요. 그다음 방법을 선택합니다: 다운로드하거나 다른 기기에서 복사. 지우고 다시 설치 시스템에서 diff --git a/controller/app/src/main/res/values-lt/strings_k2go.xml b/controller/app/src/main/res/values-lt/strings_k2go.xml index 241d980ad..5627f7fbe 100644 --- a/controller/app/src/main/res/values-lt/strings_k2go.xml +++ b/controller/app/src/main/res/values-lt/strings_k2go.xml @@ -734,7 +734,7 @@ Įdiegti sistemą iš naujo Ištrina viską ir įdiegia švarią sistemą nuo nulio Įdiegti iš naujo nuo nulio? - Tai ištrina dabartinę sistemą ir viską joje — knygas, žemėlapius, atsisiuntimus ir nustatymus — ir įdiegia švarią kopiją. Negalima atšaukti. Pirmiausia sukurkite atsarginę kopiją, jei norite ką nors išsaugoti. Reikia interneto ryšio. + Tai ištrina dabartinę sistemą ir viską joje — knygas, žemėlapius, atsisiuntimus ir nustatymus — ir įdiegia švarią kopiją. Negalima atšaukti. Pirmiausia sukurkite atsarginę kopiją, jei norite ką nors išsaugoti. Tada pasirinksite kaip: atsisiųsti arba nukopijuoti iš kito telefono. Ištrinti ir įdiegti iš naujo Iš sistemos diff --git a/controller/app/src/main/res/values-nl/strings_k2go.xml b/controller/app/src/main/res/values-nl/strings_k2go.xml index b80525f3e..76ef46ca5 100644 --- a/controller/app/src/main/res/values-nl/strings_k2go.xml +++ b/controller/app/src/main/res/values-nl/strings_k2go.xml @@ -724,7 +724,7 @@ Systeem opnieuw installeren Wis alles en installeer een vers systeem vanaf nul Opnieuw installeren vanaf nul? - Dit wist het huidige systeem en alles erin — boeken, kaarten, downloads en instellingen — en installeert dan een schone kopie. Dit kan niet ongedaan worden gemaakt. Maak eerst een back-up als je iets wilt bewaren. Vereist een internetverbinding. + Dit wist het huidige systeem en alles erin — boeken, kaarten, downloads en instellingen — en installeert dan een schone kopie. Dit kan niet ongedaan worden gemaakt. Maak eerst een back-up als je iets wilt bewaren. Daarna kies je hoe: downloaden of kopiëren van een andere telefoon. Wissen en opnieuw installeren Van systeem diff --git a/controller/app/src/main/res/values-no/strings_k2go.xml b/controller/app/src/main/res/values-no/strings_k2go.xml index e2cb29566..a40cb99f8 100644 --- a/controller/app/src/main/res/values-no/strings_k2go.xml +++ b/controller/app/src/main/res/values-no/strings_k2go.xml @@ -734,7 +734,7 @@ Installer systemet på nytt Slett alt og installer et rent system fra bunnen Installere på nytt fra bunnen? - Dette sletter det nåværende systemet og alt i det — bøker, kart, nedlastinger og innstillinger — og installerer så en ren kopi. Det kan ikke angres. Ta en sikkerhetskopi først hvis du vil beholde noe. Krever internettforbindelse. + Dette sletter det nåværende systemet og alt i det — bøker, kart, nedlastinger og innstillinger — og installerer så en ren kopi. Det kan ikke angres. Ta en sikkerhetskopi først hvis du vil beholde noe. Deretter velger du hvordan: laste ned, eller kopiere fra en annen telefon. Slett og installer på nytt Fra systemet diff --git a/controller/app/src/main/res/values-pl/strings_k2go.xml b/controller/app/src/main/res/values-pl/strings_k2go.xml index 1a19d6f78..72c51c563 100644 --- a/controller/app/src/main/res/values-pl/strings_k2go.xml +++ b/controller/app/src/main/res/values-pl/strings_k2go.xml @@ -734,7 +734,7 @@ Zainstaluj system od nowa Usuń wszystko i zainstaluj świeży system od zera Zainstalować od nowa? - Spowoduje to usunięcie bieżącego systemu i całej jego zawartości — książek, map, pobrań i ustawień — a następnie instalację czystej kopii. Nie można tego cofnąć. Najpierw wykonaj kopię zapasową, jeśli chcesz coś zachować. Wymaga połączenia z internetem. + Spowoduje to usunięcie bieżącego systemu i całej jego zawartości — książek, map, pobrań i ustawień — a następnie instalację czystej kopii. Nie można tego cofnąć. Najpierw wykonaj kopię zapasową, jeśli chcesz coś zachować. Potem wybierasz sposób: pobranie lub skopiowanie z innego telefonu. Usuń i zainstaluj od nowa Z systemu diff --git a/controller/app/src/main/res/values-pt/strings_k2go.xml b/controller/app/src/main/res/values-pt/strings_k2go.xml index ed5cb3c80..e17afe107 100644 --- a/controller/app/src/main/res/values-pt/strings_k2go.xml +++ b/controller/app/src/main/res/values-pt/strings_k2go.xml @@ -724,7 +724,7 @@ Reinstalar o sistema Apaga tudo e instala um sistema novo do zero Reinstalar do zero? - Isto apaga o sistema atual e tudo nele — livros, mapas, downloads e configurações — e instala uma cópia limpa. Não pode ser desfeito. Faça um backup antes se quiser manter algo. Precisa de conexão com a internet. + Isto apaga o sistema atual e tudo nele — livros, mapas, downloads e configurações — e instala uma cópia limpa. Não pode ser desfeito. Faça um backup antes se quiser manter algo. Depois você escolhe como: baixar ou copiar de outro telefone. Apagar e reinstalar Do sistema diff --git a/controller/app/src/main/res/values-ro/strings_k2go.xml b/controller/app/src/main/res/values-ro/strings_k2go.xml index 1ef334972..a775c33d6 100644 --- a/controller/app/src/main/res/values-ro/strings_k2go.xml +++ b/controller/app/src/main/res/values-ro/strings_k2go.xml @@ -724,7 +724,7 @@ Reinstalează sistemul Șterge tot și instalează un sistem nou de la zero Reinstalezi de la zero? - Aceasta șterge sistemul actual și tot ce conține — cărți, hărți, descărcări și setări — apoi instalează o copie curată. Nu poate fi anulată. Fă mai întâi o copie de rezervă dacă vrei să păstrezi ceva. Necesită o conexiune la internet. + Aceasta șterge sistemul actual și tot ce conține — cărți, hărți, descărcări și setări — apoi instalează o copie curată. Nu poate fi anulată. Fă mai întâi o copie de rezervă dacă vrei să păstrezi ceva. Apoi alegeți cum: descărcare sau copiere de pe alt telefon. Șterge și reinstalează Din sistem diff --git a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml index 87ed2b7f0..25c27af60 100644 --- a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml +++ b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml @@ -724,7 +724,7 @@ Переустановить систему Стереть всё и установить новую систему с нуля Переустановить с нуля? - Это сотрёт текущую систему и всё её содержимое — книги, карты, загрузки и настройки — и установит чистую копию. Отменить нельзя. Сначала сделайте резервную копию, если хотите что-то сохранить. Требуется подключение к интернету. + Это сотрёт текущую систему и всё её содержимое — книги, карты, загрузки и настройки — и установит чистую копию. Отменить нельзя. Сначала сделайте резервную копию, если хотите что-то сохранить. Затем вы выберете способ: скачать или скопировать с другого телефона. Стереть и переустановить Из системы diff --git a/controller/app/src/main/res/values-sk/strings_k2go.xml b/controller/app/src/main/res/values-sk/strings_k2go.xml index d057c8f36..8d368c454 100644 --- a/controller/app/src/main/res/values-sk/strings_k2go.xml +++ b/controller/app/src/main/res/values-sk/strings_k2go.xml @@ -724,7 +724,7 @@ Preinštalovať systém Vymazať všetko a nainštalovať čistý systém od začiatku Preinštalovať od začiatku? - Týmto sa vymaže aktuálny systém a všetko v ňom — knihy, mapy, stiahnuté súbory a nastavenia — a nainštaluje sa čistá kópia. Nedá sa vrátiť späť. Ak si chcete niečo ponechať, najprv vytvorte zálohu. Vyžaduje pripojenie na internet. + Týmto sa vymaže aktuálny systém a všetko v ňom — knihy, mapy, stiahnuté súbory a nastavenia — a nainštaluje sa čistá kópia. Nedá sa vrátiť späť. Ak si chcete niečo ponechať, najprv vytvorte zálohu. Potom zvolíte ako: stiahnuť, alebo skopírovať z iného telefónu. Vymazať a preinštalovať Zo systému diff --git a/controller/app/src/main/res/values-sr/strings_k2go.xml b/controller/app/src/main/res/values-sr/strings_k2go.xml index 66d363f37..e77647543 100644 --- a/controller/app/src/main/res/values-sr/strings_k2go.xml +++ b/controller/app/src/main/res/values-sr/strings_k2go.xml @@ -724,7 +724,7 @@ Поново инсталирај систем Брише све и инсталира нов систем из почетка Поново инсталирати из почетка? - Ово брише тренутни систем и све у њему — књиге, мапе, преузимања и подешавања — а затим инсталира чисту копију. Не може се опозвати. Прво направите резервну копију ако желите нешто да задржите. Захтева интернет везу. + Ово брише тренутни систем и све у њему — књиге, мапе, преузимања и подешавања — а затим инсталира чисту копију. Не може се опозвати. Прво направите резервну копију ако желите нешто да задржите. Затим бирате како: преузимање или копирање са другог телефона. Обриши и поново инсталирај Из система diff --git a/controller/app/src/main/res/values-sw/strings_k2go.xml b/controller/app/src/main/res/values-sw/strings_k2go.xml index cd60e5c3f..59faf69f6 100644 --- a/controller/app/src/main/res/values-sw/strings_k2go.xml +++ b/controller/app/src/main/res/values-sw/strings_k2go.xml @@ -724,7 +724,7 @@ Sakinisha upya mfumo Futa kila kitu na usakinishe mfumo mpya kutoka mwanzo Kusakinisha upya kutoka mwanzo? - Hii inafuta mfumo wa sasa na kila kitu ndani yake — vitabu, ramani, vipakuliwa na mipangilio — kisha inasakinisha nakala safi. Haiwezi kutenduliwa. Hifadhi nakala rudufu kwanza ikiwa unataka kuweka chochote. Inahitaji muunganisho wa intaneti. + Hii inafuta mfumo wa sasa na kila kitu ndani yake — vitabu, ramani, vipakuliwa na mipangilio — kisha inasakinisha nakala safi. Haiwezi kutenduliwa. Hifadhi nakala rudufu kwanza ikiwa unataka kuweka chochote. Kisha unachagua jinsi: kupakua, au kunakili kutoka simu nyingine. Futa na usakinishe upya Kutoka kwa mfumo diff --git a/controller/app/src/main/res/values-ta/strings_k2go.xml b/controller/app/src/main/res/values-ta/strings_k2go.xml index d79f3bb4b..640f314b0 100644 --- a/controller/app/src/main/res/values-ta/strings_k2go.xml +++ b/controller/app/src/main/res/values-ta/strings_k2go.xml @@ -724,7 +724,7 @@ அமைப்பை மீண்டும் நிறுவு அனைத்தையும் அழித்து புதிதாக ஒரு புதிய அமைப்பை நிறுவும் புதிதாக மீண்டும் நிறுவவா? - இது தற்போதைய அமைப்பையும் அதிலுள்ள அனைத்தையும் — புத்தகங்கள், வரைபடங்கள், பதிவிறக்கங்கள் மற்றும் அமைப்புகள் — அழித்து, பிறகு ஒரு சுத்தமான நகலை நிறுவும். இதைத் திரும்பப்பெற முடியாது. ஏதேனும் வைத்திருக்க விரும்பினால் முதலில் காப்புப்பிரதி எடுக்கவும். இணைய இணைப்பு தேவை. + இது தற்போதைய அமைப்பையும் அதிலுள்ள அனைத்தையும் — புத்தகங்கள், வரைபடங்கள், பதிவிறக்கங்கள் மற்றும் அமைப்புகள் — அழித்து, பிறகு ஒரு சுத்தமான நகலை நிறுவும். இதைத் திரும்பப்பெற முடியாது. ஏதேனும் வைத்திருக்க விரும்பினால் முதலில் காப்புப்பிரதி எடுக்கவும். பிறகு வழியைத் தேர்ந்தெடுக்கிறீர்கள்: பதிவிறக்கம் அல்லது மற்றொரு தொலைபேசியிலிருந்து நகல். அழித்து மீண்டும் நிறுவு கணினியிலிருந்து diff --git a/controller/app/src/main/res/values-tr/strings_k2go.xml b/controller/app/src/main/res/values-tr/strings_k2go.xml index 4a607f716..eb302d27b 100644 --- a/controller/app/src/main/res/values-tr/strings_k2go.xml +++ b/controller/app/src/main/res/values-tr/strings_k2go.xml @@ -724,7 +724,7 @@ Sistemi yeniden kur Her şeyi siler ve sıfırdan yeni bir sistem kurar Sıfırdan yeniden kurulsun mu? - Bu, mevcut sistemi ve içindeki her şeyi — kitaplar, haritalar, indirmeler ve ayarlar — siler, ardından temiz bir kopya kurar. Geri alınamaz. Bir şey saklamak istiyorsanız önce yedek alın. İnternet bağlantısı gerekir. + Bu, mevcut sistemi ve içindeki her şeyi — kitaplar, haritalar, indirmeler ve ayarlar — siler, ardından temiz bir kopya kurar. Geri alınamaz. Bir şey saklamak istiyorsanız önce yedek alın. Sonra nasıl olacağını seçersiniz: indirme ya da başka telefondan kopyalama. Sil ve yeniden kur Sistemden diff --git a/controller/app/src/main/res/values-uk/strings_k2go.xml b/controller/app/src/main/res/values-uk/strings_k2go.xml index f2b18b291..31fb71bbf 100644 --- a/controller/app/src/main/res/values-uk/strings_k2go.xml +++ b/controller/app/src/main/res/values-uk/strings_k2go.xml @@ -724,7 +724,7 @@ Перевстановити систему Стерти все та встановити нову систему з нуля Перевстановити з нуля? - Це зітре поточну систему й увесь її вміст — книги, карти, завантаження та налаштування — і встановить чисту копію. Скасувати неможливо. Спочатку зробіть резервну копію, якщо хочете щось зберегти. Потрібне підключення до інтернету. + Це зітре поточну систему й увесь її вміст — книги, карти, завантаження та налаштування — і встановить чисту копію. Скасувати неможливо. Спочатку зробіть резервну копію, якщо хочете щось зберегти. Потім ви виберете спосіб: завантажити або скопіювати з іншого телефона. Стерти та перевстановити Із системи diff --git a/controller/app/src/main/res/values-vi/strings_k2go.xml b/controller/app/src/main/res/values-vi/strings_k2go.xml index 7c90f2a1c..3da5e03be 100644 --- a/controller/app/src/main/res/values-vi/strings_k2go.xml +++ b/controller/app/src/main/res/values-vi/strings_k2go.xml @@ -724,7 +724,7 @@ Cài đặt lại hệ thống Xóa mọi thứ và cài đặt một hệ thống mới từ đầu Cài đặt lại từ đầu? - Thao tác này xóa hệ thống hiện tại và mọi thứ trong đó — sách, bản đồ, tải xuống và cài đặt — rồi cài một bản sạch. Không thể hoàn tác. Hãy sao lưu trước nếu bạn muốn giữ lại thứ gì đó. Cần kết nối internet. + Thao tác này xóa hệ thống hiện tại và mọi thứ trong đó — sách, bản đồ, tải xuống và cài đặt — rồi cài một bản sạch. Không thể hoàn tác. Hãy sao lưu trước nếu bạn muốn giữ lại thứ gì đó. Sau đó bạn chọn cách: tải xuống, hoặc sao chép từ điện thoại khác. Xóa và cài đặt lại Từ hệ thống diff --git a/controller/app/src/main/res/values-yo/strings_k2go.xml b/controller/app/src/main/res/values-yo/strings_k2go.xml index 9c7e3e4df..edbd553d2 100644 --- a/controller/app/src/main/res/values-yo/strings_k2go.xml +++ b/controller/app/src/main/res/values-yo/strings_k2go.xml @@ -724,7 +724,7 @@ Tún ètò náà fi sori ẹrọ Pa gbogbo rẹ̀ rẹ́ kí o sì fi ètò tuntun sori ẹrọ láti ìbẹ̀rẹ̀ Tún fi sori ẹrọ láti ìbẹ̀rẹ̀? - Èyí ń pa ètò tí ó wà lọ́wọ́lọ́wọ́ àti gbogbo ohun tí ó wà nínú rẹ̀ rẹ́ — àwọn ìwé, àwọn máàpù, àwọn ohun tí a gbà sílẹ̀ àti àwọn ètò — lẹ́yìn náà ó fi ẹ̀dà mímọ́ sori ẹrọ. Kò ṣeé yí padà. Kọ́kọ́ ṣe àkọsílẹ̀ ìdáàbòbò bí o bá fẹ́ pa ohunkóhun mọ́. Ó nílò ìsopọ̀ íntánẹ́ẹ̀tì. + Èyí ń pa ètò tí ó wà lọ́wọ́lọ́wọ́ àti gbogbo ohun tí ó wà nínú rẹ̀ rẹ́ — àwọn ìwé, àwọn máàpù, àwọn ohun tí a gbà sílẹ̀ àti àwọn ètò — lẹ́yìn náà ó fi ẹ̀dà mímọ́ sori ẹrọ. Kò ṣeé yí padà. Kọ́kọ́ ṣe àkọsílẹ̀ ìdáàbòbò bí o bá fẹ́ pa ohunkóhun mọ́. Lẹ́yìn náà o yàn ọ̀nà: gbà á sílẹ̀, tàbí dà kọ láti inú fóònù mìíràn. Pa rẹ́ kí o sì tún fi sori ẹrọ Láti inú ẹ̀rọ diff --git a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml index fc424f0ce..a49383a17 100644 --- a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml +++ b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml @@ -693,7 +693,7 @@ 重建 重建 REST 核心? 将 dash-node 更新到最新版本。重建期间服务器会短暂不可用;完成前请勿离开此界面。 - 重建需要互联网连接。 + 重建然后你选择方式:下载,或从另一台手机复制。 正在更新仪表板 正在原地更新… 仪表板会短暂重启。 仪表板已更新。 diff --git a/controller/app/src/main/res/values/strings_k2go.xml b/controller/app/src/main/res/values/strings_k2go.xml index 4fb2a59d5..68acdbbfd 100644 --- a/controller/app/src/main/res/values/strings_k2go.xml +++ b/controller/app/src/main/res/values/strings_k2go.xml @@ -203,7 +203,7 @@ Reinstall the system Erase everything and install a fresh system from scratch Reinstall from scratch? - This erases the current system and everything in it — books, maps, downloads and settings — then installs a clean copy. It can\'t be undone. Back up first if you want to keep anything. Needs an internet connection. + This erases the current system and everything in it — books, maps, downloads and settings — then installs a clean copy. It can\'t be undone. Back up first if you want to keep anything. Then you choose how: download it, or copy it from another phone. Erase and reinstall Coming in the next build Start From 3b146a0ec75fed7684f3666f66b3946c4fbeafe0 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 07:15:00 -0600 Subject: [PATCH 3/6] ADFA-5143 fix(clone): recovery's own suggestion no longer loops back into recovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan B opened the exit and then blocked it. A killed clone-receive leaves the install marker set, so `recovering` was true again the moment recovery's suggestion — Reinstall → Copy from a phone — landed on LibraryActivity: dialog, recovery, wizard, clone, dialog. The predicate now skips when EXTRA_SETTING_UP is present. That extra already means "the caller knows there is no usable system and is bringing this person somewhere to fix it", which is exactly when a dialog announcing the system is broken has nothing to add and everything to block. Leave and come back cold and the marker still routes to recovery, correctly — they are no longer mid-attempt. Not fixed with a wipe, which was the other candidate: wiping first would remove the half-written tree, and that tree is the reason plan B exists. rsync resumes from it. --- .../org/iiab/controller/redesign/LibraryActivity.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java index 5046e78e2..10c5333de 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java @@ -222,6 +222,17 @@ public android.graphics.Typeface fetchFont(String fontFamily) { // ADFA-4919 (2c-ii): marker set + no live installer (both install repos IDLE) means a proot // install was killed. Enter recovery instead of quietly lifting the gate to an empty library. recovering = !installing + // ADFA-5143 (plan B): not when the user was brought here to get a system. A killed + // clone-receive leaves the marker set, so this predicate was true again the moment + // recovery's own suggestion — Reinstall → Copy from a phone — landed on this screen: + // dialog, recovery, wizard, clone, dialog. A loop out of the exit. + // + // The extra already means "the caller knows there is no usable system and is bringing + // this person somewhere to fix it", which is exactly when a dialog announcing that the + // system is broken has nothing to add and everything to block. Leave and come back + // cold and the marker still puts them in recovery, correctly: they are no longer + // mid-attempt. + && !broughtHereToSetUp && org.iiab.controller.InstallGuard.inProgress(this) && !InstallProgressRepository.get().current().isRunning() && !org.iiab.controller.install.presentation.ModuleQueueRepository.get().isRunning() From 1ebb31a3b1968922b56c82b5fbbe698ac502ed1b Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 08:18:33 -0600 Subject: [PATCH 4/6] ADFA-5143 fix(clone): release the clone environment from disk, not from fragment memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A receive that survived the app being closed left the install marker set, the environment lock held and the server not booted, so the next launch read a completed clone as a damaged install and refused to open it. releaseCloneEnv() gated on cloneLockHeld/cloneGuardHeld — fragment fields that die with the fragment. A fragment recreated mid-transfer re-attached to the running rsync and reached the terminal with both false, so the release returned on its first line. showReceiveTerminal() now re-derives both facts from disk before releasing: reaching a receive terminal is itself the proof this side owns the environment. release() is idempotent and a receive cannot coexist with an install, so re-deriving cannot drop someone else's claim. Also make rsync's per-file errors visible. Only the final summary line says "rsync error:"; every per-file failure starts with a bare "rsync:", so none matched and all were stored as lastFile — filed as the name of the file being transferred and shown to the user as such. They now go to logcat and LogRepository, and the exit code is logged with its classification, so a non-zero code treated as complete no longer reads as a bug. Exit 23 still counts as success: the clone behind this report was complete and the errors were attribute-only. Whether to distinguish attribute failures from missing files is its own change, once the logs show which we get. --- .../org/iiab/controller/RsyncManager.java | 30 ++++++++++++++++++- .../controller/redesign/CloneFragment.java | 13 ++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/controller/app/src/main/java/org/iiab/controller/RsyncManager.java b/controller/app/src/main/java/org/iiab/controller/RsyncManager.java index e2819f2e7..efa7c01aa 100644 --- a/controller/app/src/main/java/org/iiab/controller/RsyncManager.java +++ b/controller/app/src/main/java/org/iiab/controller/RsyncManager.java @@ -151,8 +151,25 @@ public void startClient(Context context, ShareConfig config, String hostIp, int mainHandler.post(() -> listener.onProgress(progress.percent, progress.speed, progress.eta, finalFile)); } // PHASE 1 FIX: Strict match for actual rsync errors, ignoring files named "error" - else if (line.contains("@ERROR:") || line.contains("rsync error:")) { + // + // ADFA-5143: "rsync error:" is only the FINAL summary line. Every per-file failure + // rsync prints starts with a bare "rsync:" — + // rsync: [receiver] mkstemp "..." failed: Permission denied (13) + // rsync: [generator] failed to set times on "...": Operation not permitted (1) + // — so none of them matched, they all fell through to the branch below, and were + // stored as lastFile: filed as the name of the file being transferred and shown to + // the user as such. A device log of a code-23 transfer therefore ended with + // "some files/attrs were not transferred (see previous errors)" and no previous + // errors anywhere, because they had been reclassified as data. + // + // That is the difference between a benign 23 (attributes Android will not let us + // set) and a fatal one (files that did not arrive), and it is the whole reason + // nobody can tell those apart today. Logged into LogRepository as well as logcat, + // so the failure report a user can send carries them. + else if (line.contains("@ERROR:") || line.startsWith("rsync:") + || line.startsWith("rsync warning:") || line.contains("rsync error:")) { Log.e(TAG, "[Rsync Output Error] " + line); + org.iiab.controller.LogRepository.get().append("[Rsync] " + line); } else if (!line.trim().isEmpty() && !line.startsWith("sending incremental file list") && !line.contains("bytes/sec")) { lastFile = line.trim(); } @@ -162,6 +179,17 @@ else if (line.contains("@ERROR:") || line.contains("rsync error:")) { secretStore.deleteClientPassword(); + // ADFA-5143: say the verdict out loud. The log used to show a code-23 error line and then + // a SUCCESS state with nothing in between explaining the jump, which reads like a bug in + // the app rather than a deliberate rule. RsyncOutcome.isSuccess() counts 0, 23 and 24 as + // complete on purpose — 24 (files vanished from a live source) is defensible, and 23 is + // ambiguous: attributes Android refused to set, or files that never arrived. Until the + // per-file errors above have been read on a real transfer, the rule stays as it is and + // the log states it. + Log.i(TAG, "rsync client exit " + exitCode + " → " + + RsyncOutcome.classifyTransfer(exitCode) + + (RsyncOutcome.isSuccess(exitCode) && exitCode != 0 + ? " (non-zero treated as complete — see any [Rsync Output Error] lines above)" : "")); if (isCancelled) { mainHandler.post(() -> listener.onError(context.getString(R.string.rsync_error_cancelled))); } else { diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 6e1c17fea..48ff47842 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -966,6 +966,19 @@ private void startReceiveTransfer() { } private void showReceiveTerminal(boolean ok, String message) { + // ADFA-5143: reaching a receive terminal is itself the proof that this side owns the clone + // environment — whatever this fragment instance happens to remember. cloneLockHeld and + // cloneGuardHeld are fragment fields, so a fragment recreated mid-transfer (app closed and + // reopened, then re-attached to the running rsync) arrived here with both false and + // releaseCloneEnv() returned on its first line: the install marker stayed set, the lock was + // never dropped and the server was never booted. The next launch then read that leftover + // marker as a damaged install — of a clone that had in fact completed. Re-derive the two + // facts from disk, where they actually live, instead of trusting the fragment's memory. + Context termCtx = getContext(); + if (termCtx != null) { + cloneLockHeld = true; // EnvironmentLock.release() is idempotent and self-heals a stale file + cloneGuardHeld = org.iiab.controller.InstallGuard.inProgress(termCtx); + } releaseCloneEnv(); // ADFA-4956: boot the (possibly replaced) system, end guard, drop the lock syncVm.releaseNetwork(); String body = (message != null) ? message : ""; From 4ef10f8bc83c32669f8568b8f3c3b035aab8227d Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 09:07:13 -0600 Subject: [PATCH 5/6] ADFA-5143 style(clone): the receive transfer screen on the backup/restore template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The transfer state was the last clone screen not built like the app's other long operations: a bare ProgressBar, no animation, no wait card. It now uses the backup/restore job template — the clone Lottie with a K2Go logo composited over each end, an M3 LinearProgressIndicator, the centred status line and the shared "this takes a while" card (existing strings, so no new translations). The card's wording holds here: CloneShareService keeps the pull alive and its notification returns to the app. The logo weights are the job screen's own, mirrored, so the receiver lands where backup/restore put theirs and the donor mirrors it over the green glow. No card background: renderReceive() hides everything else while busy, so the block is the whole screen. Clone's four dialogs move to MaterialAlertDialogBuilder. The reduce-motion reading moves to util/Motion and LibraryActivity delegates to it, rather than the new screen keeping a private copy of the same setting. The animation is started and paused by whatever shows or hides the block, so a hidden screen can't leave a loop running. setBarIndeterminate() takes the indicator off screen to switch modes: BaseProgressIndicator guards that transition while visible, and this screen crosses it every run. Material's internals weren't verifiable here, so the switch no longer depends on them. --- .../controller/redesign/CloneFragment.java | 81 ++++++++++++++++--- .../controller/redesign/LibraryActivity.java | 9 +-- .../java/org/iiab/controller/util/Motion.java | 39 +++++++++ .../main/res/layout/fragment_k2go_clone.xml | 78 +++++++++++++++--- .../app/src/main/res/raw/k2go_clone_loop.json | 1 + 5 files changed, 183 insertions(+), 25 deletions(-) create mode 100644 controller/app/src/main/java/org/iiab/controller/util/Motion.java create mode 100644 controller/app/src/main/res/raw/k2go_clone_loop.json diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 48ff47842..34f9e6541 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -29,7 +29,7 @@ import com.journeyapps.barcodescanner.ScanOptions; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; +import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.core.content.ContextCompat; import androidx.core.content.FileProvider; import androidx.fragment.app.Fragment; @@ -104,7 +104,10 @@ private enum Stage { JOIN, START } private LinearLayout receiveBox, progressBox; private EditText paste; private TextView receiveStart, pStatus, pFile, pStats, cancel; - private ProgressBar pbar; + private ProgressBar pbar; // ADFA-5143: a LinearProgressIndicator, which is a ProgressBar + private com.airbnb.lottie.LottieAnimationView anim; // ADFA-5143: the clone loop + // ADFA-5143: read once — renderReceive() runs on every progress tick and this is a Settings read. + private boolean reduceMotion = false; private long lastSeq = -1L; private LinearLayout confirmPanel, confirmSizes, confirmReplace, confirmFresh; private TextView confirmSys, confirmContent, confirmTotal; @@ -185,6 +188,20 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c progressBox = v.findViewById(R.id.k2go_clone_progress); pStatus = v.findViewById(R.id.k2go_clone_pstatus); pbar = v.findViewById(R.id.k2go_clone_pbar); + // ADFA-5143: the transfer state uses the same Lottie template as the backup / restore job + // screen. The animation ships without icons; the two K2Go logos are composited by the layout. + anim = v.findViewById(R.id.k2go_clone_anim); + reduceMotion = org.iiab.controller.util.Motion.reduced(getContext()); + if (anim != null) { + anim.setAnimation(R.raw.k2go_clone_loop); + if (reduceMotion) { + // Reduce motion: hold one frame — the glows and a few dots still read as "in flight", + // and the screen never depends on movement to be understood. + anim.setProgress(0.5f); + } else { + anim.setRepeatCount(com.airbnb.lottie.LottieDrawable.INFINITE); + } + } pFile = v.findViewById(R.id.k2go_clone_pfile); pStats = v.findViewById(R.id.k2go_clone_pstats); cancel = v.findViewById(R.id.k2go_clone_cancel); @@ -305,7 +322,7 @@ private void requestMode(Mode target) { boolean sharing = (side == Side.SEND && !sendApp && stage == Stage.START && daemonStarted); if (target == mode || !sharing) { setMode(target); return; } String label = (target == Mode.HOTSPOT) ? "Hotspot" : "Wi-Fi"; - new AlertDialog.Builder(requireContext()) + new MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(R.string.k2go_clone_switch_title, label)) .setMessage(getString(R.string.k2go_clone_switch_msg)) .setNegativeButton(getString(R.string.k2go_cancel), null) @@ -757,7 +774,7 @@ private String bitsLabel(int bits) { // nothing to copy — warn before probing rather than pulling an empty library. private void probeOrWarnEmpty(SyncHandshakeHelper.SyncCredentials creds) { if (!creds.hasRootfs) { - new AlertDialog.Builder(requireContext()) + new MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(R.string.k2go_clone_nolib_title)) .setMessage(getString(R.string.k2go_clone_nolib_msg)) .setNegativeButton(getString(R.string.k2go_cancel), null) @@ -793,10 +810,40 @@ private void onTransferState(SyncTransferState st) { syncProtection(); // ADFA-4782: match protection to the live pull state on every transition } + /** + * ADFA-5143: show or hide the transfer block, and let the Lottie follow it. The animation is only + * ever running while the block that contains it is on screen — one place decides both, so a hidden + * screen can't leave a loop spinning against the battery. + */ + private void showProgress(boolean visible) { + progressBox.setVisibility(visible ? View.VISIBLE : View.GONE); + if (anim == null || reduceMotion) return; + if (visible) { + if (!anim.isAnimating()) anim.playAnimation(); + } else if (anim.isAnimating()) { + anim.pauseAnimation(); + } + } + + /** + * ADFA-5143: switch the M3 indicator between determinate and indeterminate without depending on + * whether Material allows it in place. {@code BaseProgressIndicator} guards that transition while + * the indicator is visible to the user, and this screen crosses it on every run (CONNECTING and + * CALCULATING are indeterminate, TRANSFERRING is not) — so the bar is taken off screen for the + * switch and put back. Costs nothing if the guard never fires. + */ + private void setBarIndeterminate(boolean indeterminate) { + if (pbar == null || pbar.isIndeterminate() == indeterminate) return; + int was = pbar.getVisibility(); + pbar.setVisibility(View.GONE); + pbar.setIndeterminate(indeterminate); + pbar.setVisibility(was); + } + private void renderReceive() { SyncTransferState st = SyncProgressRepository.get().current(); boolean busy = (st != null && st.isActive()); - progressBox.setVisibility(busy ? View.VISIBLE : View.GONE); + showProgress(busy); confirmPanel.setVisibility(View.GONE); rcvIncompat.setVisibility(View.GONE); // ADFA-4784 if (busy) { @@ -807,7 +854,7 @@ private void renderReceive() { rcvCamNote.setVisibility(View.GONE); rcvShowPaste.setVisibility(View.GONE); pasteBlock.setVisibility(View.GONE); SyncTransferState.Phase ph = st.phase; if (ph == SyncTransferState.Phase.CONFIRM) { - progressBox.setVisibility(View.GONE); + showProgress(false); // ADFA-4790: confirm as a System/Content/Total table (sizes travel in the QR) per the // design mockup; the replace notice is static in the layout. If the sender didn't send // sizes (older build), hide the table and just show the notice. @@ -831,13 +878,13 @@ private void renderReceive() { return; } if (ph == SyncTransferState.Phase.TRANSFERRING) { - pbar.setIndeterminate(false); + setBarIndeterminate(false); pbar.setProgress(st.percent); pStatus.setText(getString(R.string.k2go_clone_copying)); pFile.setText(st.file); pStats.setText(st.percent + "% " + st.speed + " ETA " + st.eta); } else { - pbar.setIndeterminate(true); + setBarIndeterminate(true); pStatus.setText(ph == SyncTransferState.Phase.CALCULATING ? getString(R.string.k2go_clone_calculating) : getString(R.string.k2go_clone_connecting)); pFile.setText(""); pStats.setText(""); } @@ -987,7 +1034,7 @@ private void showReceiveTerminal(boolean ok, String message) { body += "\n\nThe copy was stopped by the system. Keep this screen on and the app in the " + "foreground during a transfer, then scan again to resume."; } - new AlertDialog.Builder(requireContext()) + new MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(ok ? R.string.k2go_clone_copy_complete : R.string.k2go_clone_copy_stopped)) .setMessage(body) .setPositiveButton(getString(android.R.string.ok), (d, w) -> { SyncProgressRepository.get().postIdle(); renderReceive(); }) @@ -995,6 +1042,20 @@ private void showReceiveTerminal(boolean ok, String message) { .show(); } + // ADFA-5143: the loop follows the screen, like the backup / restore job screen. Only the animation + // is touched here — the transfer itself is owned by the service and keeps running either way. + @Override + public void onResume() { + super.onResume(); + if (progressBox != null) showProgress(progressBox.getVisibility() == View.VISIBLE); + } + + @Override + public void onPause() { + super.onPause(); + if (anim != null && anim.isAnimating()) anim.pauseAnimation(); + } + @Override public void onDestroyView() { super.onDestroyView(); @@ -1008,7 +1069,7 @@ public void onDestroyView() { } private void confirmStop() { - new AlertDialog.Builder(requireContext()) + new MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(R.string.k2go_clone_stopshare_title)) .setMessage(getString(R.string.k2go_clone_stopshare_msg)) .setNegativeButton(getString(R.string.k2go_cancel), null) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java index 10c5333de..712a0042a 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java @@ -996,12 +996,9 @@ public void onBackPressed() { } private boolean reduceMotion() { - try { - return android.provider.Settings.Global.getFloat(getContentResolver(), - android.provider.Settings.Global.ANIMATOR_DURATION_SCALE, 1f) == 0f; - } catch (Exception e) { - return false; - } + // ADFA-5143: the reading moved to util/Motion so the clone screen answers this the same way + // this one does, instead of keeping a private copy of the same setting. + return org.iiab.controller.util.Motion.reduced(this); } /** ADFA-4837: true while a server start is actually in progress (header shows "Starting…"). */ diff --git a/controller/app/src/main/java/org/iiab/controller/util/Motion.java b/controller/app/src/main/java/org/iiab/controller/util/Motion.java new file mode 100644 index 000000000..9cf31b43e --- /dev/null +++ b/controller/app/src/main/java/org/iiab/controller/util/Motion.java @@ -0,0 +1,39 @@ +/* + * ============================================================================ + * Name : Motion.java + * Author : AppDevForAll + * Copyright : Copyright (c) 2026 AppDevForAll + * Description : One reading of the system "reduce motion" setting. + * ============================================================================ + */ +package org.iiab.controller.util; + +import android.content.Context; +import android.provider.Settings; + +/** + * Whether the user asked the system to stop animating. + * + *

Every screen that plays a Lottie has to answer this, and the answer must be the same everywhere: + * a phone that reports no animation cannot have one screen honouring it and the next ignoring it. It + * lives here so there is one reading of one setting rather than a private copy per screen. + * + *

Callers decide what to do with a {@code true} — a static frame, a hidden view, no animation at + * all — but a screen must never depend on motion to be understood. + */ +public final class Motion { + + private Motion() { + } + + /** True when the system animator duration scale is 0 ("remove animations" / reduce motion). */ + public static boolean reduced(Context ctx) { + if (ctx == null) return false; + try { + return Settings.Global.getFloat(ctx.getContentResolver(), + Settings.Global.ANIMATOR_DURATION_SCALE, 1f) == 0f; + } catch (Exception e) { + return false; + } + } +} diff --git a/controller/app/src/main/res/layout/fragment_k2go_clone.xml b/controller/app/src/main/res/layout/fragment_k2go_clone.xml index ffb06fe35..8cd78509d 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_clone.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_clone.xml @@ -389,20 +389,80 @@ android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceBodyMedium" android:clickable="true" android:focusable="true" /> + - - + android:orientation="vertical" android:layout_marginTop="8dp" android:visibility="gone"> + + + + + + + + + + + + + + + + + + + + + + + + + + + android:layout_marginTop="4dp" android:gravity="center" + android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceBodyMedium" /> + + + + + + + diff --git a/controller/app/src/main/res/raw/k2go_clone_loop.json b/controller/app/src/main/res/raw/k2go_clone_loop.json new file mode 100644 index 000000000..263a97f3b --- /dev/null +++ b/controller/app/src/main/res/raw/k2go_clone_loop.json @@ -0,0 +1 @@ +{"layers": [{"nm": "glow_donor", "ddd": 0, "ty": 4, "ind": 99, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.218847050625474]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281152949374526]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281152949374526]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.218847050625474]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.21884705062547]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281152949374526]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.28115294937453]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.218847050625477]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.21884705062547]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281152949374523]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.28115294937453]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.218847050625477]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.218847050625467]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281152949374523]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.28115294937453]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [18.21884705062548]}, {"t": 60, "s": [12]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [108, 196], "a": 0}, "s": {"k": [112, 112], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0, 0.745, 0, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}, {"nm": "glow_receiver", "ddd": 0, "ty": 4, "ind": 4, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281153]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [24.925487]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [17.625]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12.398428]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [13.554712]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [20.140576]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [26.726441]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [27.882725]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [22.656153]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [15.355666]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12.0]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [15.355666]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [22.656153]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [27.882725]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [26.726441]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [20.140576]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [13.554712]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [12.398428]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [17.625]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [24.925487]}, {"t": 60, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [28.281153]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [492, 196], "a": 0}, "s": {"k": [112, 112], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0.949, 0.635, 0.235, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}, {"nm": "dot0", "ddd": 0, "ty": 4, "ind": 0, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [176, 204]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [192.5, 203.53846153846155]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [209, 203.07692307692307]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [225.5, 202.6153846153846]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [242, 202.15384615384616]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [258.5, 201.69230769230768]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [275, 201.23076923076923]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [291.5, 200.76923076923077]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [308, 200.30769230769232]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [324.5, 199.84615384615384]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [341, 199.3846153846154]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [357.5, 198.92307692307693]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [374, 198.46153846153845]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [390.5, 198]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [407, 197.53846153846155]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [423.5, 197.07692307692307]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [440, 196.6153846153846]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [456.5, 196.15384615384616]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 60, "s": [176, 204]}]}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [37.5]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [75]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [70]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [40]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [10]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 60, "s": [0]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [0, 0], "a": 0}, "s": {"k": [12, 12], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0.18, 0.62, 0.357, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}, {"nm": "dot1", "ddd": 0, "ty": 4, "ind": 1, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [423.5, 197.07692307692307]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [440, 196.6153846153846]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [456.5, 196.15384615384616]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [176, 204]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [192.5, 203.53846153846155]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [209, 203.07692307692307]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [225.5, 202.6153846153846]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [242, 202.15384615384616]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [258.5, 201.69230769230768]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [275, 201.23076923076923]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [291.5, 200.76923076923077]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [308, 200.30769230769232]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [324.5, 199.84615384615384]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [341, 199.3846153846154]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [357.5, 198.92307692307693]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [374, 198.46153846153845]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [390.5, 198]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [407, 197.53846153846155]}, {"t": 60, "s": [423.5, 197.07692307692307]}]}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [70]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [40]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [10]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [37.5]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [75]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 60, "s": [70]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [0, 0], "a": 0}, "s": {"k": [12, 12], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0.949, 0.635, 0.235, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}, {"nm": "dot2", "ddd": 0, "ty": 4, "ind": 2, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [341, 199.3846153846154]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [357.5, 198.92307692307693]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [374, 198.46153846153845]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [390.5, 198]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [407, 197.53846153846155]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [423.5, 197.07692307692307]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [440, 196.6153846153846]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [456.5, 196.15384615384616]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [176, 204]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [192.5, 203.53846153846155]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [209, 203.07692307692307]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [225.5, 202.6153846153846]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [242, 202.15384615384616]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [258.5, 201.69230769230768]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [275, 201.23076923076923]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [291.5, 200.76923076923077]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [308, 200.30769230769232]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [324.5, 199.84615384615384]}, {"t": 60, "s": [341, 199.3846153846154]}]}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [70]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [40]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [10]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [37.5]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [75]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 60, "s": [100]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [0, 0], "a": 0}, "s": {"k": [12, 12], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0.769, 0.275, 0.184, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}, {"nm": "dot3", "ddd": 0, "ty": 4, "ind": 3, "sr": 1, "ip": 0, "op": 60, "st": 0, "ks": {"a": {"k": [0, 0], "a": 0}, "p": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [258.5, 201.69230769230768]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [275, 201.23076923076923]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [291.5, 200.76923076923077]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [308, 200.30769230769232]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [324.5, 199.84615384615384]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [341, 199.3846153846154]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [357.5, 198.92307692307693]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [374, 198.46153846153845]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [390.5, 198]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [407, 197.53846153846155]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [423.5, 197.07692307692307]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [440, 196.6153846153846]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [456.5, 196.15384615384616]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [462, 196]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [176, 204]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [192.5, 203.53846153846155]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [209, 203.07692307692307]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [225.5, 202.6153846153846]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [242, 202.15384615384616]}, {"t": 60, "s": [258.5, 201.69230769230768]}]}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"a": 1, "k": [{"t": 0, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 3, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 6, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 9, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 12, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 15, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 18, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 21, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 24, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 27, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 30, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [70]}, {"t": 33, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [40]}, {"t": 36, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [10]}, {"t": 39, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 42, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 45, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [0]}, {"t": 48, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [37.5]}, {"t": 51, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [75]}, {"t": 54, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 57, "i": {"x": [1], "y": [1]}, "o": {"x": [0], "y": [0]}, "s": [100]}, {"t": 60, "s": [100]}]}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}, "ao": 0, "bm": 0, "shapes": [{"ty": "gr", "it": [{"ty": "el", "d": 1, "p": {"k": [0, 0], "a": 0}, "s": {"k": [12, 12], "a": 0}}, {"ty": "fl", "o": {"k": 100, "a": 0}, "c": {"k": [0.055, 0.361, 0.388, 1], "a": 0}}, {"ty": "tr", "a": {"k": [0, 0], "a": 0}, "p": {"k": [0, 0], "a": 0}, "s": {"k": [100, 100], "a": 0}, "r": {"k": 0, "a": 0}, "o": {"k": 100, "a": 0}, "sk": {"k": 0, "a": 0}, "sa": {"k": 0, "a": 0}}]}]}], "nm": "k2go-clone-loop", "v": "5.5.2", "fr": 30, "ip": 0, "op": 60, "w": 600, "h": 368, "ddd": 0, "assets": []} \ No newline at end of file From 67eb2940d5474805070039db88b90c40b792d5bf Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Fri, 14 Aug 2026 09:48:34 -0600 Subject: [PATCH 6/6] ADFA-5143 fix(clone): the transfer screen's reduce-motion answer can't go stale Review follow-ups on the M3 transfer screen. The reduce-motion flag was read once in onCreateView and cached, but changing the setting doesn't recreate the fragment, so the copy could outlive the truth. It is re-read in onResume, the only moment it can change unnoticed, which also keeps the read off the progress-tick path. Turning animations off mid-transfer now pauses the loop. pbar is typed as LinearProgressIndicator and uses setProgressCompat, which animates to the new value instead of jumping. The explicit switch out of indeterminate stays: setProgressCompat can also do it alone, but only after the current cycle, and the screen should not depend on that. --- .../iiab/controller/redesign/CloneFragment.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 34f9e6541..0d5899e3e 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -20,7 +20,6 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import androidx.activity.result.ActivityResultLauncher; @@ -30,6 +29,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.material.dialog.MaterialAlertDialogBuilder; +import com.google.android.material.progressindicator.LinearProgressIndicator; import androidx.core.content.ContextCompat; import androidx.core.content.FileProvider; import androidx.fragment.app.Fragment; @@ -104,7 +104,7 @@ private enum Stage { JOIN, START } private LinearLayout receiveBox, progressBox; private EditText paste; private TextView receiveStart, pStatus, pFile, pStats, cancel; - private ProgressBar pbar; // ADFA-5143: a LinearProgressIndicator, which is a ProgressBar + private LinearProgressIndicator pbar; // ADFA-5143: typed as itself, so setProgressCompat is available private com.airbnb.lottie.LottieAnimationView anim; // ADFA-5143: the clone loop // ADFA-5143: read once — renderReceive() runs on every progress tick and this is a Settings read. private boolean reduceMotion = false; @@ -879,7 +879,10 @@ private void renderReceive() { } if (ph == SyncTransferState.Phase.TRANSFERRING) { setBarIndeterminate(false); - pbar.setProgress(st.percent); + // setProgressCompat animates to the new value instead of jumping. The explicit switch + // above stays: setProgressCompat can also leave indeterminate mode on its own, but only + // after the current cycle, and that path isn't something this screen should depend on. + pbar.setProgressCompat(st.percent, true); pStatus.setText(getString(R.string.k2go_clone_copying)); pFile.setText(st.file); pStats.setText(st.percent + "% " + st.speed + " ETA " + st.eta); @@ -1047,6 +1050,11 @@ private void showReceiveTerminal(boolean ok, String message) { @Override public void onResume() { super.onResume(); + // Re-read the setting here rather than trusting what onCreateView saw: changing it doesn't + // recreate the fragment, so a cached answer can outlive the truth. Coming back to the front is + // the only moment it can have changed behind our back, and it keeps the read off the tick path. + reduceMotion = org.iiab.controller.util.Motion.reduced(getContext()); + if (anim != null && reduceMotion && anim.isAnimating()) anim.pauseAnimation(); if (progressBox != null) showProgress(progressBox.getVisibility() == View.VISIBLE); }