Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539 Test: make RunSettingsRoboTests for regression Test: adb logcat -b events | egrep "(sysui_|notification_)" for verifying log Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.MetricsProto.MetricsEvent;
|
||||
|
||||
public class FontSizePreferenceFragmentForSetupWizard
|
||||
@@ -31,7 +30,7 @@ public class FontSizePreferenceFragmentForSetupWizard
|
||||
public void onStop() {
|
||||
// Log the final choice in value if it's different from the previous value.
|
||||
if (mCurrentIndex != mInitialIndex) {
|
||||
MetricsLogger.action(getContext(), MetricsEvent.SUW_ACCESSIBILITY_FONT_SIZE,
|
||||
mMetricsFeatureProvider.action(getContext(), MetricsEvent.SUW_ACCESSIBILITY_FONT_SIZE,
|
||||
mCurrentIndex);
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
|
||||
public void onStop() {
|
||||
// Log the final choice in value if it's different from the previous value.
|
||||
if (mToggleSwitch.isChecked() != mToggleSwitchWasInitiallyChecked) {
|
||||
MetricsLogger.action(getContext(),
|
||||
mMetricsFeatureProvider.action(getContext(),
|
||||
MetricsEvent.SUW_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFICATION,
|
||||
mToggleSwitch.isChecked());
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@ package com.android.settings.accessibility;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.MetricsProto.MetricsEvent;
|
||||
|
||||
public class ToggleScreenReaderPreferenceFragmentForSetupWizard
|
||||
@@ -41,7 +40,7 @@ public class ToggleScreenReaderPreferenceFragmentForSetupWizard
|
||||
public void onStop() {
|
||||
// Log the final choice in value if it's different from the previous value.
|
||||
if (mToggleSwitch.isChecked() != mToggleSwitchWasInitiallyChecked) {
|
||||
MetricsLogger.action(getContext(),
|
||||
mMetricsFeatureProvider.action(getContext(),
|
||||
MetricsEvent.SUW_ACCESSIBILITY_TOGGLE_SCREEN_READER, mToggleSwitch.isChecked());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user