diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index 509aed6..0287fc6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -41,7 +41,8 @@
             android:icon="@drawable/ic_adaptive_font_download"
             android:key="text_reading_options"
             android:persistent="false"
-            android:title="@string/accessibility_text_reading_options_title" />
+            android:title="@string/accessibility_text_reading_options_title"
+            settings:controller="com.android.settings.accessibility.TextReadingFragmentForA11ySettingsController"/>
 
         <Preference
             android:fragment="com.android.settings.accessibility.ColorAndMotionFragment"
diff --git a/res/xml/accessibility_settings_for_setup_wizard.xml b/res/xml/accessibility_settings_for_setup_wizard.xml
index a50e7dd..6929d54 100644
--- a/res/xml/accessibility_settings_for_setup_wizard.xml
+++ b/res/xml/accessibility_settings_for_setup_wizard.xml
@@ -26,7 +26,8 @@
         android:key="text_reading_options"
         android:persistent="false"
         android:title="@string/accessibility_text_reading_options_title"
-        settings:keywords="text_reading_options" />
+        settings:keywords="text_reading_options"
+        settings:controller="com.android.settings.accessibility.TextReadingFragmentForSuwController"/>
 
     <Preference
         android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentForSetupWizard"
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index 03d073b..2336c15 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -72,7 +72,8 @@
             android:fragment="com.android.settings.accessibility.TextReadingPreferenceFragment"
             android:key="text_reading_options"
             android:persistent="false"
-            android:title="@string/accessibility_text_reading_options_title" />
+            android:title="@string/accessibility_text_reading_options_title"
+            settings:controller="com.android.settings.accessibility.TextReadingFragmentForDisplaySettingsController"/>
     </PreferenceCategory>
 
     <PreferenceCategory
diff --git a/src/com/android/settings/accessibility/AccessibilityStatsLogUtils.java b/src/com/android/settings/accessibility/AccessibilityStatsLogUtils.java
index 434157d..d8a887d 100644
--- a/src/com/android/settings/accessibility/AccessibilityStatsLogUtils.java
+++ b/src/com/android/settings/accessibility/AccessibilityStatsLogUtils.java
@@ -16,6 +16,16 @@
 
 package com.android.settings.accessibility;
 
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.BOLD_TEXT_KEY;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.DISPLAY_SIZE_KEY;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.ACCESSIBILITY_SETTINGS;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.DISPLAY_SETTINGS;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.SUW_ANYTHING_ELSE;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.SUW_VISION_SETTINGS;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.FONT_SIZE_KEY;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.HIGH_TEXT_CONTRAST_KEY;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.RESET_KEY;
+
 import android.content.ComponentName;
 
 import com.android.settings.core.instrumentation.SettingsStatsLog;
@@ -58,4 +68,48 @@
                                 .ACCESSIBILITY_PRIVACY_WARNING_STATUS_SERVICE_DISABLED,
                         durationMills);
     }
+
+    /**
+     * Converts to the key name for logging.
+     *
+     * @param prefKey the preference key
+     * @return the int value which maps to the key name
+     */
+    static int convertToItemKeyName(String prefKey) {
+        switch (prefKey) {
+            case FONT_SIZE_KEY:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_FONT_SIZE;
+            case DISPLAY_SIZE_KEY:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_DISPLAY_SIZE;
+            case BOLD_TEXT_KEY:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_BOLD_TEXT;
+            case HIGH_TEXT_CONTRAST_KEY:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_HIGH_CONTRAST_TEXT;
+            case RESET_KEY:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_RESET;
+            default:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__NAME__TEXT_READING_UNKNOWN_ITEM;
+        }
+    }
+
+    /**
+     * Converts to the entry point for logging.
+     *
+     * @param entryPoint the entry point
+     * @return the int value which maps to the entry point
+     */
+    static int convertToEntryPoint(int entryPoint) {
+        switch (entryPoint) {
+            case SUW_VISION_SETTINGS:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__ENTRY_POINT__TEXT_READING_SUW_VISION_SETTINGS;
+            case SUW_ANYTHING_ELSE:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__ENTRY_POINT__TEXT_READING_SUW_ANYTHING_ELSE;
+            case DISPLAY_SETTINGS:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__ENTRY_POINT__TEXT_READING_DISPLAY_SETTINGS;
+            case ACCESSIBILITY_SETTINGS:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__ENTRY_POINT__TEXT_READING_ACCESSIBILITY_SETTINGS;
+            default:
+                return SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED__ENTRY_POINT__TEXT_READING_UNKNOWN_ENTRY;
+        }
+    }
 }
diff --git a/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceController.java b/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceController.java
index e3c1b9e..923e880 100644
--- a/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceController.java
+++ b/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceController.java
@@ -21,7 +21,9 @@
 import android.provider.Settings;
 
 import com.android.settings.R;
+import com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint;
 import com.android.settings.core.TogglePreferenceController;
+import com.android.settings.core.instrumentation.SettingsStatsLog;
 
 /** PreferenceController for displaying all text in bold. */
 public class FontWeightAdjustmentPreferenceController extends TogglePreferenceController implements
@@ -29,6 +31,9 @@
     static final int BOLD_TEXT_ADJUSTMENT =
             FontStyle.FONT_WEIGHT_BOLD - FontStyle.FONT_WEIGHT_NORMAL;
 
+    @EntryPoint
+    private int mEntryPoint;
+
     public FontWeightAdjustmentPreferenceController(Context context, String preferenceKey) {
         super(context, preferenceKey);
     }
@@ -46,6 +51,12 @@
 
     @Override
     public boolean setChecked(boolean isChecked) {
+        SettingsStatsLog.write(
+                SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED,
+                AccessibilityStatsLogUtils.convertToItemKeyName(getPreferenceKey()),
+                isChecked ? 1 : 0,
+                AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
+
         return Settings.Secure.putInt(mContext.getContentResolver(),
                 Settings.Secure.FONT_WEIGHT_ADJUSTMENT, (isChecked ? BOLD_TEXT_ADJUSTMENT : 0));
     }
@@ -59,4 +70,13 @@
     public void resetState() {
         setChecked(false);
     }
+
+    /**
+     * The entry point is used for logging.
+     *
+     * @param entryPoint from which settings page
+     */
+    void setEntryPoint(@EntryPoint int entryPoint) {
+        mEntryPoint = entryPoint;
+    }
 }
diff --git a/src/com/android/settings/accessibility/HighTextContrastPreferenceController.java b/src/com/android/settings/accessibility/HighTextContrastPreferenceController.java
index 8c9d234..9f645f1 100644
--- a/src/com/android/settings/accessibility/HighTextContrastPreferenceController.java
+++ b/src/com/android/settings/accessibility/HighTextContrastPreferenceController.java
@@ -23,7 +23,9 @@
 import androidx.preference.SwitchPreference;
 
 import com.android.settings.R;
+import com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint;
 import com.android.settings.core.TogglePreferenceController;
+import com.android.settings.core.instrumentation.SettingsStatsLog;
 
 /**
  * PreferenceController for displaying all text in high contrast style.
@@ -32,6 +34,9 @@
         TextReadingResetController.ResetStateListener {
     private SwitchPreference mSwitchPreference;
 
+    @EntryPoint
+    private int mEntryPoint;
+
     public HighTextContrastPreferenceController(Context context, String preferenceKey) {
         super(context, preferenceKey);
     }
@@ -49,6 +54,12 @@
 
     @Override
     public boolean setChecked(boolean isChecked) {
+        SettingsStatsLog.write(
+                SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED,
+                AccessibilityStatsLogUtils.convertToItemKeyName(getPreferenceKey()),
+                isChecked ? 1 : 0,
+                AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
+
         return Settings.Secure.putInt(mContext.getContentResolver(),
                 Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, (isChecked ? 1 : 0));
     }
@@ -69,4 +80,13 @@
         setChecked(false);
         updateState(mSwitchPreference);
     }
+
+    /**
+     * The entry point is used for logging.
+     *
+     * @param entryPoint from which settings page
+     */
+    void setEntryPoint(@EntryPoint int entryPoint) {
+        mEntryPoint = entryPoint;
+    }
 }
diff --git a/src/com/android/settings/accessibility/PreviewSizeSeekBarController.java b/src/com/android/settings/accessibility/PreviewSizeSeekBarController.java
index c7dfd61..711eb0f 100644
--- a/src/com/android/settings/accessibility/PreviewSizeSeekBarController.java
+++ b/src/com/android/settings/accessibility/PreviewSizeSeekBarController.java
@@ -22,7 +22,9 @@
 import androidx.annotation.NonNull;
 import androidx.preference.PreferenceScreen;
 
+import com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint;
 import com.android.settings.core.BasePreferenceController;
+import com.android.settings.core.instrumentation.SettingsStatsLog;
 import com.android.settings.widget.LabeledSeekBarPreference;
 
 /**
@@ -36,6 +38,9 @@
     private ProgressInteractionListener mInteractionListener;
     private LabeledSeekBarPreference mSeekBarPreference;
 
+    @EntryPoint
+    private int mEntryPoint;
+
     private final SeekBar.OnSeekBarChangeListener mSeekBarChangeListener =
             new SeekBar.OnSeekBarChangeListener() {
                 @Override
@@ -45,6 +50,12 @@
                     if (!mSeekByTouch && mInteractionListener != null) {
                         mInteractionListener.onProgressChanged();
                     }
+
+                    SettingsStatsLog.write(
+                            SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED,
+                            AccessibilityStatsLogUtils.convertToItemKeyName(getPreferenceKey()),
+                            progress,
+                            AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
                 }
 
                 @Override
@@ -97,6 +108,15 @@
     }
 
     /**
+     * The entry point is used for logging.
+     *
+     * @param entryPoint from which settings page
+     */
+    void setEntryPoint(@EntryPoint int entryPoint) {
+        mEntryPoint = entryPoint;
+    }
+
+    /**
      * Interface for callbacks when users interact with the seek bar.
      */
     interface ProgressInteractionListener {
diff --git a/src/com/android/settings/accessibility/TextReadingFragmentBaseController.java b/src/com/android/settings/accessibility/TextReadingFragmentBaseController.java
new file mode 100644
index 0000000..f26ca96
--- /dev/null
+++ b/src/com/android/settings/accessibility/TextReadingFragmentBaseController.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EXTRA_LAUNCHED_FROM;
+
+import android.content.Context;
+import android.os.Bundle;
+
+import androidx.preference.Preference;
+
+import com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint;
+import com.android.settings.core.BasePreferenceController;
+
+/**
+ * The base controller for the fragment{@link TextReadingPreferenceFragment}.
+ */
+public class TextReadingFragmentBaseController extends BasePreferenceController {
+    @EntryPoint
+    private int mEntryPoint;
+
+    private TextReadingFragmentBaseController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+    }
+
+    TextReadingFragmentBaseController(Context context, String preferenceKey,
+            @EntryPoint int entryPoint) {
+        this(context, preferenceKey);
+        mEntryPoint = entryPoint;
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+
+    @Override
+    public boolean handlePreferenceTreeClick(Preference preference) {
+        if (getPreferenceKey().equals(preference.getKey())) {
+            final Bundle extras = preference.getExtras();
+            extras.putInt(EXTRA_LAUNCHED_FROM, mEntryPoint);
+        }
+
+        return super.handlePreferenceTreeClick(preference);
+    }
+}
diff --git a/src/com/android/settings/accessibility/TextReadingFragmentForA11ySettingsController.java b/src/com/android/settings/accessibility/TextReadingFragmentForA11ySettingsController.java
new file mode 100644
index 0000000..434877c
--- /dev/null
+++ b/src/com/android/settings/accessibility/TextReadingFragmentForA11ySettingsController.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.ACCESSIBILITY_SETTINGS;
+
+import android.content.Context;
+
+/**
+ * The controller for the {@link TextReadingPreferenceFragment} from the accessibility settings.
+ */
+public class TextReadingFragmentForA11ySettingsController extends
+        TextReadingFragmentBaseController {
+    public TextReadingFragmentForA11ySettingsController(Context context, String preferenceKey) {
+        // Pass the fixed entry point to the parent controller for logging.
+        super(context, preferenceKey, ACCESSIBILITY_SETTINGS);
+    }
+}
diff --git a/src/com/android/settings/accessibility/TextReadingFragmentForDisplaySettingsController.java b/src/com/android/settings/accessibility/TextReadingFragmentForDisplaySettingsController.java
new file mode 100644
index 0000000..4d603f9
--- /dev/null
+++ b/src/com/android/settings/accessibility/TextReadingFragmentForDisplaySettingsController.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.DISPLAY_SETTINGS;
+
+import android.content.Context;
+
+/**
+ * The controller for the {@link TextReadingPreferenceFragment} from the display settings.
+ */
+public class TextReadingFragmentForDisplaySettingsController extends
+        TextReadingFragmentBaseController {
+    public TextReadingFragmentForDisplaySettingsController(Context context, String preferenceKey) {
+        // Pass the fixed entry point to the parent controller for logging.
+        super(context, preferenceKey, DISPLAY_SETTINGS);
+    }
+}
diff --git a/src/com/android/settings/accessibility/TextReadingFragmentForSuwController.java b/src/com/android/settings/accessibility/TextReadingFragmentForSuwController.java
new file mode 100644
index 0000000..332d9c5
--- /dev/null
+++ b/src/com/android/settings/accessibility/TextReadingFragmentForSuwController.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.SUW_VISION_SETTINGS;
+
+import android.content.Context;
+
+/**
+ * The controller for the {@link TextReadingPreferenceFragment} during the SetupWizard.
+ */
+public class TextReadingFragmentForSuwController extends TextReadingFragmentBaseController {
+    public TextReadingFragmentForSuwController(Context context, String preferenceKey) {
+        // Pass the fixed entry point to the parent controller for logging.
+        super(context, preferenceKey, SUW_VISION_SETTINGS);
+    }
+}
diff --git a/src/com/android/settings/accessibility/TextReadingPreferenceFragment.java b/src/com/android/settings/accessibility/TextReadingPreferenceFragment.java
index a4ee961c..104be26 100644
--- a/src/com/android/settings/accessibility/TextReadingPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/TextReadingPreferenceFragment.java
@@ -22,9 +22,11 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.Intent;
 import android.os.Bundle;
 import android.widget.Toast;
 
+import androidx.annotation.IntDef;
 import androidx.appcompat.app.AlertDialog;
 
 import com.android.settings.R;
@@ -36,8 +38,11 @@
 
 import com.google.common.annotations.VisibleForTesting;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -46,15 +51,40 @@
  */
 @SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
 public class TextReadingPreferenceFragment extends DashboardFragment {
+    public static final String EXTRA_LAUNCHED_FROM = "launched_from";
     private static final String TAG = "TextReadingPreferenceFragment";
-    private static final String FONT_SIZE_KEY = "font_size";
-    private static final String DISPLAY_SIZE_KEY = "display_size";
+    private static final String CATEGORY_FOR_ANYTHING_ELSE =
+            "com.android.settings.suggested.category.DISPLAY_SETTINGS";
+    static final String FONT_SIZE_KEY = "font_size";
+    static final String DISPLAY_SIZE_KEY = "display_size";
+    static final String BOLD_TEXT_KEY = "toggle_force_bold_text";
+    static final String HIGH_TEXT_CONTRAST_KEY = "toggle_high_text_contrast_preference";
+    static final String RESET_KEY = "reset";
     private static final String PREVIEW_KEY = "preview";
-    private static final String RESET_KEY = "reset";
-    private static final String BOLD_TEXT_KEY = "toggle_force_bold_text";
-    private static final String HIGHT_TEXT_CONTRAST_KEY = "toggle_high_text_contrast_preference";
     private static final String NEED_RESET_SETTINGS = "need_reset_settings";
     private FontWeightAdjustmentPreferenceController mFontWeightAdjustmentController;
+    private int mEntryPoint = EntryPoint.UNKNOWN_ENTRY;
+
+    /**
+     * The entry point which launches the {@link TextReadingPreferenceFragment}.
+     *
+     * <p>This should only be used for logging.
+     */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef({
+            EntryPoint.UNKNOWN_ENTRY,
+            EntryPoint.SUW_VISION_SETTINGS,
+            EntryPoint.SUW_ANYTHING_ELSE,
+            EntryPoint.DISPLAY_SETTINGS,
+            EntryPoint.ACCESSIBILITY_SETTINGS,
+    })
+    @interface EntryPoint {
+        int UNKNOWN_ENTRY = 0;
+        int SUW_VISION_SETTINGS = 1;
+        int SUW_ANYTHING_ELSE = 2;
+        int DISPLAY_SETTINGS = 3;
+        int ACCESSIBILITY_SETTINGS = 4;
+    }
 
     @VisibleForTesting
     List<ResetStateListener> mResetStateListeners;
@@ -91,6 +121,8 @@
 
     @Override
     protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
+        updateEntryPoint();
+
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         final FontSizeData fontSizeData = new FontSizeData(context);
         final DisplaySizeData displaySizeData = createDisplaySizeData(context);
@@ -102,24 +134,29 @@
         final PreviewSizeSeekBarController fontSizeController = new PreviewSizeSeekBarController(
                 context, FONT_SIZE_KEY, fontSizeData);
         fontSizeController.setInteractionListener(previewController);
+        fontSizeController.setEntryPoint(mEntryPoint);
         controllers.add(fontSizeController);
 
         final PreviewSizeSeekBarController displaySizeController = new PreviewSizeSeekBarController(
                 context, DISPLAY_SIZE_KEY, displaySizeData);
         displaySizeController.setInteractionListener(previewController);
+        displaySizeController.setEntryPoint(mEntryPoint);
         controllers.add(displaySizeController);
 
         mFontWeightAdjustmentController =
                 new FontWeightAdjustmentPreferenceController(context, BOLD_TEXT_KEY);
+        mFontWeightAdjustmentController.setEntryPoint(mEntryPoint);
         controllers.add(mFontWeightAdjustmentController);
 
         final HighTextContrastPreferenceController highTextContrastController =
-                new HighTextContrastPreferenceController(context, HIGHT_TEXT_CONTRAST_KEY);
+                new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
+        highTextContrastController.setEntryPoint(mEntryPoint);
         controllers.add(highTextContrastController);
 
         final TextReadingResetController resetController =
                 new TextReadingResetController(context, RESET_KEY,
                         v -> showDialog(DialogEnums.DIALOG_RESET_SETTINGS));
+        resetController.setEntryPoint(mEntryPoint);
         controllers.add(resetController);
 
         return controllers;
@@ -162,6 +199,24 @@
         return new DisplaySizeData(context);
     }
 
+    private void updateEntryPoint() {
+        final Bundle bundle = getArguments();
+        if (bundle != null && bundle.containsKey(EXTRA_LAUNCHED_FROM)) {
+            mEntryPoint = bundle.getInt(EXTRA_LAUNCHED_FROM, EntryPoint.UNKNOWN_ENTRY);
+            return;
+        }
+
+        final Intent intent = getIntent();
+        if (intent == null) {
+            mEntryPoint = EntryPoint.UNKNOWN_ENTRY;
+            return;
+        }
+
+        final Set<String> categories = intent.getCategories();
+        mEntryPoint = categories != null && categories.contains(CATEGORY_FOR_ANYTHING_ELSE)
+                ? EntryPoint.SUW_ANYTHING_ELSE : EntryPoint.UNKNOWN_ENTRY;
+    }
+
     private void onPositiveButtonClicked(DialogInterface dialog, int which) {
         // To avoid showing the dialog again, probably the onDetach() of SettingsDialogFragment
         // was interrupted by unexpectedly recreating the activity.
diff --git a/src/com/android/settings/accessibility/TextReadingResetController.java b/src/com/android/settings/accessibility/TextReadingResetController.java
index 152ad5f..30a94c2 100644
--- a/src/com/android/settings/accessibility/TextReadingResetController.java
+++ b/src/com/android/settings/accessibility/TextReadingResetController.java
@@ -23,7 +23,9 @@
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.R;
+import com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint;
 import com.android.settings.core.BasePreferenceController;
+import com.android.settings.core.instrumentation.SettingsStatsLog;
 import com.android.settingslib.widget.LayoutPreference;
 
 /**
@@ -32,6 +34,9 @@
 class TextReadingResetController extends BasePreferenceController {
     private final View.OnClickListener mOnResetClickListener;
 
+    @EntryPoint
+    private int mEntryPoint;
+
     TextReadingResetController(Context context, String preferenceKey,
             @Nullable View.OnClickListener listener) {
         super(context, preferenceKey);
@@ -52,11 +57,26 @@
         view.setOnClickListener(v -> {
             if (mOnResetClickListener != null) {
                 mOnResetClickListener.onClick(v);
+
+                SettingsStatsLog.write(
+                        SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED,
+                        AccessibilityStatsLogUtils.convertToItemKeyName(getPreferenceKey()),
+                        /* reset */ -1,
+                        AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
             }
         });
     }
 
     /**
+     * The entry point is used for logging.
+     *
+     * @param entryPoint from which settings page
+     */
+    void setEntryPoint(@EntryPoint int entryPoint) {
+        mEntryPoint = entryPoint;
+    }
+
+    /**
      * Interface for resetting to default state.
      */
     interface ResetStateListener {
diff --git a/tests/robotests/src/com/android/settings/accessibility/TextReadingFragmentBaseControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/TextReadingFragmentBaseControllerTest.java
new file mode 100644
index 0000000..ad6a895
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/TextReadingFragmentBaseControllerTest.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EXTRA_LAUNCHED_FROM;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.ACCESSIBILITY_SETTINGS;
+import static com.android.settings.accessibility.TextReadingPreferenceFragment.EntryPoint.UNKNOWN_ENTRY;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.content.Context;
+
+import androidx.preference.Preference;
+import androidx.test.core.app.ApplicationProvider;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+
+/**
+ * Tests for {@link TextReadingFragmentBaseController}.
+ */
+@RunWith(RobolectricTestRunner.class)
+public class TextReadingFragmentBaseControllerTest {
+    private static final String FRAGMENT_PREF_KEY = "FRAGMENT_PREF_KEY";
+    private final Context mContext = ApplicationProvider.getApplicationContext();
+
+    @Test
+    public void handlePreferenceClick_getExtraWithA11ySettingsEntryPoint() {
+        final Preference a11ySettingsPreference = new Preference(mContext);
+        a11ySettingsPreference.setKey(FRAGMENT_PREF_KEY);
+        final TextReadingFragmentBaseController mA11ySettingsFragmentController =
+                new TextReadingFragmentBaseController(mContext, FRAGMENT_PREF_KEY,
+                        ACCESSIBILITY_SETTINGS);
+
+        mA11ySettingsFragmentController.handlePreferenceTreeClick(a11ySettingsPreference);
+
+        assertThat(a11ySettingsPreference.getExtras().getInt(EXTRA_LAUNCHED_FROM,
+                UNKNOWN_ENTRY)).isEqualTo(ACCESSIBILITY_SETTINGS);
+    }
+}
