Merge "[Satellilte] Remove dynamic string of messaging and connectivity" into main

This commit is contained in:
Treehugger Robot
2025-03-17 06:05:57 -07:00
committed by Android (Google) Code Review
4 changed files with 10 additions and 50 deletions

View File

@@ -3695,10 +3695,6 @@
<!-- Summary for when to automatically show hub mode (widgets on lockscreen): docked [CHAR LIMIT=100] --> <!-- Summary for when to automatically show hub mode (widgets on lockscreen): docked [CHAR LIMIT=100] -->
<string name="when_to_show_hubmode_docked">While docked</string> <string name="when_to_show_hubmode_docked">While docked</string>
<!-- _satellite_setting_preference_layout -->
<!-- _satellite_setting_preference_layout screen title-->
<string name="satellite_setting">Satellite messaging</string>
<!-- APN Settings --> <!-- APN Settings -->
<!-- APN settings screen title --> <!-- APN settings screen title -->
<string name="apn_settings">APNs</string> <string name="apn_settings">APNs</string>
@@ -12687,8 +12683,10 @@ Data usage charges may apply.</string>
<!-- Summary to show the current network mode is invalid. [CHAR LIMIT=NONE]--> <!-- Summary to show the current network mode is invalid. [CHAR LIMIT=NONE]-->
<string name="mobile_network_mode_error">Invalid Network Mode <xliff:g id="networkModeId" example="0">%1$d</xliff:g>. Ignore.</string> <string name="mobile_network_mode_error">Invalid Network Mode <xliff:g id="networkModeId" example="0">%1$d</xliff:g>. Ignore.</string>
<!-- Title for satellite setting preference in mobile network settings [CHAR LIMIT=60] -->
<string name="satellite_setting_title">Satellite messaging</string> <!-- _satellite_setting_preference_layout -->
<!-- _satellite_setting_preference_layout screen title-->
<string name="satellite_setting">Satellite connectivity</string>
<!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]--> <!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]-->
<string name="satellite_setting_enabled_summary">Send and receive text messages by satellite. Included with your account.</string> <string name="satellite_setting_enabled_summary">Send and receive text messages by satellite. Included with your account.</string>
<!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]--> <!-- Summary for satellite setting preference. [CHAR LIMIT=NONE]-->
@@ -12731,14 +12729,14 @@ Data usage charges may apply.</string>
<string name="satellite_setting_summary_more_information">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string> <string name="satellite_setting_summary_more_information">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string>
<!-- learn more text - more about satellite messaging without emergency messaging support. [CHAR_LIMIT=NONE] --> <!-- learn more text - more about satellite messaging without emergency messaging support. [CHAR_LIMIT=NONE] -->
<string name="satellite_setting_summary_more_information_no_emergency_messaging">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect. Texting with emergency services may not be available in all areas.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string> <string name="satellite_setting_summary_more_information_no_emergency_messaging">A satellite connection may be slower and is available only in some areas. Weather and certain structures may affect the connection. Calling by satellite isn\u2019t available. Emergency calls may still connect. Texting with emergency services may not be available in all areas.\n\nIt may take some time for account changes to show in Settings. Contact <xliff:g id="carrier_name" example="T-Mobile">%1$s</xliff:g> for details.</string>
<!-- more about satellite messaging [CHAR_LIMIT=NONE] --> <!-- more about satellite connectivity [CHAR_LIMIT=NONE] -->
<string name="more_about_satellite_messaging">More about <xliff:g id="subject" example="satellite messaging">%1$s</xliff:g></string> <string name="more_about_satellite_messaging">More about satellite connectivity</string>
<!-- Title for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] --> <!-- Title for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] -->
<string name="satellite_warning_dialog_title">Cant turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g></string> <string name="satellite_warning_dialog_title">Cant turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g></string>
<!-- Content for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] --> <!-- Content for satellite warning dialog to avoid user using wifi/bluetooth/airplane mode [CHAR_LIMIT=NONE] -->
<string name="satellite_warning_dialog_content">To turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g>, first end the satellite connection</string> <string name="satellite_warning_dialog_content">To turn on <xliff:g id="function" example="bluetooth">%1$s</xliff:g>, first end the satellite connection</string>
<!-- Category title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] --> <!-- Category title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] -->
<string name="category_title_satellite_connectivity">Satellite connectivity</string> <string name="category_title_satellite_connectivity">Satellite</string>
<!-- Title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] --> <!-- Title for satellite functions with data transmission in mobile network settings [CHAR LIMIT=60] -->
<string name="title_satellite_setting_connectivity">Satellite connectivity</string> <string name="title_satellite_setting_connectivity">Satellite connectivity</string>
<!-- Description of satellite function with data transmission [CHAR LIMIT=60] --> <!-- Description of satellite function with data transmission [CHAR LIMIT=60] -->

View File

@@ -210,7 +210,7 @@
<com.android.settingslib.RestrictedPreference <com.android.settingslib.RestrictedPreference
android:key="telephony_satellite_setting_key" android:key="telephony_satellite_setting_key"
android:persistent="false" android:persistent="false"
android:title="@string/satellite_setting_title" android:title="@string/title_satellite_setting_connectivity"
settings:keywords="@string/keywords_satellite_setting" settings:keywords="@string/keywords_satellite_setting"
settings:controller= settings:controller=
"com.android.settings.network.telephony.satellite.SatelliteSettingPreferenceController"/> "com.android.settings.network.telephony.satellite.SatelliteSettingPreferenceController"/>

View File

@@ -133,7 +133,6 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
boolean isSatelliteEligible = isSatelliteEligible(); boolean isSatelliteEligible = isSatelliteEligible();
updateTitle();
updateMobilePlan(isSatelliteEligible); updateMobilePlan(isSatelliteEligible);
updateHowItWorksContent(isSatelliteEligible); updateHowItWorksContent(isSatelliteEligible);
updateFooterContent(); updateFooterContent();
@@ -149,10 +148,6 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
return R.xml.satellite_setting; return R.xml.satellite_setting;
} }
private void updateTitle() {
findPreference("satellite_setting").setTitle(getSubjectString());
}
private void updateMobilePlan(boolean isSatelliteEligible) { private void updateMobilePlan(boolean isSatelliteEligible) {
PreferenceCategory prefCategory = findPreference(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN); PreferenceCategory prefCategory = findPreference(PREF_KEY_CATEGORY_YOUR_SATELLITE_PLAN);
if (prefCategory == null || !mConfigBundle.getBoolean( if (prefCategory == null || !mConfigBundle.getBoolean(
@@ -238,7 +233,7 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
final String[] link = new String[1]; final String[] link = new String[1];
link[0] = readSatelliteMoreInfoString(); link[0] = readSatelliteMoreInfoString();
if (link[0] != null && !link[0].isEmpty()) { if (true) {
footerPreference.setLearnMoreAction(view -> { footerPreference.setLearnMoreAction(view -> {
if (!link[0].isEmpty()) { if (!link[0].isEmpty()) {
Intent helpIntent = HelpUtils.getHelpIntent(mActivity, link[0], Intent helpIntent = HelpUtils.getHelpIntent(mActivity, link[0],
@@ -250,7 +245,7 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
}); });
footerPreference.setLearnMoreText( 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); 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) { private static void loge(String message) {
Log.e(TAG, message); Log.e(TAG, message);
} }

View File

@@ -145,7 +145,6 @@ public class SatelliteSettingPreferenceController extends
public void updateState(@Nullable Preference preference) { public void updateState(@Nullable Preference preference) {
super.updateState(preference); super.updateState(preference);
if (preference != null && preference.getKey().equals(getPreferenceKey())) { if (preference != null && preference.getKey().equals(getPreferenceKey())) {
updateTitle(preference);
updateSummary(preference); updateSummary(preference);
} }
} }
@@ -170,12 +169,6 @@ public class SatelliteSettingPreferenceController extends
return false; 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) { private void updateSummary(Preference preference) {
if (preference == null) { if (preference == null) {
logd("updateSummary - no Preference"); logd("updateSummary - no Preference");