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

Commit 8884f80d authored by Adrian DC's avatar Adrian DC Committed by Sam Mortimer
Browse files

LineageParts: Reenable Lights related settings

Change-Id: I5dc25cbce39cd580edc03cb38309fdddeed4474f
parent 8eca6f5e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -56,11 +56,13 @@
            android:title="@string/notification_light_screen_on"
            android:dependency="notification_light_pulse" />

        <!-- Superceded by Oreo dnd visual disturbance settings
        <lineageos.preference.LineageSystemSettingSwitchPreference
            android:key="allow_lights"
            android:title="@string/notification_light_zen_mode"
            android:dependency="notification_light_pulse"
            android:defaultValue="true" />
        -->

        <lineageos.preference.LineageSystemSettingSwitchPreference
            android:key="notification_light_pulse_custom_enable"
+0 −8
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.widget.TextView;
import org.lineageos.lineageparts.widget.CustomDialogPreference;
import org.lineageos.lineageparts.R;

/*
public class ApplicationLightPreference extends CustomDialogPreference<LightSettingsDialog>
        implements View.OnLongClickListener {

@@ -63,7 +62,6 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
     * @param context
     * @param attrs
     */
    /*
    public ApplicationLightPreference(Context context, AttributeSet attrs) {
        this(context, attrs, DEFAULT_COLOR, DEFAULT_TIME, DEFAULT_TIME,
                context.getSystemService(NotificationManager.class)
@@ -76,7 +74,6 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
     * @param onValue
     * @param offValue
     */
    /*
    public ApplicationLightPreference(Context context, AttributeSet attrs,
                                      int color, int onValue, int offValue) {
        this(context, attrs, color, onValue, offValue,
@@ -90,7 +87,6 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
     * @param onValue
     * @param offValue
     */
    /*
    public ApplicationLightPreference(Context context, AttributeSet attrs,
                                      int color, int onValue, int offValue, boolean onOffChangeable) {
        super(context, attrs);
@@ -206,8 +202,6 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
    /**
     * Getters and Setters
     */
    /*

    public int getColor() {
        return mColorValue;
    }
@@ -263,7 +257,6 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
    /**
     * Utility methods
     */
    /*
    private static ShapeDrawable createOvalShape(int size, int color) {
        ShapeDrawable shape = new ShapeDrawable(new OvalShape());
        shape.setIntrinsicHeight(size);
@@ -309,4 +302,3 @@ public class ApplicationLightPreference extends CustomDialogPreference<LightSett
        return getContext().getResources().getString(R.string.custom_time);
    }
}
*/
+0 −3
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import org.lineageos.lineageparts.SettingsPreferenceFragment;
import lineageos.preference.LineageSystemSettingSwitchPreference;
import lineageos.providers.LineageSettings;

/*
public class BatteryLightSettings extends SettingsPreferenceFragment implements
        Preference.OnPreferenceChangeListener {
    private static final String TAG = "BatteryLightSettings";
@@ -131,7 +130,6 @@ public class BatteryLightSettings extends SettingsPreferenceFragment implements
     * @param key of the specific setting to update
     * @param color
     */
    /*
    protected void updateValues(String key, Integer color) {
        ContentResolver resolver = getActivity().getContentResolver();

@@ -209,4 +207,3 @@ public class BatteryLightSettings extends SettingsPreferenceFragment implements
        }
    };
}
*/
+0 −7
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import org.lineageos.lineageparts.notificationlight.ColorPickerView.OnColorChang
import java.util.ArrayList;
import java.util.Locale;

/*
public class LightSettingsDialog extends AlertDialog implements
        ColorPickerView.OnColorChangedListener, TextWatcher, OnFocusChangeListener {

@@ -86,7 +85,6 @@ public class LightSettingsDialog extends AlertDialog implements
     * @param initialSpeedOn
     * @param initialSpeedOff
     */
    /*
    protected LightSettingsDialog(Context context, int initialColor, int initialSpeedOn,
            int initialSpeedOff) {
        super(context);
@@ -101,7 +99,6 @@ public class LightSettingsDialog extends AlertDialog implements
     * @param initialSpeedOff
     * @param onOffChangeable
     */
    /*
    protected LightSettingsDialog(Context context, int initialColor, int initialSpeedOn,
            int initialSpeedOff, boolean onOffChangeable) {
        super(context);
@@ -131,7 +128,6 @@ public class LightSettingsDialog extends AlertDialog implements
     * @param speedOn - the flash time in ms
     * @param speedOff - the flash length in ms
     */
    /*
    private void setUp(int color, int speedOn, int speedOff, boolean onOffChangeable) {
        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View layout = mInflater.inflate(R.layout.dialog_light_settings, null);
@@ -351,7 +347,6 @@ public class LightSettingsDialog extends AlertDialog implements
         * @param customTime Current time value that might be one of the
         *            predefined values or a totally custom value
         */
        /*
        public PulseSpeedAdapter(int timeNamesResource, int timeValuesResource, Integer customTime) {
            this(timeNamesResource, timeValuesResource);

@@ -369,7 +364,6 @@ public class LightSettingsDialog extends AlertDialog implements
         * @param time Time in ms
         * @return Position of entry with given time or -1 if not found.
         */
        /*
        public int getTimePosition(Integer time) {
            for (int position = 0; position < getCount(); ++position) {
                if (getItem(position).second.equals(time)) {
@@ -449,4 +443,3 @@ public class LightSettingsDialog extends AlertDialog implements
        }
    }
}
*/
+0 −7
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ import lineageos.preference.SystemSettingSwitchPreference;
import lineageos.providers.LineageSettings;
import lineageos.util.ColorUtils;

/*
public class NotificationLightSettings extends SettingsPreferenceFragment implements
        Preference.OnPreferenceChangeListener, ApplicationLightPreference.ItemLongClickListener {
    private static final String TAG = "NotificationLightSettings";
@@ -293,7 +292,6 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
            }

            /* Display a pref explaining how to add apps */
            /*
            if (mApplicationPrefList.getPreferenceCount() == 0) {
                String summary = getResources().getString(
                        R.string.notification_light_no_apps_summary);
@@ -388,7 +386,6 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
     * @param timeon
     * @param timeoff
     */
    /*
    protected void updateValues(String packageName, Integer color, Integer timeon, Integer timeoff) {
        ContentResolver resolver = getActivity().getContentResolver();

@@ -496,7 +493,6 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
    /**
     * Utility classes and supporting methods
     */
    /*
    @Override
    public Dialog onCreateDialog(int id) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
@@ -529,7 +525,6 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
    /**
     * Application class
     */
    /*
    private static class Package {
        public String name;
        public Integer color;
@@ -543,7 +538,6 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
         * @param timeon
         * @param timeoff
         */
        /*
        public Package(String name, Integer color, Integer timeon, Integer timeoff) {
            this.name = name;
            this.color = color;
@@ -601,4 +595,3 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
        }
    };
}
*/