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

Commit b2db7d6f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove Gesture settings as inline results"

parents 1b2b8697 4ec4969b
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