Fix entrerprise strings replacement for Safety Center.

In ag/20641184, it looks like we changed the behavior to only replace
titles when in fact some strings were replacing the summary.

This causes some entries to have the summary as the title instead.

Bug: 283743216
Test: Manual
Change-Id: I7157fd04c32eebd89bdb825ccc3e8ef73c9075bf
This commit is contained in:
Elliot Sisteron
2023-08-01 14:31:55 +00:00
parent 363d4b26b4
commit 4688f3f642
5 changed files with 67 additions and 132 deletions

View File

@@ -737,7 +737,7 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
overrideKey, () -> getString(resource)));
}
protected void replaceEnterpriseStringSummary(
public void replaceEnterpriseStringSummary(
String preferenceKey, String overrideKey, int resource) {
Preference preference = findPreference(preferenceKey);
if (preference == null) {
@@ -750,7 +750,7 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
() -> getString(resource)));
}
protected void replaceEnterpriseStringTitle(
public void replaceEnterpriseStringTitle(
String preferenceKey, String overrideKey, int resource) {
Preference preference = findPreference(preferenceKey);
if (preference == null) {