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

Commit 4ec4969b authored by Matthew Fritze's avatar Matthew Fritze
Browse files

Remove Gesture settings as inline results

Given that inline results do not have intents associated,
the inline results must be self-explanatory. The gesture
settings ofter requier the video/animation to be
understood. Thus they should not be inline.

Test: RunSettingsRoboTests
Bug:
Change-Id: Iae25365b376ec510f8330bc0a0bf72883cf9a6d4
parent 007d120c
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -64,14 +64,4 @@ public class DoubleTapPowerPreferenceController extends GesturePreferenceControl
                Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0);
        return cameraDisabled == 0;
    }

    @Override
    public ResultPayload getResultPayload() {
        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
        valueMap.put(0, true);
        valueMap.put(1, false);

        return new InlineSwitchPayload(Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED,
                ResultPayload.SettingsSource.SECURE, valueMap);
    }
}
+0 −10
Original line number Diff line number Diff line
@@ -70,14 +70,4 @@ public class DoubleTapScreenPreferenceController extends GesturePreferenceContro
    protected boolean isSwitchPrefEnabled() {
        return mAmbientConfig.pulseOnDoubleTapEnabled(mUserId);
    }

    @Override
    public ResultPayload getResultPayload() {
        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
        valueMap.put(1, true);
        valueMap.put(0, false);

        return new InlineSwitchPayload(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
                ResultPayload.SettingsSource.SECURE, valueMap);
    }
}
+0 −10
Original line number Diff line number Diff line
@@ -85,14 +85,4 @@ public class DoubleTwistPreferenceController extends GesturePreferenceController
        }
        return false;
    }

    @Override
    public ResultPayload getResultPayload() {
        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
        valueMap.put(1, true);
        valueMap.put(0, false);

        return new InlineSwitchPayload(Settings.Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
                ResultPayload.SettingsSource.SECURE, valueMap);
    }
}
+0 −19
Original line number Diff line number Diff line
@@ -170,24 +170,5 @@ public class GestureSettings extends DashboardFragment {
                    }
                    return result;
                }

                @Override
                public List<PreferenceController> getPreferenceControllers(Context context) {
                    List<PreferenceController> controllers = new ArrayList<>();
                    AmbientDisplayConfiguration ambientConfig
                            = new AmbientDisplayConfiguration(context);

                    controllers.add(new DoubleTapPowerPreferenceController(context,
                            null /* lifecycle */));
                    controllers.add(new PickupGesturePreferenceController(context,
                            null /* lifecycle */, ambientConfig, UserHandle.myUserId()));
                    controllers.add(new DoubleTapScreenPreferenceController(context,
                            null /* lifecycle */, ambientConfig, UserHandle.myUserId()));
                    controllers.add(new SwipeToNotificationPreferenceController(context,
                            null /* lifecycle */));
                    controllers.add(new DoubleTwistPreferenceController(context,
                            null /* lifecycle */));
                    return controllers;
                }
            };
}
+0 −10
Original line number Diff line number Diff line
@@ -70,14 +70,4 @@ public class PickupGesturePreferenceController extends GesturePreferenceControll
                Settings.Secure.DOZE_PULSE_ON_PICK_UP, enabled ? 1 : 0);
        return true;
    }

    @Override
    public ResultPayload getResultPayload() {
        ArrayMap<Integer, Boolean> valueMap = new ArrayMap<>();
        valueMap.put(1, true);
        valueMap.put(0, false);

        return new InlineSwitchPayload(Settings.Secure.DOZE_PULSE_ON_PICK_UP,
                ResultPayload.SettingsSource.SECURE, valueMap);
    }
}
Loading