Merge "Fix for EditShortcutsPreferenceFragmentTest to mock the correct AccessibilityTarget fields" into main

This commit is contained in:
Riley Jones
2024-02-27 21:58:50 +00:00
committed by Android (Google) Code Review

View File

@@ -549,6 +549,7 @@ public class EditShortcutsPreferenceFragmentTest {
ComponentName componentName, String label) {
AccessibilityTarget target = mock(AccessibilityTarget.class);
when(target.getComponentName()).thenReturn(componentName);
when(target.getId()).thenReturn(componentName.flattenToString());
when(target.getLabel()).thenReturn(label);
return target;
}