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

Commit 3664cc23 authored by Ehud Shabtai's avatar Ehud Shabtai Committed by Steve Kondik
Browse files

Add option for blending pulse notification.

parent 8ba15165
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -897,6 +897,8 @@
    <string name="notification_pulse_title">Pulse notification light</string>
    <!-- Sound settings screen, notification light repeat pulsing summary -->
    <string name="notification_pulse_summary">Pulse trackball light repeatedly for new notifications</string>
    <string name="notification_pulse_blend_title">Blend notification lights</string>
    <string name="notification_pulse_blend_summary">Blend the trackball light colors for multiple notifications</string>
    <!-- Sound settings screen, notification light while screen on title -->
    <string name="notification_screen_on_title">Pulse with screen on</string>
    <!-- Sound settings screen, notification light while screen on summary -->
+9 −1
Original line number Diff line number Diff line
@@ -123,12 +123,20 @@
                android:summary="@string/notification_pulse_summary"
                android:persistent="false" />

        <CheckBoxPreference
                android:key="notification_pulse_blend"
                android:title="@string/notification_pulse_blend_title"
                android:summary="@string/notification_pulse_blend_summary"
                android:dependency="notification_pulse"
                android:persistent="false" />

        <CheckBoxPreference
                android:key="notification_screen_on"
                android:title="@string/notification_screen_on_title"
                android:summary="@string/notification_screen_on_summary"
                android:dependency="notification_pulse"
                android:persistent="false" />
                android:persistent="false"
                android:defaultValue="false" />

        <ListPreference
                android:key="breathing_light_color"
+15 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
    private static final String KEY_SOUND_DISPLAY_SETTINGS = "sound_display_settings";
    private static final String KEY_TRACKBALL_SETTINGS = "trackball_settings";
    private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
    private static final String KEY_NOTIFICATION_PULSE_BLEND = "notification_pulse_blend";
    private static final String KEY_NOTIFICATION_SCREEN_ON = "notification_screen_on";
    private static final String KEY_BREATHING_LIGHT_COLOR = "breathing_light_color";
    private static final String KEY_TRACKBALL_WAKE_SCREEN = "trackball_wake_screen";
@@ -89,6 +90,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
    private ListPreference mAnimations;
    private ListPreference mAccelerometerMode;
    private CheckBoxPreference mNotificationPulse;
    private CheckBoxPreference mNotificationPulseBlend;
    private CheckBoxPreference mNotificationScreenOn;
    private ListPreference mBreathingLightColor;
    private CheckBoxPreference mTrackballWakeScreen;
@@ -169,6 +171,8 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
        mTrackballSettings = (PreferenceGroup) mSoundDisplaySettings.findPreference(KEY_TRACKBALL_SETTINGS);
        mNotificationPulse = (CheckBoxPreference)
                mTrackballSettings.findPreference(KEY_NOTIFICATION_PULSE);
        mNotificationPulseBlend = (CheckBoxPreference)
                mTrackballSettings.findPreference(KEY_NOTIFICATION_PULSE_BLEND);
        mNotificationScreenOn = (CheckBoxPreference)
                mTrackballSettings.findPreference(KEY_NOTIFICATION_SCREEN_ON);
        mBreathingLightColor = (ListPreference)
@@ -190,6 +194,13 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
            } catch (SettingNotFoundException snfe) {
                Log.e(TAG, Settings.System.NOTIFICATION_LIGHT_PULSE + " not found");
            }
            try {
                mNotificationPulseBlend.setChecked(Settings.System.getInt(resolver,
                        Settings.System.NOTIFICATION_PULSE_BLEND) == 1);
                mNotificationPulseBlend.setOnPreferenceChangeListener(this);
            } catch (SettingNotFoundException snfe) {
                Log.e(TAG, Settings.System.NOTIFICATION_PULSE_BLEND + " not found");
            }
            try {
                mNotificationScreenOn.setChecked(Settings.System.getInt(resolver,
                        Settings.System.NOTIFICATION_SCREEN_ON) == 1);
@@ -362,6 +373,10 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
            value = mNotificationPulse.isChecked();
            Settings.System.putInt(getContentResolver(),
                    Settings.System.NOTIFICATION_LIGHT_PULSE, value ? 1 : 0);
        } else if (preference == mNotificationPulseBlend) {
            value = mNotificationPulseBlend.isChecked();
            Settings.System.putInt(getContentResolver(),
                    Settings.System.NOTIFICATION_PULSE_BLEND, value ? 1 : 0);
        } else if (preference == mNotificationScreenOn) {
            value = mNotificationScreenOn.isChecked();
            Settings.System.putInt(getContentResolver(),