Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ private enum Page { PREPARE, COPY }
// ADFA-5154: the APK is served over HTTP from the Get-app section on Page 1 (was a sub-screen).
private ApkServer apkServer;
private String apkFileName;
private LinearLayout sendAppEntry, sendAppView; // ADFA-5154: vestigial deep view, kept GONE

private ActivityResultLauncher<String> locationPerm;

Expand All @@ -104,11 +103,11 @@ private enum Page { PREPARE, COPY }
private boolean atFork = true;
private LinearLayout forkBox, tabsRow;
private TextView cloneHdr, subtitleView, backHeader;
private TextView stepTitle, skipApp, shareWifi;
private TextView stepTitle, shareWifi;
// ADFA-5154: Page 1 stacks two shared QR sections (Join ① + Get app ②); Page 2 is Copy.
private QrSection secJoin, secGetApp;
private TextView secJoinBadge, secJoinTitle; // Join title is mode-dependent; not part of QrSection
private LinearLayout page1, page2, hint, getAppBanner;
private LinearLayout page1, page2, getAppBanner;
// Receive side
private SyncStateViewModel syncVm;
private LinearLayout receiveBox, progressBox;
Expand Down Expand Up @@ -169,7 +168,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
// include root + the shared sec_* ids (ADFA-5157).
page1 = v.findViewById(R.id.k2go_clone_page1);
page2 = v.findViewById(R.id.k2go_clone_page2);
hint = v.findViewById(R.id.k2go_clone_hint);
getAppBanner = v.findViewById(R.id.k2go_clone_getapp_banner);
View joinRoot = v.findViewById(R.id.k2go_clone_sec_join);
View getAppRoot = v.findViewById(R.id.k2go_clone_sec_getapp);
Expand Down Expand Up @@ -251,9 +249,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
codetext = v.findViewById(R.id.k2go_clone_codetext);
copyBtn = v.findViewById(R.id.k2go_clone_copy);
shareBtn = v.findViewById(R.id.k2go_clone_share);
sendAppEntry = v.findViewById(R.id.k2go_sendapp_entry); // ADFA-5154: vestigial (deep view), kept GONE
sendAppView = v.findViewById(R.id.k2go_sendapp_view);
// ADFA-5154: the Get-app QR now lives inline on Page 1 (secGetApp); "Can't scan? Share another way"
// ADFA-5154: the Get-app QR lives inline on Page 1 (secGetApp); "Can't scan? Share another way"
// hands the installed APK to the Android share sheet.
v.findViewById(R.id.k2go_sendapp_share).setOnClickListener(x -> shareApkViaSheet());

Expand Down Expand Up @@ -310,7 +306,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
forkBox = v.findViewById(R.id.k2go_clone_fork);
tabsRow = v.findViewById(R.id.k2go_clone_tabs);
stepTitle = v.findViewById(R.id.k2go_clone_steptitle);
skipApp = v.findViewById(R.id.k2go_clone_skipapp); // ADFA-5154: vestigial, kept GONE
shareWifi = v.findViewById(R.id.k2go_clone_sharewifi);
shareWifi.setOnClickListener(x -> openWifiSettings());
v.findViewById(R.id.k2go_clone_fork_send).setOnClickListener(x -> enterSide(Side.SEND));
Expand Down Expand Up @@ -548,7 +543,7 @@ private void render() {
if (startingDots != null) startingDots.stop(); // ADFA-5154: only the daemon-starting state re-starts it
updateBackGuard(); // ADFA-5151: keep the Back confinement in step with side + transfer state
if (showcode != null) { showcode.setVisibility(View.GONE); codeblock.setVisibility(View.GONE); }
if (stepTitle != null) { stepTitle.setVisibility(View.GONE); skipApp.setVisibility(View.GONE); shareWifi.setVisibility(View.GONE); }
if (stepTitle != null) { stepTitle.setVisibility(View.GONE); shareWifi.setVisibility(View.GONE); }
paintTab(tabSend, side == Side.SEND);
paintTab(tabReceive, side == Side.RECEIVE);

Expand All @@ -566,8 +561,6 @@ private void render() {
actionFooter.setVisibility(View.GONE);
footer.setVisibility(View.GONE);
shareCard.setVisibility(View.GONE);
sendAppEntry.setVisibility(View.GONE);
sendAppView.setVisibility(View.GONE);
receiveBox.setVisibility(View.GONE);
return;
}
Expand All @@ -587,8 +580,6 @@ private void render() {
actionFooter.setVisibility(View.GONE);
footer.setVisibility(View.GONE);
shareCard.setVisibility(View.GONE);
sendAppEntry.setVisibility(View.GONE);
sendAppView.setVisibility(View.GONE);
receiveBox.setVisibility(View.VISIBLE);
renderReceive();
syncProtection();
Expand All @@ -600,8 +591,6 @@ private void render() {
return;
}
// ADFA-5154: Send is two pages. Common chrome, then the page.
sendAppView.setVisibility(View.GONE);
sendAppEntry.setVisibility(View.GONE);
actionFooter.setVisibility(View.GONE); // ADFA-5154: default hidden; only Copy's states re-show it
netRow.setVisibility(View.VISIBLE);
paintTab(tabHotspot, mode == Mode.HOTSPOT);
Expand Down Expand Up @@ -647,7 +636,6 @@ private void renderNoSystemSend() {
subCaption.setVisibility(View.GONE);
showcode.setVisibility(View.GONE); codeblock.setVisibility(View.GONE);
shareCard.setVisibility(View.GONE);
sendAppEntry.setVisibility(View.GONE); sendAppView.setVisibility(View.GONE);
advance.setVisibility(View.GONE);
actionFooter.setVisibility(View.VISIBLE);
stop.setText(getString(R.string.k2go_home_recover));
Expand Down
39 changes: 0 additions & 39 deletions controller/app/src/main/res/layout/fragment_k2go_clone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@
</LinearLayout>
</LinearLayout>

<!-- ADFA-4785: secondary entry to bootstrap a phone with no K2Go yet. -->
<LinearLayout android:id="@+id/k2go_sendapp_entry" android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginTop="14dp" android:padding="14dp"
android:background="@drawable/k2go_getmore_bg" android:clickable="true" android:focusable="true" android:visibility="gone">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/k2go_clone_other_no_app" android:textColor="@color/k2go_muted" android:textAppearance="?attr/textAppearanceBodySmall" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp"
android:text="@string/k2go_clone_send_app_first" android:textStyle="bold" android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceTitleMedium" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp"
android:text="@string/k2go_clone_app_separate_step" android:textColor="@color/k2go_muted" android:textAppearance="?attr/textAppearanceBodySmall" />
</LinearLayout>

<!-- 1·2·3 stepper for orientation (built by the fragment). -->
<LinearLayout android:id="@+id/k2go_clone_steps" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_gravity="center_horizontal" android:layout_marginTop="16dp" android:gravity="center_vertical" />
Expand All @@ -112,15 +100,6 @@
android:background="@drawable/k2go_getmore_bg" android:textColor="@color/k2go_teal"
android:textAppearance="?attr/textAppearanceTitleMedium" android:clickable="true" android:focusable="true" android:visibility="gone" />

<!-- "STEP 2 BELOW ⌄" hint (passive cue; the fragment shows it once ① is live). -->
<LinearLayout android:id="@+id/k2go_clone_hint" android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:gravity="center" android:layout_marginTop="16dp" android:visibility="gone">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/k2go_connect_step2_below" android:textAppearance="?attr/textAppearanceLabelMedium" android:textColor="@color/k2go_teal" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="⌄" android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceTitleMedium" />
</LinearLayout>

<!-- Section ② Get the app -->
<include android:id="@+id/k2go_clone_sec_getapp" layout="@layout/view_k2go_qr_section"
android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" />
Expand Down Expand Up @@ -220,24 +199,6 @@
android:layout_marginTop="16dp" android:padding="16dp" android:gravity="center" android:textAppearance="?attr/textAppearanceTitleLarge"
android:clickable="true" android:focusable="true" android:visibility="gone" />

<TextView android:id="@+id/k2go_clone_skipapp" android:layout_width="match_parent" android:layout_height="wrap_content"
android:gravity="end" android:layout_marginTop="8dp" android:padding="6dp" android:textStyle="bold" android:textColor="@color/k2go_teal"
android:textAppearance="?attr/textAppearanceTitleMedium" android:clickable="true" android:focusable="true" android:visibility="gone" />

<!-- ADFA-4785: "Send the app" sub-screen kept for the deep APK-serve view (back + QR + share). -->
<LinearLayout android:id="@+id/k2go_sendapp_view" android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginTop="8dp" android:visibility="gone">
<TextView android:id="@+id/k2go_sendapp_back" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:text="@string/k2go_back_link" android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceBodyLarge" android:clickable="true" android:focusable="true" />
<ImageView android:id="@+id/k2go_sendapp_qr" android:layout_width="220dp" android:layout_height="220dp"
android:layout_gravity="center_horizontal" android:layout_marginTop="16dp" android:padding="10dp"
android:background="@drawable/k2go_card_bg" android:contentDescription="Send the app" />
<TextView android:id="@+id/k2go_sendapp_next" android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:padding="16dp" android:gravity="center" android:text="@string/k2go_clone_installed_copy"
android:background="@drawable/k2go_primary_bg" android:textColor="@color/k2go_on_teal"
android:textAppearance="?attr/textAppearanceTitleLarge" android:clickable="true" android:focusable="true" />
</LinearLayout>

<LinearLayout android:id="@+id/k2go_clone_receive_box" android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginTop="16dp" android:visibility="gone">

Expand Down
3 changes: 0 additions & 3 deletions controller/app/src/main/res/values-ar/strings_k2go.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,13 @@
<string name="k2go_clone_nothing_to_replace">لا يوجد ما يُستبدل</string>
<string name="k2go_clone_once_installed">بمجرد تثبيته، عُد وانسخ المكتبة.</string>
<string name="k2go_clone_one_android_step">خطوة واحدة في Android</string>
<string name="k2go_clone_other_no_app">الهاتف الآخر لا يحتوي على K2Go بعد؟</string>
<string name="k2go_clone_receive_from">الاستلام من هاتف آخر ›</string>
<string name="k2go_clone_sharing_now">جارٍ المشاركة الآن</string>
<string name="k2go_clone_scan_enter_text">لم ينجح المسح؟ أدخل الرمز كنص ▸</string>
<string name="k2go_clone_scan_show_text">لم ينجح المسح؟ أظهر الرمز كنص ▸</string>
<string name="k2go_clone_scan_their_codes">امسح رموزهم للحصول على نسخة هنا.</string>
<string name="k2go_clone_scan_get_app">امسح للحصول على التطبيق</string>
<string name="k2go_clone_scan_to_join">امسح للانضمام</string>
<string name="k2go_clone_send_app_first">أرسل التطبيق أولًا ›</string>
<string name="k2go_clone_send_to">أرسل إلى هاتف آخر ›</string>
<string name="k2go_clone_sending_whole">جارٍ إرسال مكتبتك بالكامل</string>
<string name="k2go_clone_share_wifi_settings">شارك Wi-Fi عبر إعدادات Android</string>
Expand All @@ -254,7 +252,6 @@
<string name="k2go_clone_sizes_estimates">الأحجام تقديرية.</string>
<string name="k2go_lbl_system">النظام</string>
<string name="k2go_clone_technical_details">تفاصيل تقنية ▾</string>
<string name="k2go_clone_app_separate_step">أولًا، يُثبَّت تطبيق K2Go. ستنسخ المكتبة في خطوة لاحقة.</string>
<string name="k2go_clone_other_downloads">ينزّل الهاتف الآخر K2Go من هذا الرمز.</string>
<string name="k2go_clone_allow_install_note">ينقر الهاتف الآخر على \"السماح بالتثبيت من هذا المصدر\" — خطوة تُجرى مرة واحدة.</string>
<string name="k2go_clone_incompat_title">هذان الهاتفان غير متوافقين</string>
Expand Down
3 changes: 0 additions & 3 deletions controller/app/src/main/res/values-az/strings_k2go.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,13 @@
<string name="k2go_clone_nothing_to_replace">Əvəz ediləcək heç nə yoxdur</string>
<string name="k2go_clone_once_installed">Quraşdırıldıqdan sonra qayıdın və kitabxananı köçürün.</string>
<string name="k2go_clone_one_android_step">Bir Android addımı</string>
<string name="k2go_clone_other_no_app">Digər telefonda hələ K2Go yoxdur?</string>
<string name="k2go_clone_receive_from">Başqa telefondan al ›</string>
<string name="k2go_clone_sharing_now">İNDİ PAYLAŞILIR</string>
<string name="k2go_clone_scan_enter_text">Skan alınmadı? Kodu mətn kimi daxil edin ▸</string>
<string name="k2go_clone_scan_show_text">Skan alınmadı? Kodu mətn kimi göstərin ▸</string>
<string name="k2go_clone_scan_their_codes">Burada surət almaq üçün onların kodlarını skan edin.</string>
<string name="k2go_clone_scan_get_app">Tətbiqi almaq üçün skan et</string>
<string name="k2go_clone_scan_to_join">Qoşulmaq üçün skan et</string>
<string name="k2go_clone_send_app_first">Əvvəlcə tətbiqi göndər ›</string>
<string name="k2go_clone_send_to">Başqa telefona göndər ›</string>
<string name="k2go_clone_sending_whole">Bütün kitabxananız göndərilir</string>
<string name="k2go_clone_share_wifi_settings">Android ayarları vasitəsilə Wi-Fi paylaş</string>
Expand All @@ -254,7 +252,6 @@
<string name="k2go_clone_sizes_estimates">Ölçülər təxminidir.</string>
<string name="k2go_lbl_system">Sistem</string>
<string name="k2go_clone_technical_details">Texniki detallar ▾</string>
<string name="k2go_clone_app_separate_step">Əvvəlcə K2Go tətbiqi quraşdırılır. Kitabxananı sonrakı addımda köçürəcəksiniz.</string>
<string name="k2go_clone_other_downloads">Digər telefon K2Go-nu bu koddan yükləyir.</string>
<string name="k2go_clone_allow_install_note">Digər telefon "bu mənbədən quraşdırmağa icazə ver" seçiminə toxunur — birdəfəlik addımdır.</string>
<string name="k2go_clone_incompat_title">Bu telefonlar uyğun deyil</string>
Expand Down
3 changes: 0 additions & 3 deletions controller/app/src/main/res/values-bg/strings_k2go.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,13 @@
<string name="k2go_clone_nothing_to_replace">Няма какво да се замени</string>
<string name="k2go_clone_once_installed">След като бъде инсталирано, върнете се и копирайте библиотеката.</string>
<string name="k2go_clone_one_android_step">Една стъпка в Android</string>
<string name="k2go_clone_other_no_app">Другият телефон още няма K2Go?</string>
<string name="k2go_clone_receive_from">Получаване от друг телефон ›</string>
<string name="k2go_clone_sharing_now">СПОДЕЛЯНЕ В МОМЕНТА</string>
<string name="k2go_clone_scan_enter_text">Сканирането не сработи? Въведете кода като текст ▸</string>
<string name="k2go_clone_scan_show_text">Сканирането не сработи? Покажете кода като текст ▸</string>
<string name="k2go_clone_scan_their_codes">Сканирайте техните кодове, за да получите копие тук.</string>
<string name="k2go_clone_scan_get_app">Сканирайте, за да получите приложението</string>
<string name="k2go_clone_scan_to_join">Сканирайте, за да се свържете</string>
<string name="k2go_clone_send_app_first">Първо изпратете приложението ›</string>
<string name="k2go_clone_send_to">Изпращане към друг телефон ›</string>
<string name="k2go_clone_sending_whole">Изпращане на цялата ви библиотека</string>
<string name="k2go_clone_share_wifi_settings">Споделяне на Wi-Fi чрез настройките на Android</string>
Expand All @@ -254,7 +252,6 @@
<string name="k2go_clone_sizes_estimates">Размерите са приблизителни.</string>
<string name="k2go_lbl_system">Система</string>
<string name="k2go_clone_technical_details">Технически детайли ▾</string>
<string name="k2go_clone_app_separate_step">Първо се инсталира приложението K2Go. Ще копирате библиотеката на по-късна стъпка.</string>
<string name="k2go_clone_other_downloads">Другият телефон изтегля K2Go от този код.</string>
<string name="k2go_clone_allow_install_note">Другият телефон докосва "разреши инсталиране от този източник" — еднократна стъпка.</string>
<string name="k2go_clone_incompat_title">Тези телефони не са съвместими</string>
Expand Down
Loading
Loading