Fix Settings/Storage "Format USB drive" title string

Historically, this activity fragment had a "Format SD card for portable
storage" title string and the body text linked to
https://support.google.com/android/answer/12153449 which discusses
portable versus internal storage for SD cards.

For desktop Android, it is increasingly common to insert USB drives
instead of SD cards and the "portable versus internal" user decision is
less relevant here. This commit drops that link when not formatting an
SD card.

It also affects the title string, selecting between "Format SD card for
portable storage" and "Format USB drive". Some StorageWizardFoo activity
fragments' strings already made the SD card / USB drive distinction.
This commit makes it a little more consistent.

Bug: 373737145
Flag: EXEMPT minor fix
Test: manual
Change-Id: I3cf4b192e30566d5acb722b1d45cf14c5041706c
This commit is contained in:
Nigel Tao
2025-01-30 10:40:23 +11:00
parent ec58402c03
commit 7d5c3dc764
2 changed files with 18 additions and 8 deletions

View File

@@ -76,8 +76,11 @@ public class StorageWizardInit extends StorageWizardBase {
}
if(mPortable) {
mFlipper.setDisplayedChild(0);
setHeaderText(R.string.storage_wizard_init_v2_external_title,
getDiskShortDescription());
setHeaderText(
((mDisk != null) && mDisk.isSd())
? R.string.storage_wizard_init_v2_external_title
: R.string.storage_wizard_format_confirm_v2_action,
getDiskShortDescription());
setNextButtonText(R.string.storage_wizard_init_v2_external_action);
setBackButtonText(R.string.wizard_back_adoptable);
setNextButtonVisibility(View.VISIBLE);
@@ -104,8 +107,11 @@ public class StorageWizardInit extends StorageWizardBase {
v.setEnabled(false);
} else if (mPortable == false) {
mFlipper.showNext();
setHeaderText(R.string.storage_wizard_init_v2_external_title,
getDiskShortDescription());
setHeaderText(
((mDisk != null) && mDisk.isSd())
? R.string.storage_wizard_init_v2_external_title
: R.string.storage_wizard_format_confirm_v2_action,
getDiskShortDescription());
setNextButtonText(R.string.storage_wizard_init_v2_external_action);
setBackButtonText(R.string.wizard_back_adoptable);
setBackButtonVisibility(View.VISIBLE);
@@ -151,8 +157,10 @@ public class StorageWizardInit extends StorageWizardBase {
private void setupHyperlink() {
TextView external_storage_textview = findViewById(R.id.storage_wizard_init_external_text);
TextView internal_storage_textview = findViewById(R.id.storage_wizard_init_internal_text);
String external_storage_text = getResources().getString(R.string.
storage_wizard_init_v2_external_summary);
String external_storage_text = getResources().getString(
((mDisk != null) && mDisk.isSd())
? R.string.storage_wizard_init_v2_external_summary
: R.string.storage_wizard_init_v2_external_summary_non_sd_card);
String internal_storage_text = getResources().getString(R.string.
storage_wizard_init_v2_internal_summary);
@@ -193,4 +201,4 @@ public class StorageWizardInit extends StorageWizardBase {
|| event.getY() > v.getMeasuredHeight());
}
};
}
}