Merge "[Accessibility] Add basic metrics logging for color contrast" into main
diff --git a/src/com/android/settings/accessibility/ColorContrastFragment.java b/src/com/android/settings/accessibility/ColorContrastFragment.java
index a572657..904826e 100644
--- a/src/com/android/settings/accessibility/ColorContrastFragment.java
+++ b/src/com/android/settings/accessibility/ColorContrastFragment.java
@@ -16,6 +16,8 @@
package com.android.settings.accessibility;
+import android.app.settings.SettingsEnums;
+
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
@@ -40,8 +42,7 @@
@Override
public int getMetricsCategory() {
- // TODO(b/326539398): Add metrics tracking for color contrast.
- return 0;
+ return SettingsEnums.ACCESSIBILITY_COLOR_CONTRAST;
}
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
diff --git a/tests/robotests/src/com/android/settings/accessibility/ColorContrastFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ColorContrastFragmentTest.java
index f903745..3077637 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ColorContrastFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ColorContrastFragmentTest.java
@@ -22,6 +22,7 @@
import static org.mockito.Mockito.when;
import android.app.UiModeManager;
+import android.app.settings.SettingsEnums;
import android.content.Context;
import androidx.test.core.app.ApplicationProvider;
@@ -59,7 +60,8 @@
@Test
public void getMetricsCategory_returnsCorrectCategory() {
- assertThat(mFragment.getMetricsCategory()).isEqualTo(0);
+ assertThat(mFragment.getMetricsCategory()).isEqualTo(
+ SettingsEnums.ACCESSIBILITY_COLOR_CONTRAST);
}
@Test