[Satellilte] Remove dynamic string of messaging and connectivity

Flag: EXEMPT bug fix
Bug: b/401648126
Test: Manual test.
Change-Id: I3ec28cfa2a05b421f19918414af8e75c5c0b224e
This commit is contained in:
tom hsu
2025-03-17 09:45:26 +00:00
parent 998eea6957
commit 006007446b
4 changed files with 10 additions and 50 deletions

View File

@@ -133,7 +133,6 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
boolean isSatelliteEligible = isSatelliteEligible();
updateTitle();
updateMobilePlan(isSatelliteEligible);
updateHowItWorksContent(isSatelliteEligible);
updateFooterContent();
@@ -149,10 +148,6 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
return R.xml.satellite_setting;
}
private void updateTitle() {
findPreference("satellite_setting").setTitle(getSubjectString());
}
private void updateMobilePlan(boolean isSatelliteEligible) {
PreferenceCategory prefCategory = findPreference(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
if (prefCategory == null || !mConfigBundle.getBoolean(
@@ -238,7 +233,7 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
final String[] link = new String[1];
link[0] = readSatelliteMoreInfoString();
if (link[0] != null && !link[0].isEmpty()) {
if (true) {
footerPreference.setLearnMoreAction(view -> {
if (!link[0].isEmpty()) {
Intent helpIntent = HelpUtils.getHelpIntent(mActivity, link[0],
@@ -250,7 +245,7 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
});
footerPreference.setLearnMoreText(
getString(R.string.more_about_satellite_messaging, getDescriptionString()));
getString(R.string.more_about_satellite_messaging));
}
}
}
@@ -304,32 +299,6 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
return mConfigBundle.getBoolean(KEY_SATELLITE_ATTACH_SUPPORTED_BOOL, false);
}
// This is for a word which first letter is uppercase. e.g. Satellite messaging.
private String getSubjectString() {
int result;
if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
result = mIsServiceDataType
? R.string.title_satellite_setting_connectivity
: R.string.satellite_setting_title;
} else {
result = R.string.satellite_setting_title;
}
return getString(result);
}
// This is for a word without uppercase letter. e.g. satellite messaging.
private String getDescriptionString() {
int result;
if (com.android.settings.flags.Flags.satelliteOemSettingsUxMigration()) {
result = mIsServiceDataType
? R.string.description_satellite_setting_connectivity
: R.string.description_satellite_setting_messaging;
} else {
result = R.string.satellite_setting_title;
}
return getString(result);
}
private static void loge(String message) {
Log.e(TAG, message);
}

View File

@@ -145,7 +145,6 @@ public class SatelliteSettingPreferenceController extends
public void updateState(@Nullable Preference preference) {
super.updateState(preference);
if (preference != null && preference.getKey().equals(getPreferenceKey())) {
updateTitle(preference);
updateSummary(preference);
}
}
@@ -170,12 +169,6 @@ public class SatelliteSettingPreferenceController extends
return false;
}
private void updateTitle(Preference preference) {
preference.setTitle(mCarrierRoamingNtnModeCallback.isSatelliteServiceDataType()
? R.string.title_satellite_setting_connectivity
: R.string.satellite_setting_title);
}
private void updateSummary(Preference preference) {
if (preference == null) {
logd("updateSummary - no Preference");