Logging for the feature "Text and reading options" in Android T.
Logging for the status of five features “Font size”, “Display size”, “Bold Text”, “High contrast text”, and “Reset” in the “Display size and text” page. Bug: 222661478 Test: manual test Change-Id: I33060fca860e02ddac7716275e8682e70fbaff1f
This commit is contained in:
@@ -22,7 +22,9 @@ import android.widget.SeekBar;
|
||||
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 @@ class PreviewSizeSeekBarController extends BasePreferenceController implements
|
||||
private ProgressInteractionListener mInteractionListener;
|
||||
private LabeledSeekBarPreference mSeekBarPreference;
|
||||
|
||||
@EntryPoint
|
||||
private int mEntryPoint;
|
||||
|
||||
private final SeekBar.OnSeekBarChangeListener mSeekBarChangeListener =
|
||||
new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
@@ -45,6 +50,12 @@ class PreviewSizeSeekBarController extends BasePreferenceController implements
|
||||
if (!mSeekByTouch && mInteractionListener != null) {
|
||||
mInteractionListener.onProgressChanged();
|
||||
}
|
||||
|
||||
SettingsStatsLog.write(
|
||||
SettingsStatsLog.ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED,
|
||||
AccessibilityStatsLogUtils.convertToItemKeyName(getPreferenceKey()),
|
||||
progress,
|
||||
AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,6 +107,15 @@ class PreviewSizeSeekBarController extends BasePreferenceController implements
|
||||
mSeekBarPreference.setProgress(defaultProgress);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user