Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59f90186 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Remove unnecessary functions from AssistGestureFeatureProvider

Fixes: 62945918

Test: make -j RunSettingsRoboTests && manual
Change-Id: I13438e6741a3398d06917b45f098c13df7dff97e
parent 68fcefed
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -32,9 +32,6 @@ public interface AssistGestureFeatureProvider {
    /** Returns true if the sensor is available. */
    boolean isSensorAvailable(Context context);

    /** Returns the resource */
    int getPreferenceResourceId();

    /** Returns a list of additional preference controllers */
    List<AbstractPreferenceController> getControllers(Context context, Lifecycle lifecycle);

+0 −5
Original line number Diff line number Diff line
@@ -37,11 +37,6 @@ public class AssistGestureFeatureProviderImpl implements AssistGestureFeaturePro
        return false;
    }

    @Override
    public int getPreferenceResourceId() {
        return R.xml.assist_gesture_settings;
    }

    @Override
    public List<AbstractPreferenceController> getControllers(Context context, Lifecycle lifecycle) {
        return new ArrayList<>();
+1 −2
Original line number Diff line number Diff line
@@ -49,8 +49,7 @@ public class AssistGestureSettings extends DashboardFragment {

    @Override
    protected int getPreferenceScreenResId() {
        return FeatureFactory.getFactory(getContext())
                .getAssistGestureFeatureProvider().getPreferenceResourceId();
        return R.xml.assist_gesture_settings;
    }

    @Override
+0 −2
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public class AssistGestureSettingsTest {

    @Test
    public void testGetPreferenceScreenResId() {
        when(mFeatureProvider.getPreferenceResourceId()).thenReturn(R.xml.assist_gesture_settings);
        assertThat(mSettings.getPreferenceScreenResId())
                .isEqualTo(R.xml.assist_gesture_settings);
    }
@@ -77,7 +76,6 @@ public class AssistGestureSettingsTest {
                        ShadowApplication.getInstance().getApplicationContext(),
                        true /* enabled */);

        when(mFeatureProvider.getPreferenceResourceId()).thenReturn(R.xml.assist_gesture_settings);
        assertThat(indexRes).isNotNull();
        assertThat(indexRes.get(0).xmlResId).isEqualTo(mSettings.getPreferenceScreenResId());
    }