Adds a summary to the (screen) Magnification preference for the main A11y Settings page.

This helps differentiate this from other magnification tools.

Reuses (and slightly modifies) the `magnification_feature_summary`
string which was not used by any existing code. This helps ensure
the existing localizations should be close enough, until L10n
translators have time to update based on the new shorter version.

Bug: 303499185
Test: ToggleScreenMagnificationPreferenceFragmentTest
Test: Open Settings > Accessibility, observe summary
Change-Id: If5ee4f937bbd655b425d4767ad8bbcef08dbe345
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 71a7b30..25c6e59 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4609,7 +4609,7 @@
     <string name="accessibility_screen_magnification_navbar_short_summary">Tap a button to zoom</string>
     <!-- Intro for the accessibility preference screen to enable screen magnification gestures. [CHAR LIMIT=none] -->
     <string name="accessibility_screen_magnification_intro_text">Quickly zoom in on the screen to make content larger</string>
-    <!-- Summary for the accessibility preference screen to enable screen magnification gestures. [CHAR LIMIT=none] -->
+    <!-- Instructions on the accessibility preference screen teaching the user how to enable screen magnification gestures. [CHAR LIMIT=none] -->
     <string name="accessibility_screen_magnification_summary">
         <![CDATA[
         <b>To zoom in:</b><br/>
@@ -12562,8 +12562,8 @@
     <string name="color_inversion_state_off">Off</string>
     <!-- The color inversion feature summary displayed as a subtext as an item in a list. -->
     <string name="color_inversion_feature_summary">Turns light screens dark and dark screens light</string>
-    <!-- Short summary explains what magnification feature is. -->
-    <string name="magnification_feature_summary">Quickly zoom in on the screen to make content larger</string>
+    <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=none] -->
+    <string name="magnification_feature_summary">Zoom in on the screen</string>
     <!-- Summary of the AutoClick feature disabled state. -->
     <string name="autoclick_disabled">Off</string>
     <!-- Summary of the show captions preference disabled state. -->
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 886719d..9f6eec3 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -840,9 +840,13 @@
      */
     public static CharSequence getServiceSummary(Context context) {
         // Get the user shortcut type from settings provider.
-        final int uerShortcutType = getUserShortcutTypeFromSettings(context);
-        return (uerShortcutType != AccessibilityUtil.UserShortcutType.EMPTY)
+        final int userShortcutType = getUserShortcutTypeFromSettings(context);
+        final CharSequence featureState =
+                (userShortcutType != AccessibilityUtil.UserShortcutType.EMPTY)
                 ? context.getText(R.string.accessibility_summary_shortcut_enabled)
                 : context.getText(R.string.generic_accessibility_feature_shortcut_off);
+        final CharSequence featureSummary = context.getText(R.string.magnification_feature_summary);
+        return context.getString(R.string.preference_summary_default_combination,
+                featureState, featureSummary);
     }
 }
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
index e5ac793..05dc8fa 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
@@ -629,7 +629,9 @@
         assertThat(
                 ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
                 .isEqualTo(
-                        mContext.getString(R.string.accessibility_summary_shortcut_enabled));
+                        mContext.getString(R.string.preference_summary_default_combination,
+                                mContext.getText(R.string.accessibility_summary_shortcut_enabled),
+                                mContext.getText(R.string.magnification_feature_summary)));
     }
 
     @Test
@@ -639,7 +641,10 @@
         assertThat(
                 ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
                 .isEqualTo(
-                        mContext.getString(R.string.generic_accessibility_feature_shortcut_off));
+                        mContext.getString(R.string.preference_summary_default_combination,
+                                mContext.getText(
+                                        R.string.generic_accessibility_feature_shortcut_off),
+                                mContext.getText(R.string.magnification_feature_summary)));
     }
 
     @Test
@@ -650,7 +655,10 @@
 
         assertThat(
                 ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
-                .isEqualTo(mContext.getString(R.string.accessibility_summary_shortcut_enabled));
+                .isEqualTo(
+                        mContext.getString(R.string.preference_summary_default_combination,
+                                mContext.getText(R.string.accessibility_summary_shortcut_enabled),
+                                mContext.getText(R.string.magnification_feature_summary)));
     }
 
     @Test
@@ -662,7 +670,10 @@
         assertThat(
                 ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
                 .isEqualTo(
-                        mContext.getString(R.string.generic_accessibility_feature_shortcut_off));
+                        mContext.getString(R.string.preference_summary_default_combination,
+                                mContext.getText(
+                                        R.string.generic_accessibility_feature_shortcut_off),
+                                mContext.getText(R.string.magnification_feature_summary)));
     }
 
     private void putStringIntoSettings(String key, String componentName) {