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

Commit a746255f authored by kaiyiz's avatar kaiyiz Committed by Steve Kondik
Browse files

Support alert type profile default:Vibrator & Ringtone for settings.

Change-Id: I9e2c1efdfabc0ffa0e9cf44cee31781f15e8894a
parent a8b0f88d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@
         >0 is milliseconds of screen-off time after which battery sounds will not play -->
    <integer name="def_low_battery_sound_timeout">0</integer>

    <!-- Default for Settings.System.VIBRATE_WHEN_RINGING enabled -->
    <bool name="def_vibrate_when_ringing_enabled">false</bool>

    <!-- Initial value for the Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS setting,
         which is a comma separated list of packages that no longer need confirmation
         for immersive mode.
+5 −1
Original line number Diff line number Diff line
@@ -2215,7 +2215,11 @@ public class DatabaseHelper extends SQLiteOpenHelper {
        try {
            stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
                    + " VALUES(?,?);");
            if (mContext.getResources().getBoolean(R.bool.def_vibrate_when_ringing_enabled)) {
                loadSetting(stmt, Settings.System.VIBRATE_WHEN_RINGING, 1);
            } else {
                loadSetting(stmt, Settings.System.VIBRATE_WHEN_RINGING, vibrateWhenRinging ? 1 : 0);
            }
        } finally {
            if (stmt != null) stmt.close();
        }