Touchpad: replace references to "trackpad" with "touchpad"

When we first added the touchpad settings we hadn't settled on whether
to refer to them as "touchpads" or "trackpads" yet. We've since settled
on "touchpad", but that's left us with some Settings code referring to
one and some to the other. Let's standardize on "touchpad" since that's
consistent with user-facing strings and the rest of the input codebase.

This CL doesn't change string identifiers, as I believe that would cause
them to get different Translation Console IDs and thus be retranslated.

Bug: 245989146
Test: m
Test: check strings and icons are still displayed correctly in the
      touchpad settings and tutorial, and that settings toggles and the
      tutorial still work
Test: atest SettingsRoboTests
Flag: EXEMPT refactor
Change-Id: I930e9fc85e09e03da3513e5f8443077fa8ea91b0
This commit is contained in:
Harry Cutts
2024-12-31 15:30:20 +00:00
parent 5f63dd0fdb
commit 509fd17515
22 changed files with 77 additions and 79 deletions

View File

@@ -42,20 +42,20 @@ import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
/** Tests for {@link TrackpadPointerSpeedPreferenceController} */
/** Tests for {@link TouchpadPointerSpeedPreferenceController} */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
com.android.settings.testutils.shadow.ShadowSystemSettings.class,
})
public class TrackpadPointerSpeedPreferenceControllerTest {
public class TouchpadPointerSpeedPreferenceControllerTest {
@Rule
public MockitoRule rule = MockitoJUnit.rule();
private static final String PREFERENCE_KEY = "trackpad_pointer_speed";
private static final String PREFERENCE_KEY = "touchpad_pointer_speed";
private static final String SETTING_KEY = Settings.System.TOUCHPAD_POINTER_SPEED;
private Context mContext;
private TrackpadPointerSpeedPreferenceController mController;
private TouchpadPointerSpeedPreferenceController mController;
private int mDefaultSpeed;
private FakeFeatureFactory mFeatureFactory;
@@ -63,7 +63,7 @@ public class TrackpadPointerSpeedPreferenceControllerTest {
public void setUp() {
mContext = ApplicationProvider.getApplicationContext();
mFeatureFactory = FakeFeatureFactory.setupForTest();
mController = new TrackpadPointerSpeedPreferenceController(mContext, PREFERENCE_KEY);
mController = new TouchpadPointerSpeedPreferenceController(mContext, PREFERENCE_KEY);
mDefaultSpeed = Settings.System.getIntForUser(
mContext.getContentResolver(),
SETTING_KEY,

View File

@@ -44,28 +44,28 @@ import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
/** Tests for {@link TrackpadReverseScrollingPreferenceController} */
/** Tests for {@link TouchpadReverseScrollingPreferenceController} */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
com.android.settings.testutils.shadow.ShadowSystemSettings.class,
com.android.settings.testutils.shadow.ShadowInputDevice.class,
})
public class TrackpadReverseScrollingPreferenceControllerTest {
public class TouchpadReverseScrollingPreferenceControllerTest {
@Rule
public MockitoRule rule = MockitoJUnit.rule();
private static final String PREFERENCE_KEY = "trackpad_reverse_scrolling";
private static final String PREFERENCE_KEY = "touchpad_reverse_scrolling";
private static final String SETTING_KEY = Settings.System.TOUCHPAD_NATURAL_SCROLLING;
private Context mContext;
private TrackpadReverseScrollingPreferenceController mController;
private TouchpadReverseScrollingPreferenceController mController;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
mContext = ApplicationProvider.getApplicationContext();
mFeatureFactory = FakeFeatureFactory.setupForTest();
mController = new TrackpadReverseScrollingPreferenceController(mContext, PREFERENCE_KEY);
mController = new TouchpadReverseScrollingPreferenceController(mContext, PREFERENCE_KEY);
}
@Test

View File

@@ -44,28 +44,28 @@ import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
/** Tests for {@link TrackpadBottomPreferenceController} */
/** Tests for {@link TouchpadRightClickZonePreferenceController} */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
com.android.settings.testutils.shadow.ShadowSystemSettings.class,
com.android.settings.testutils.shadow.ShadowInputDevice.class,
})
public class TrackpadBottomPreferenceControllerTest {
public class TouchpadRightClickZonePreferenceControllerTest {
@Rule
public MockitoRule rule = MockitoJUnit.rule();
private static final String PREFERENCE_KEY = "trackpad_bottom_right_tap";
private static final String PREFERENCE_KEY = "touchpad_bottom_right_tap";
private static final String SETTING_KEY = Settings.System.TOUCHPAD_RIGHT_CLICK_ZONE;
private Context mContext;
private TrackpadBottomPreferenceController mController;
private TouchpadRightClickZonePreferenceController mController;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
mContext = ApplicationProvider.getApplicationContext();
mFeatureFactory = FakeFeatureFactory.setupForTest();
mController = new TrackpadBottomPreferenceController(mContext, PREFERENCE_KEY);
mController = new TouchpadRightClickZonePreferenceController(mContext, PREFERENCE_KEY);
}
@Test

View File

@@ -44,28 +44,28 @@ import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
/** Tests for {@link TrackpadTapToClickPreferenceController} */
/** Tests for {@link TouchpadTapToClickPreferenceController} */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
com.android.settings.testutils.shadow.ShadowSystemSettings.class,
com.android.settings.testutils.shadow.ShadowInputDevice.class,
})
public class TrackpadTapToClickPreferenceControllerTest {
public class TouchpadTapToClickPreferenceControllerTest {
@Rule
public MockitoRule rule = MockitoJUnit.rule();
private static final String PREFERENCE_KEY = "trackpad_tap_to_click";
private static final String PREFERENCE_KEY = "touchpad_tap_to_click";
private static final String SETTING_KEY = Settings.System.TOUCHPAD_TAP_TO_CLICK;
private Context mContext;
private TrackpadTapToClickPreferenceController mController;
private TouchpadTapToClickPreferenceController mController;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
mContext = ApplicationProvider.getApplicationContext();
mFeatureFactory = FakeFeatureFactory.setupForTest();
mController = new TrackpadTapToClickPreferenceController(mContext, PREFERENCE_KEY);
mController = new TouchpadTapToClickPreferenceController(mContext, PREFERENCE_KEY);
}
@Test